Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

ejb lookup

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In case of distributed environment , if a client in machine A wants to lookup an ejb , which is deployed in machine B , Can some one tell me how do do this is WAS 6 ?

Thanks in advance.
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
it will be more or less same like the standalone client looking up EJB
as the caller will be sitting on one JVM and calee will be on another JVM

which will be something like this

InitialContext ctx = new InitialContext();
Object objref = ctx.lookup("ServiceNameYouWantToLookUp");


if you need to specify some properties then you need to go like this

props.put("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
props.put("java.naming.factory.url.pkgs",
"org.jboss.naming:org.jnp.interfaces");
props.put("java.naming.provider.url", "localhost:1099");//provide the EJB service address and port
Context context = new InitialContext(props);


this is for jboss. ihope similar things will be available for you in WAS as well
 
Prannav Santhosh
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for your help.
 
reply
    Bookmark Topic Watch Topic
  • New Topic