DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Eli has posted 1 posts at DZone. View Full User Profile

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

07.25.2013
| 1229 views |
  • submit to reddit
IZASTickets ticketBean = null;
 
   
    public ListDemo() {
        super(new BorderLayout());
        try {
            Properties props = new Properties();
        props.setProperty("org.omg.CORBA.ORBInitialHost", "192.168.12.12");
        props.setProperty("org.omg.CORBA.ORBInitialPort", "8080");
            InitialContext init = new InitialContext(props);
            ticketBean = (IZASTickets) init.lookup(IZASTickets.class.getName());
            }

        } catch (NamingException e) {
            System.out.println(e.getMessage());
        }

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.

    Tags: