Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with JNDI Name in CMP  RSS feed

 
Prakash Dwivedi
Ranch Hand
Posts: 452
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends,

I am trying to access a CMP through a SessionBean.



The jndi name of the CMP ("EMPLOYEE_DATA") is "saddy/EMPLOYEE_DATALocalHome".

Now my problem is when i try to access my CMp through the Session Bean using jndi name "java:comp/env/ejb/EMPLOYEE_DATALocalHome" or "java:comp/env/ejb/saddy/EMPLOYEE_DATALocalHome" i get exception where as the same code works if i use jndi name as "local:/ejb/saddy/EMPLOYEE_DATALocalHome".

I am unable to understand what is wrong in my code, why i am not able to access my CMP in a normal way.

Sorry for the way i have displayed the content of ejb-jar.xml, as i was unable to put it in better format using UBB code.

Please help.
[ May 26, 2004: Message edited by: Prakash Dwivedi ]
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36393
453
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Prakash,
WSAD uses / for remote interfaces and local:ejb/ for local interfaces. Since you only have the local interfaces in your xml file, that is all the JNDI can find.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!