• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JNDI Lookup for Local Entity Beans

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please i need help regarding this. I am using wsad5.0 and when i am doing lookup for my cmp2.0 entity beans(i am using local interfaces). When i do a lookup from my stateless session beans i could not find my entity beans. I am getting name not found exception.
My jndi name is ejb/casedb/ejb/Customer29LocalHome ( as found in the beans tab of the deployment descriptor for Customer29 entity bean)
what should be my lookup string in the statelesssession bean(even this is one also uses local interface)
Thanks in advance
Chandoo :!
 
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It really depends on the EJB container that you are using. If this is wsad5.0, forgive me -- I'm not familiar with it. However, how JNDI names are set is deployment-specific (different for each app server). You will want to look inside whatever server you are using to ensure that the JNDI names are actually registered with it.
At that point, if you have some jndi name of "ejb/localthing", then you will typically look it up using "jndi:comp/env/ejb/localthing". Geez, I hope that's right. (Trying to do this from memory.) Since you're dealing with the local component interface, you'll need to just get the context from the InitialContext() and do the lookup from there.
You should be fine though. Your first step, and most like the problem, is making sure the JNDI name is bound correctly in your application server.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic