An EAR can have mutliple modules and these modules can have their own persistence.xml file.
This has been raised by Georgi on EasyBeans mailing list:
I made one EAR file, who contains two JAR files and two WAR files.
Every JAR file contain some entity beans and used owns persistence.xml
file (one for every jar)
The first persistence.xml contain persistence-unit that use connection
to one MySQL server, and
in the second persistence.xml contain persistence-unit that use
connection to one Oracle server.
When I deploy this EAR to EB(EasyBeans)-Tomcat-6.0.13, I see in console
following exception :
Caused by: java.lang.IllegalStateException: There is an existing
persistence.xml in another library of this EAR. This is not supported.