public class DatabasePersistenceService extends java.lang.Object implements PersistenceService
| Constructor and Description |
|---|
DatabasePersistenceService(javax.sql.DataSource datasource, java.lang.String prefix)
constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
createTable()
helper method to create the table
|
void |
disposeSession(java.lang.String session)
callback to dispose a given session previously created but for which a persistence context has not been created.
|
java.util.Set<java.lang.String> |
getSessions()
returns the list of sessions that have been persisted.
|
void |
initialize(ConfigService configService)
callback to initialize the persistence service.
|
PersistenceContext |
newContext(ConfigContext context, boolean isLoad)
creates a new
PersistenceContext for the given ConfigContext. |
public DatabasePersistenceService(javax.sql.DataSource datasource,
java.lang.String prefix)
public void initialize(ConfigService configService) throws java.lang.Exception
initialize in interface PersistenceServicejava.lang.Exceptionpublic java.util.Set<java.lang.String> getSessions()
throws java.lang.Exception
getSessions in interface PersistenceServicejava.lang.Exceptionpublic void disposeSession(java.lang.String session)
disposeSession in interface PersistenceServicepublic PersistenceContext newContext(ConfigContext context, boolean isLoad) throws java.lang.Exception
PersistenceContext for the given ConfigContext.newContext in interface PersistenceServiceisLoad - whether the persistence context is created for a session being loaded or created.java.lang.Exceptionpublic void createTable()