I use EJB inside OSGi packages. And now, when I need to get EJB, I have a long jndi, for example:
bean = (InterfaceName) ctx.lookup("java:global/longBundleName_version/OrganizationDirBean!and.plus.path.and.InterfaceName");
I want to change this part:
longBundleName_version
I mean, when I deploy the package, this part should be installed from [glassfish-] application.xml or from [glassfish -] - ejb-jar.xml or from any other xml descriptor. I want the jndi name for my ejb to be:
java:global/newBundleNameWithoutVersion/etc
The problem is that I cannot find what I have to install in these files. All the options that I found on the Internet are no longer supported, and everything that I tried on my own does not work. could you help me?
Please do not suggest mappedName as it can only be used (!) For remote beans. I use beans that are both local and remote.
If someone is involved in the development of glass fish, could you at least indicate which beams I should study to find the question myself? I'll be very grateful.
java java-ee glassfish glassfish-4 jndi
user2022068
source share