Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.1
-
None
-
None
-
Linux, amd64, java 6u13
Description
When the data source is not specified in the persistence.xml file, there is an heuristic to resolve it.
The application name (i.e. ear) should be used in this match, as a fallback, when the current algorithm can't find the data source.
As suggested by David Blevins at http://mail-archives.apache.org/mod_mbox/openejb-users/200905.mbox/%3CBCA79B46-275F-41D4-898E-35D26973E766@visi.com%3E , the algorithm should be:
1. the name set in <jta-data-source> or <non-jta-data-source>
2. the name of the persistence-unit
3. the name of the module name (i.e. war, ejb-jar, etc.)
4. the name of the app name (i.e. ear)