• 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
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Two ejb-jar.xml files in ear

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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.
 
Why fit in when you were born to stand out? - Seuss. Tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic