aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes EJB 3.0 lookup problem in JBOSS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB 3.0 lookup problem in JBOSS" Watch "EJB 3.0 lookup problem in JBOSS" New topic
Author

EJB 3.0 lookup problem in JBOSS

Vivekananda Venkateswaran
Greenhorn

Joined: Mar 30, 2008
Posts: 1
Hi,

I am able to deploy my Session bean successfully in JBOSS under default/deploy folder using the Netbeans IDE. The client for the same could get the reference and invoke the methods.

The deployment for the same deployed jar file when placed under all/deploy goes through fine. But when the client (same client that worked with Netbeans deployement) tries to do a JNDI lookup for the remote interface NamenotFoundException is thrown.

Could somebody help me solve this problem.

Thanks,
-Venkat.
Marco Ehrentreich
best scout
Bartender

Joined: Mar 07, 2007
Posts: 1282

Hi,

I could think of two things going wrong here:

1) Do you start your client from outside Netbeans? Do you have a properties file for the JNDI configuration in place or are the lookup properties directly in your client code? As a NamenotFoundException is thrown it's probably not this problem.

2) Be careful which JNDI lookup name is used to lookup the the interface of your session bean. With Netbeans for example it's a different name when you create an enterprise application as a container for all EJB modules and deploy this enterprise application in contrast to a separate EJB module. It's the best idea to use the JMX console of JBoss to view it's JNDI tree. If you start the JMX console in your browser there should be an MBean "JNDIView" (if I remember it correctly). This gives you a text output of the JNDI data. Search for your interface or bean you're looking for and use this name in your client code. In your client code you have to separate each layer of this JNDI view with a slash in the lookup name.

I hope this may help you. If something is unclear just let me know.

Marco
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: EJB 3.0 lookup problem in JBOSS