Re: Attaching jpa persistence.xml via fragments to a persistence bundle

2011-06-20 Thread Alasdair Nottingham
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,

Re: Attaching jpa persistence.xml via fragments to a persistence bundle

2011-06-20 Thread Marcel Hanser
Thank for you answers, so a usage of fragments failes I realy reluctant would create n (dbms) * m (jpa provider) * k (log level) * etc times bundles, with the same classes and just deversity persistence.xml. Do you have a best practice for me how to reference a persistence.xml (or just

RE: Attaching jpa persistence.xml via fragments to a persistence bundle

2011-06-20 Thread Timothy Ward
Hi, If the properties you are trying to set are configurable when the EntityManager is created then you could pass them using EMF#createEntityManager(Map props). There's also xml syntax for injecting these with blueprint: bean id=contextWithProps jpa:context property=em map