Charles Moulliard created ARIES-945:
---------------------------------------
Summary: Allow PersistenceBundleHelper to find persistence.xml
files in bundles even if Meta-Persistence header is not defined
Key: ARIES-945
URL: https://issues.apache.org/jira/browse/ARIES-945
Project: Aries
Issue Type: Improvement
Reporter: Charles Moulliard
When a bundle containing on persistence.xml file is deployed on Karaf and using
Aries JPA, Aries Tx, the following exception is generated as Aries is not able
to find a unit Name to inject it in the EntityManager factory bean
{code}
2012-10-19 13:35:05,741 | DEBUG | l Console Thread | BlueprintEventDispatcher
| 9 - org.apache.aries.blueprint - 0.3.
1 | Sending blueprint container event BlueprintEvent[type=GRACE_PERIOD,
dependencies=[(&(&(org.apache.aries.jpa.pr
oxy.factory=true)(osgi.unit.name=dlPersistenceUnit))(objectClass=javax.p
{code}
This problems occurs as the PersistenceBundleHelper class and more specifically
the method findPersistenceXmlFiles(Bundle bundle) does not search for bundles
containing persistence.xml files (not declared in the header of the MANIFEST
file)
Code could be improved to generate a more helpfull message (persistent unit not
found) or allow the PersistenceBundleHelper class to work with bundles without
Meta-Persistence header defined
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira