[
https://issues.jboss.org/browse/AS7-2275?page=com.atlassian.jira.plugin.s...
]
Scott Marlow commented on AS7-2275:
-----------------------------------
We used to do the same in earlier AS releases. I think the JPA specification is liberal
on this. JPA 2.0 section 10.4.2 contains a (PersistenceUnit Annotation) requirement that
the unitName match only if its specified.
"The optional unitName element refers to the name of the persistence unit as defined
in the persistence.xml file. If the unitName element is specified, the persistence unit
for the entity manager factory that is accessible in JNDI must have the same name.
"
Deployment error should result when ambiguous injection is specified
--------------------------------------------------------------------
Key: AS7-2275
URL:
https://issues.jboss.org/browse/AS7-2275
Project: Application Server 7
Issue Type: Bug
Components: JPA / Hibernate
Reporter: Stuart Douglas
Assignee: Scott Marlow
If no name is specified PersistenceUnitSearch.resolvePersistenceUnitSupplier will return
a PU at random, rather than throwing an exception if more than one PU is found.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira