• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
Sheriffs:
  • Devaka Cooray
  • paul wheaton
  • Mark Herschberg
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
Bartenders:
  • Carey Brown
  • salvin francis
  • Piet Souris

Global JNDI access with EJB 3.1 and JBoss 6

 
Ranch Hand
Posts: 563
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Anderson gave himself the promotion. So I gave myself this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic