[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.rt.eclipselink] Re: OSGI troubles with createEntityManagerFactory

1) When I don't specify any properties:
   Persistence.createEntityManagerFactory("unitname");

The OSGiPersistenceInitializationHelper#getClassLoader is called with "bundleresource://7/unitname" and doesn't find an entry for this, because the map contains only a key "unitname".

2) When I specify Thread.currentThread().getContextClassLoader() as a class loader property, this class loader doesn't find the resource "META-INF/persistence.xml" in PersistenceProvider#createEntityManagerFactory:95.

Well ok. With a class loader property "this.getClass().getClassLoader()" it works.


Beat