public final class RemotePersistence extends Persistence
Persistence
which is intended to be used with a
database instance managed by a remote P2J server. Most work is executed
directly against the database via Hibernate; however, certain services
must be serialized through the remote P2J server instance. These include:
LockManager
implementation
(RemoteLockManager
, which delegates requests for locking
services to the remote server.
IdentityManager
implementation (RemoteIdentityManager
).
Modifier and Type | Field and Description |
---|---|
private Session |
session
Network session with remote server
|
ID_GEN_SEQUENCE
Constructor and Description |
---|
RemotePersistence(Database database,
org.hibernate.dialect.Dialect dialect)
Construct an instance for a particular, physical database, storing the
dialect class which Hibernate uses to create a portability layer.
|
Modifier and Type | Method and Description |
---|---|
protected IdentityManager |
createIdentityManager()
Create and initialize the identity manager to be used with this instance
of persistence services.
|
protected LockManager |
createLockManager()
Create and initialize the lock manager to be used with this instance of
persistence services.
|
attach, beginTransaction, cleanup, commit, delete, deleteOrUpdate, detach, equals, executeSQL, executeSQL, executeSQLBatch, executeSQLQuery, executeSQLQuery, executeSQLQuery, flush, flushBatch, flushMetaLockEvents, get, getDatabase, getDialect, getIdentityManager, getLockManager, getRecordLockContext, getSession, getSingleSQLResult, hashCode, initialize, initializeInstance, isActive, isTransactionOpen, list, list, load, load, load, load, load, lock, lock, lockTable, merge, message, nextPrimaryKey, popImplicitTransaction, preprocessQueryParameter, pushImplicitTransaction, queryLock, quickLoad, quickLoad, rollback, save, scroll, scroll, scroll, scroll
private final Session session
public RemotePersistence(Database database, org.hibernate.dialect.Dialect dialect)
database
- Database with which this instance is permanently associated.dialect
- Portability object used by Hibernate to issue commands to the
database.protected LockManager createLockManager()
createLockManager
in class Persistence
protected IdentityManager createIdentityManager()
createIdentityManager
in class Persistence