This week's book giveaway is in the Testing forum.
We're giving away four copies of Data Structures the Fun Way: An Amusing Adventure with Coffee-Filled Examples and have Jeremy Kubica on-line!
See this thread for details.
  • 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

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.
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic