Over a million developers have joined DZone.

Connection the Client Application to the EJB's on the server

DZone's Guide to

Connection the Client Application to the EJB's on the server

Free Resource

I have developed an EJB(with a remote interface and a session bean) and an client application that will connect to the EJBs.

The EJB's will be deployed on the server and the client application will be installed on different machines.

I am having difficulties in writing the code that will allow the application client to locate the EJB's on the server.  Anyone with an idea of how i can do this.

IZASTickets ticketBean = null;
    public ListDemo() {
        super(new BorderLayout());
        try {
            Properties props = new Properties();
        props.setProperty("org.omg.CORBA.ORBInitialHost", "");
        props.setProperty("org.omg.CORBA.ORBInitialPort", "8080");
            InitialContext init = new InitialContext(props);
            ticketBean = (IZASTickets) init.lookup(IZASTickets.class.getName());

        } catch (NamingException e) {

Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}