Hi,
I am not too sure about this, since this new feature in
EJB 3.1 not yet implemented in
JBoss 6.
About global JNDI access, the EJB 3.1 spec says :
Each portable session bean global JNDI name has the following syntax :
java:global[/<app-name>]/<module-name>/<bean-name>[!<fully-qualified-interface-name>]
<app-name> only applies if the session bean is packaged within an .ear file. It defaults to the base name of the .ear file with no filename extension, unless specified by the application.xml deployment descriptor.
<module-name> is the name of the module in which the session bean is packaged. In a stand-alone ejb-jar file or .ear-level ejb-jar file, the <module-name> defaults to the base name of the ejb-jar with no filename extension, unless specified in the ejb-jar.xml deployment descriptor.In a .war file, the <module-name> defaults to the base name of the .war file with no filename extension, unless specified in the web.xml deployment descriptor.
So, what does that mean in the case of an application packaged in an
EAR archive ? and in the case where the app is packaged
in an
WAR archive ?
I mean, with the new packaging capabilities, we can have different locations for an EJB :
EAR archive: jar file or war file
WAR archive : the war file itself (under web-inf/classes or web-inf/lib)
My problem is with the value of the name of the module <module-name>.
In the case of an EAR archive, the name of the module is the name of the jar file if the EJB is packaged in a jar file
or the name of the war file if the EJB is packaged in a war file.
In the case of a WAR archive, the name of the module is the name of the war file if the EJB is inside web-inf/classes or the name of the jar if
the EJB is packaged in a jar inside web-inf/lib.
Am i right ?
Thanks for enlightening me.
Also, when will it be available in JBoss 6 ?