<ejb-ref> problem
jk.mkiii Feb 22, 2002 8:37 AMI posted about this to mailing list but tought it would be nice idea to post here too so more people could try to point my error.
I have my application packed in ear and inside that I have jar that contains my security beans. Part of my ejb-jar.xml
<ejb-name>Shepherd/security/Login</ejb-name>
fi.hut.cs.NC.Shepherd.security.LoginHome
fi.hut.cs.NC.Shepherd.security.Login
<ejb-class>fi.hut.cs.NC.Shepherd.ejb.security.LoginBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<ejb-ref>
CredentialManager bean
<ejb-ref-name>ejb/CredentialManager</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
fi.hut.cs.NC.Shepherd.security.CredentialManagerHome
fi.hut.cs.NC.Shepherd.security.CredentialManager
<ejb-link>Shepherd/security/CredentialManager</ejb-link>
</ejb-ref>
So I should be able to use in my bean code "ejb/CredentialManager" or "java:comp/env/ejb/CredentialManager" to locate bean that is connected to "Shepherd/security/CredentialManager" name? That is how I have understood all examples, but when I call method in Login bean that tries to get CredentialManager server throws exception saying "ejb not bound".
According to JNDIView java:comp/env/ejb in Login bean is linked to Shepherd/security/CredentialManager
java:comp namespace of the Shepherd/security/Login bean:
+- env (class: org.jnp.interfaces.NamingContext)
| +- ejb (class: org.jnp.interfaces.NamingContext)
| | +- CredentialManager[link -> Shepherd/security/CredentialManager] (class: javax.naming.LinkRef)
| | +- PrincipalManager[link -> Shepherd/security/PrincipalManager] (class: javax.naming.LinkRef)
| | +- AccountManager[link -> Shepherd/security/AccountManager] (class: javax.naming.LinkRef)
But still get RemoteException saying "ejb not bound when I try to lookup bean using ejb/CredentialManager". :( I know my system works happily if use full names in beans (in code lookup for "Shepherd/security/CredentialManager") but that doesn't seem as right way to do things.
If it matters I am using jboss 2.4.0 on Windows 2000 with Sun's 1.3.1 jdk.
--
jK.MkIII