Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Kerri Gonzalez   on Sep 11 In Java Category.

  
Question Answered By: Adal Fischer   on Sep 11

check this snippet:

Hashtable props = new Hashtable();
props.put("org.omg.CORBA.ORBInitialHost", "192.168.1.1"); // the IP address or name of the server
props.put("org.omg.CORBA.ORBInitialPort","3700"); //the port, ususally 3700
InitialContext ctx = new InitialContext(props);

ARemoteStatelessSessionBeanInterface service = (ARemoteStatelessSessionBeanInterface) ctx.lookup(ARemoteStatelessSessionBeanInterface.class.getName()); //JNDI name is usually the full package name but might be changed

//use the service
service.callAMethod();

Share: