File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Websphere and the fly likes Problem with JNDI  Name in CMP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Problem with JNDI  Name in CMP" Watch "Problem with JNDI  Name in CMP" New topic

Problem with JNDI Name in CMP

Prakash Dwivedi
Ranch Hand

Joined: Sep 28, 2002
Posts: 452
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 ]

Prakash Dwivedi (SCJP2, SCWCD, SCBCD)
"Failure is not when you fall down, Its only when you don't get up again"
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33102

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.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: Problem with JNDI Name in CMP
It's not a secret anymore!