From your friendly neighborhood wideplay folk.
Warp-persist is currently on version 1.0 and licensed under the Apache 2.0 license.
All you need is to drop in a build of warp-persist (warp-persist-1.0.jar) into your classpath. You can use warp-persist at various levels. It is not necessary, for example, that you use it in a Servlet or Web context at all. Current we support:
- Hibernate 3.1
- Java Persistence API (sometimes called JPA or EJB3 persistence)
- Db4Objects (a lightweight object database)
It works inside a Java EE container, inside a plain Servlet environment or in a purely SE environment such as a desktop application (with obvious limitations--cant use session-per-http-request strategy outside a servlet environment for instance).
Either Hibernate or JPA (with any compliant vendor implementation) is supported with a few simple configuration steps. Here are detailed guides on integrating persistence in any guice application:
- Using the Hibernate Module
- Using the JPA Module
- Working with Dynamic Finders (a powerful query abstraction for either Hibernate or JPA)
- Using the Db4o Module
- Understanding transaction semantics
Warp-persist supports simple local transactions (sometimes called RESOURCE_LOCAL transactions) and various unit-of-work semantics; both with the same declarative, annotation-based API. Switching between unit-of-work strategies is as simple as changing a configuration option.
Warp-persist also follows the Guice idioms of using simple, expressive, fluent builders for configuration and tries to remain type-safe as far as possible.
Warp-persist does not have any dependency on Guice's servlet support or even our own warp-servlet. It can be used together with or separate from it entirely. The persistence module has no dependency on any other Warp modules. They can be used together or independently.