I don't think this is a problem as it does exactly as what OSGi JPA spec
states ("A Persistence Bundle is a bundle that contains the
Meta-Persistence header. If this header is not present,
then this specification does not apply and a JPA Provider should ignore the
corresponding bundle.")
Thanks
EmilyOn Fri, Oct 19, 2012 at 1:40 PM, Charles Moulliard (JIRA) <[email protected]>wrote: > 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 > -- Thanks Emily ================= Emily Jiang [email protected]
