<ejb-link> not giving unique EJB in Weblogic 12c - Causing jndi Name collision
-
21-12-2019 - |
Domanda
I am migrating project from Weblogic 10.3 to Weblogic 12c.I have an MDB which reference another EJB (EJB 2.1) as below.
<ejb-local-ref>
<ejb-ref-name>ejb/WorkerSBLocalHome</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>test.WorkerSBLocalHome</local-home>
<local>test.WorkerSBLocal</local>
<ejb-link>WorkerEJB.jar#WorkerSB</ejb-link>
</ejb-local-ref>
Getting below exception
You must set a different JNDI name in the weblogic-ejb-jar.xml deployment descriptor or corresponding annotation for this EJB before it can be deployed.
EDIT : The Weblogic's weblogic-ejb-jar.xml has local-jndi-name and it is getting registered in Weblogic JNDI tree
Soluzione
Removal of local-jndi-name from weblogic-ejb-jar.xml and put below for lookup
java:comp/env/ejb
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow