Share persistence units between ejb-jars
You have an ear package with multiple ejb packages inside and many of the ejb' packages need to access the same datasource.
- Create a persistence.jar package which will contains only the persistence.xml file.
- Put this jar in the lib directory of the ear package.
- Add the following block to the application.xml descriptor
<module> <java>lib/peristence.jar</java> </module>