4
votes

I have an EAR with multiple EJB jars like:

  • module1.jar
  • module2.jar

But when I deploy the application in the log I can see that the ejb-s of module1.jar are deployed with a strange JNDI name:

  • Portable JNDI names for EJB ejb1: java:global/myappl/module1ejb/ejb1
  • Portable JNDI names for EJB ejb2: java:global/myappl/module1ejb/ejb2

But the rest of the modules are deployed regularly (without ejb ending in module name):

  • Portable JNDI names for EJB ejb1 : java:global/myappl/module2/ejb1
  • Portable JNDI names for EJB ejb2 : java:global/myappl/module2/ejb2

What makes Glassfish to append that "ejb" ending in JNDI?

Glassfish version: 3.1.1

It didn't help to restart several times, delete generated, osgi-cache, etc.

1

1 Answers

4
votes

Finally I found out the problem: in the application.xml definition of module1 was occasionally doubled:

<module>
    <ejb>module1.jar</ejb>
</module>
...
<module>
    <ejb>module1.jar</ejb>
</module>

After I removed the duplication, the JNDI name was regular again.