Glassfish adds the string "ejb" in the JNDI of a particular EJB mobile phone

I have an EAR with several EJB banks, for example:

  • module1.jar
  • module2.jar

But when I deploy the application in the log, I see that ejb-s from module1.jar deploying 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 the 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 does Glassfish do to add "ejb" to JNDI?

Version for Glassfish: 3.1.1

This did not help restart several times, delete the generated one, osgi-cache, etc.

+4
source share
1 answer

Finally, I figured out the problem: in application.xml definition of module1 was sometimes doubled:

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

After removing the duplicate, the JNDI name was regular again.

+4
source

Source: https://habr.com/ru/post/1437183/


All Articles