I am experimenting for some time with a new way to implement jpa support.
You can find the design on this website:
http://liquid-reality.de/display/liquid/New+design+for+aries+jpa
The prototype code is at:
https://github.com/cschneider/jpa-experiments
The goals for the new design are:
- Simpler and more robust implementation using OSGi service dynamics.
Tracking all dependencies and publishing / unpublishing
EntityManagerFactory when any go away
- Move some functionality to other projects like wrapping XA DataSources
to pax-jdbc.
- Support for other frameworks like declarative services using
JPATemplate and closures
The current code is not yet complete but already works for blueprint and DS.
I would be happy about any feedback.
Especially I would be interested if with the new approach Quiesce is
still necessary. The code already makes sure that the
EntityManagerFactory is nicely cleaned up. EntityManagers are only held
for the duration of a request. So if blueprint Quiesce shuts down the
requests then I think the jpa impls should not need to do additional
work here. I tested to update all modules at runtime and all seems to
work nicely. With the current aries jpa I can not update the persistence
unit bundles. See https://issues.apache.org/jira/browse/ARIES-1270
Christian
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
http://www.talend.com