I have a SessionBean AdminService which has the following ejb-ref to an EntityBean 
User. 
 
   * @ejb.ejb-ref
   *     ejb-name="User"
   *     view-type=""
   *     ref-name="ejb/UserBeanRef"

I have built the jar and deployed on JBoss 3.2.3. When I try to access the Local home 
of the User entity in the AdminService, I get the following exception:

   Start of createUser in AdminServiceBeanImpl
   01:28:32,624 ERROR [LogInterceptor] EJBException, causedBy:
   javax.naming.NameNotFoundException: ejb not bound
           at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)

I looked at the JBoss JNDI tree and I only see the following for AdminService
   +- env (class: org.jnp.interfaces.NamingContext)

From a different sample ear I found that the following reference should be displayed 
in the JNDI tree:
     +- env (class: org.jnp.interfaces.NamingContext)
     |   +- ejb (class: org.jnp.interfaces.NamingContext)
     |   |   +- CustomerBeanRef[link -> 
org.andromda.samples.carrental.customers/Customer/LocalHome] (class: 
javax.naming.LinkRef)

For some reason, the reference from AdminService to User is not getting reflected in 
the JNDI tree. My question is how does this ejb.ejb-ref get translated to jboss.xml? 
How can I get the UserBeanRef link added to AdminService in JNDI?

I will really appreciate any help.

Thanks,

Sunondo

Reply via email to