Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to access this remote EJB server

 
Edward Chen
Ranch Hand
Posts: 798
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an application server in the remote machine, say in 192.168.1.1 , how to access this remote EJB server in my coding?
Thanks.
 
Murali Mohan
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Clients access the remote server by passing the values of the INITIAL_CONTEXT_FACTORY and PROVIDER_URL to the InitialContext constructor through properties object.
For example code to Jrun server��..
Properties properties = new Properties();
properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, "allaire.ejipt.ContextFactory");
properties.setProperty(Context.PROVIDER_URL, "ejipt://remotehost:2773");//Here ejipt is protocal , it is application server specific protocal
Context ctx = new InitialContext(properties);
Regards,
Murali
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic