wangscript / warp-persist

Automatically exported from code.google.com/p/warp-persist
0 stars 0 forks source link

Make warp-persist more extensible #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This is a patch to make warp-persist a bit more extensible in terms of what
kinds of persistence frameworks it can be used for as described in this
group thread <http://groups.google.com/group/warp-core/t/c74dab2449df234d>.

It maintains backwards compatibility with previous versions of warp-persist
while allowing users to provide their own ways of specifying a persistence
module doing something like the following:

                PersistenceService.using(new HibernatePersistModule())
                    .across(UnitOfWork.REQUEST)
                    .transactedWith(TransactionStrategy.LOCAL)
                    .forAll(Matchers.any())
                    .buildModule();

To do this, the PersistenceModule wraps the passed in PersistModule and
calls the configure(Binder) method to allow the PersistModule to setup its
bindings.  The PersistenceModule then gets the transaction interceptor and
finder interceptor from the PersistModule and binds them accordingly.

This changeset limits the number of changes to adding new
using(PersistModule) method and the PersistModule interface.  Please review
and let me know if you'd like me to make any further modifications.

Rich

Original issue reported on code.google.com by rwallace...@gmail.com on 13 Apr 2008 at 10:02

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by dha...@gmail.com on 14 Apr 2008 at 1:16