Hi,

getResource does something very different from getEntry. getResource uses the 
Bundle-Classpath so it doesn't guarantee to return META-INF/persistence.xml 
rooted in the bundle. That is why getResource is not used. 

I don't know why fragments aren't processed, other people in the list can, I'm 
sure, explain why.

Alasdair Nottingham

On 20 Jun 2011, at 07:56, Marcel Hanser <marcel.hanser.w...@googlemail.com> 
wrote:

> Hi,
> 
> i would like to attach a persistence.xml, or more percise parts of it,
> to my jpa persistence bundle, since the concrete provider and DBMS
> configuration should be chooseable without modify the persistence
> bundle.
> I scanned a the aries jpa code and found the
> org.apache.aries.jpa.container.ManagedPersistenceUnitInfoFactory
> plug-in point and also the
> org.apache.aries.jpa.container.impl.PersistenceBundleHelper.locateFile(Bundle,
> String) method. And now im wondering why using bundle.getEntry(String)
> instead of bundle.getResource(String). Since fragments are not scanned
> when using bundle.getEntry(String).
> So is there already a way for doing that and i just missed it?
> 
> Thanks in advance.
> 
> Marcel Hanser

Reply via email to