com.google.inject.persist.PersistService |
Persistence provider service. Use this to manage the overall startup and stop of the persistence module(s). TODO(dhanji): Integrate with Service API when appropriate.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Starts the underlying persistence engine and makes guice-persist ready for
use.
| |||||||||||
Stops the underlying persistence engine.
|
Starts the underlying persistence engine and makes guice-persist ready for use. For instance, with JPA, it creates an EntityManagerFactory and may open connection pools. This method must be called by your code prior to using any guice-persist or JPA artifacts. If already started, calling this method does nothing, if already stopped, it also does nothing.
Stops the underlying persistence engine. For instance, with JPA, it
closes the EntityManagerFactory
. If already stopped, calling this
method does nothing. If not yet started, it also does nothing.