Guice modules and other extensions to the Ninja Framework (http://www.ninjaframework.org).
A Guice Module
to enable programmatic configuration of Hibernate. See http://www.github.com/jcampos8782/guice-persist-hibernate).
Respects Ninja frameworks @UnitOfWork
and GuicePersist's @Transactional
annotations.
Exposed bindings:
Provider<Session>
Provider<UnitOfWork>
Provider<EntityManager>
Install just as you would any other Module
. Intended as a replacement (not a supplment) to Ninja Framework's JpaModule
.
public void configure(NinjaProperties ninjaProperties) {
install(new HibernateModule.Builder().entityProvider(SomeEntityClassProvider.class).propertyProvider(SomePropertyProvider.class).build());
}