• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Two ejb-jar.xml files in ear

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
All,
It may be silly question. Please let me know if I can use two ejb-jar.xml files in ear.

Regards
djyoti
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Section 23.2 of the EJB 2.0 specification states


The ejb-jar file must contain the deployment descriptor in the format defined in Chapter 22. The deployment descriptor must be stored with the name META-INF/ejb-jar.xml in the ejb-jar file.



Since there cannot be two directories or files with the same name, there MUST only be one ejb-jar.xml file in any EAR deployment unit However, you may freely merge two ejb-jar.xml files into one single file if you ever feel the need to...
[ January 27, 2005: Message edited by: Valentin Crettaz ]
 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
since each and ejb-jar is a collection of beans which contains an ejb-jar.xml to describe the beans, and an ear is potentially a collection of 0-n ejb-jar's and 0-n war's, then yes, an ear may contain mulitple ejb-jar.xml files.

you can put all your message beans in one ejb-jar, with it's own ejb-jar.xml, all your entity beans/session facade beans into another ejb-jar with it's own ejb-jar.xml, then you'll have multiple ejb-jar.xml files into one ear.

a single ejb-jar file though (a jar file that contains enterprise java beans) can only contain one ejb-jar.xml. though it does not need to contain a META-INF/MANIFEST.MF file.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic