Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • 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 ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

access remote session ejb on remote server

Ranch Hand
Posts: 270
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have one session ejb deployed on serverA with jndi name: ejb/MySLSBRemoteHome

I have one web client deployed on serverB with the following DD segment:






Properties prop = new Properties();

Context initial = new InitialContext(prop);
Object objref = initial.lookup("java:comp/env/test/myejb");

MySLSBHome home =

MySLSBRemote bean = home.create();

Now the problem is that i get an exception:

javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundExcept
ion: Unable to resolve 'ejb/MySLSBRemoteHome' Resolved ejb; remaining name 'MySLSBRemoteHome'

But when i change the lookup to initial.lookup("ejb/MySLSBRemoteHome"); it will work. But i am supposed to use "java:comp/env/test/myejb", right?

Can anyone of you help me out? Thanks in advance
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'd try to change change test/myejb to ejb/myejb.
Friends help you move. Good friends help you move bodies. This tiny ad will help:
the value of filler advertising in 2021
    Bookmark Topic Watch Topic
  • New Topic