0

Sometimes, configurations or declarations need to be done in the EJB-deployment descriptor, the ejb-jar.xml file.

When there is no ejb-client jar-file, ejb-jar.xml is located in the META-INF of the module:

Module-root:
   ---> META-INF
        - ejb-jar.xml
        - ...

but if a ejb-jar client gets added, where will the ejb-jar.xml be located? In the META-INF of the client:

Module-root:
   ---> META-INF
        - // here nothing
        - ...

ejb-client-Root:
   ---> META-INF
        - ejb-jar.xml // here something
        - ...

or will the EJB-Module keep the ejb-jar.file as usual?

thanks!!!

Jaumzera
  • 2,305
  • 1
  • 30
  • 44
arthur
  • 3,245
  • 4
  • 25
  • 34

1 Answers1

2

The ejb-jar.xml should always go in the EJB module JAR, colocated with the bean implementation (<ejb-class/>) .class files. It's possible to have a separate EJB module that is also a client, in which case you might have two ejb-jar.xml: one in the "service" JAR and one in the "client" jar.

Brett Kail
  • 33,593
  • 2
  • 85
  • 90
  • 1
    None other than the EJB specification; this is just the way EJBs (and EE in general) work. If it adds any credibility, I have 8 years of EE experience, and 4 years of experience developing an EJB container. – Brett Kail Sep 10 '12 at 14:23