Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Global JNDI access with EJB 3.1 and JBoss 6

 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ?
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic