[
https://issues.apache.org/jira/browse/OPENEJB-1027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Luis Fernando Planella Gonzalez updated OPENEJB-1027:
-----------------------------------------------------
Attachment: AutoConfigPersistenceUnitsTest.java
AutoConfig.java
dataSourceFromModules.patch
Attaching the updated patch and current versions for AutoConfig and
AutoConfigPersistenceUnitsTest.
Here's what was done, when neither jta-data-source nor non-jta-data-source are
specified, AutoConfig tries to find matching data sources by:
* persistence unit name
* persistence module id (please review: as I could see, this id is always null,
so I think this part should be removed)
* Web module id
* Web module context root
* Application module id
Unit tests are updated to match all those cases, except for persistence module
id.
> Add the application name to the data sources matching heuristics
> ----------------------------------------------------------------
>
> Key: OPENEJB-1027
> URL: https://issues.apache.org/jira/browse/OPENEJB-1027
> Project: OpenEJB
> Issue Type: Improvement
> Affects Versions: 3.1
> Environment: Linux, amd64, java 6u13
> Reporter: Luis Fernando Planella Gonzalez
> Attachments: AutoConfig.java, AutoConfig.java,
> AutoConfigPersistenceUnitsTest.java, AutoConfigPersistenceUnitsTest.java,
> dataSourceFromModules.patch, dataSourceFromWebAppContext.patch
>
>
> 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/%[email protected]%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)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.