aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes JNDI Name binding in JBOSS 5.1.0 Beta. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JNDI Name binding in JBOSS 5.1.0 Beta." Watch "JNDI Name binding in JBOSS 5.1.0 Beta." New topic
Author

JNDI Name binding in JBOSS 5.1.0 Beta.

Hardik Mehta
Greenhorn

Joined: Jul 31, 2006
Posts: 19
Hi,

I am following the MasteringEJB4thEdition book, which I downloaded from The Server Site website.

There is a simple example of HelloBean, which works perfectly with GlassFish V3 app server. The same example when deployed on JBOSS fails because of JNDI name lookup.

Is there any rule how the JNDI lookup names in JBOSS are decided if we don't provide any ? I found while googling that it is "<ear-file-name>/<Bean-class-name>/remote" but it doesn't work for me.

Here is the bean




Here is the client I am using:


Here is the error I get while executing the client




cout << About programming, Linux, music, stars, life and everything;
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10210
    
166

Do you deploy it in a EAR? If not, it's just the BeanClassName/remote. In any case, the server console will show the exact JNDI name that's being used for the bean, when the bean is being deployed. Something like:



What do you see on your console?


[My Blog] [JavaRanch Journal]
Hardik Mehta
Greenhorn

Joined: Jul 31, 2006
Posts: 19
Hi thanks for the quick reply.

I checked the deployment logs, and I found something like this...



Look the part after Global JNDI: is empty.

Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10210
    
166

Do you have any ejb-jar.xml or jboss.xml in the jar? If yes, please post its contents. Also see this thread for a similar issue
Hardik Mehta
Greenhorn

Joined: Jul 31, 2006
Posts: 19
Thanks Jaikiran,

Exactly this was the problem, I was missing namespace information in the ejb-jar.xml.


Now I changed it according to your link..



Now it works as expected.


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JNDI Name binding in JBOSS 5.1.0 Beta.