-
1. Re: Global JNDI
adrian.brock Jun 24, 2003 5:29 AM (in response to sraj)You have the tag in the wrong place in jboss.xml
<enterprise-beans>
MySessionBean
<jndi-name>whatever</jndi-name>
Regards,
Adrian -
2. Re: Global JNDI
adrian.brock Jun 24, 2003 5:31 AM (in response to sraj)Completely wrong. :-)
<enterprise-beans>
<ejb-name>MySessionBean</ejb-name>
<jndi-name>whatever</jndi-name>
Regards,
Adrian -
3. Re: Global JNDI
sraj Jun 24, 2003 3:57 PM (in response to sraj)yes, thats how it is setup in my jboss.xml but it wont recognize the initial part of the name.
-
4. Re: Global JNDI
adrian.brock Jun 24, 2003 11:00 PM (in response to sraj)Can you post the full deployment descriptors,
it is likely you have something in the wrong place.
Regards,
Adrian -
5. Re: Global JNDI
sraj Jun 25, 2003 2:10 PM (in response to sraj)<?xml version="1.0" encoding="UTF-8"?>
<enterprise-bean>
<ejb-name>MySessionEJB</ejb-name>
<resource-ref>
<res-ref-name>jdbc/dbPool</res-ref-name>
<jndi-name>dbPool.DS</jndi-name>
</resource-ref>
<jndi-name>com/comp/app/ejb/MySessionEJB</jndi-name>
</enterprise-bean>
<enterprise-bean>
<ejb-name>MyCMPEJB</ejb-name>
<local-jndi-name>com/comp/app/ejb/MyCMPEJB</local-jndi-name>
</enterprise-bean>
And the JNDIView gives ...
Global JNDI Namespace
+- MySessionEJB (proxy: $Proxy32 implements interface com.comp.app.ejb.interfaces.MySessionHome,interface javax.ejb.Handle)
I suppose it should be
+-com
+-comp
+-app
+-ejb
+-MySessionEJB
so that from my jsp i can look it up as ...
com.comp.app.ejb.MySessionEJB instead of just MySessionEJB
Thanks
Shabs -
6. Re: Global JNDI
adrian.brock Jun 25, 2003 8:10 PM (in response to sraj)<enterprise-beans>
Regards,
Adrian -
7. Re: Global JNDI
sraj Jun 25, 2003 10:54 PM (in response to sraj)thanks
btw, if i have my jndi name as com/comp/app/MySessionBean i have to look it up in my jsp as com/comp/app/MySessionBean and not com.comp.app.MySessionBean
to look it up as com.comp.app.MySessionBean i need to define it as com.comp.app.MySessionBean.
question is, whats the difference and which is the prefered way .. since both seems to work. -
8. Re: Global JNDI
adrian.brock Jun 26, 2003 10:39 AM (in response to sraj)The spec recommended name is to bind it at
ejbs/app/MySessionBean
but it is only a convention.
For jsp access, the spec recommendeds
creating an ejb-ref in your web.xml
then use
java:/comp/env/{ejb-ref-name}
ejb-ref is normally something like ejbs/SomeAlias
Have a look at some examples on the web.
Regards,
Adrian