Wideplay's Persistence Support for any Guice application目前支持所有的Guice应用
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:
你需要把warap-persist-1.0.jar放到你的classpath里面。你可以在多个层面使用此技术。并不是非得在serverl或者Web 上下文中使用。目前支持
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).
他可以在一个JEE的容器中,一个简单的servlet环境或者一个纯粹的SE环境,比如桌面应用(有一些明显的限制,不能在servlet环境外使用 session-per-http-request 策略)
Using the Persistence Modules
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:
Hibernate 或者 JPA(任何实现)都可以通过一个简单的配置过程来支持。下面是一些与他们交互的详细说明
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.
Compatibility with
Servlets and
Warp
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.
Contribute to the
Warp Framework
Get involved! Email us on the
Warp mailing list if you want to help, have praise or have a problem to report. Problems with Guice should be reported on the
Guice user mailing list.