GeeCON Prague 2014*
The moose likes JBoss/WildFly and the fly likes Global JNDI access with EJB 3.1 and JBoss 6 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Global JNDI access with EJB 3.1 and JBoss 6 " Watch "Global JNDI access with EJB 3.1 and JBoss 6 " New topic
Author

Global JNDI access with EJB 3.1 and JBoss 6

Celinio Fernandes
Ranch Hand

Joined: Jun 28, 2003
Posts: 547

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 ?


SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCBCD 5
Visit my blog
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10142
    
165

Celinio Fernandes wrote:
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.

Irrespective of whether it's in WEB-INF/classes or in a jar in WEB-INF/lib, the module name will be the name of the .war archive.

Celinio Fernandes wrote:
Also, when will it be available in JBoss 6 ?


From what I know, it will be in 6.0.0.M3

[My Blog] [JavaRanch Journal]
 
GeeCON Prague 2014
 
subject: Global JNDI access with EJB 3.1 and JBoss 6