On 11-02-16 06:14 AM, Timothy Ward wrote:
2) This is what most people do, you can rely on the provider ignoring 
properties it doesn't understand so it is safe, though occasionally there are 
problems if different versions of the same provider need different values for 
the same property.

That's what I figured

4) This is possible if you write yourself a plugin to the Aries JPA container. You can provide a fragment that 
attaches to the JPA container bundle and provides a new ManagedPersistenceUnitInfoFactory implementation. If you 
have a "org.apache.aries.jpa.container.properties" file in the root of your fragment containing the line 
"org.apache.aries.jpa.container.ManagedPersistenceUnitInfoFactory=<your impl name>" you can provide 
a new implementation. I recommend delegating to the existing implementation, and simply wrapping the 
ManagedPersistenceUnitInfo that comes out so you can add your own entries to "getContainerProperties". 
This will let you add whatever properties you want to your persistence unit. Be careful that your fragment only 
attaches to the 0.3 or 0.4 incubating bundles. We reserve the right to make breaking implementation changes until 
we release 1.0!

Cool, I thought this one was probably impossible but I'm glad to learn it isn't.


Essentially I would say, don't do 1), you can't do 3), 2) is simple but a 
little unpleasant, 4) is hard to do but gives you the power to do pretty much 
anything.

I think for now we'll go with the "nasty but low-hanging fruit" nature of #2 but with #4 as a sweet refactoring to do when we can.

Let me know how you get on :)

Tim


Will do, thanks for the info :)

-Jamie

Reply via email to