org.exolab.castor.jdo.engine

Class TransactionContextImpl


(package private) final class TransactionContextImpl
extends TransactionContext

A transaction context is required in order to perform operations against the database. The transaction context is mapped to javax.transaction.Transaction for the ODMG API and into javax.transaction.xa.XAResource for XA databases. The only way to begin a new transaction is through the creation of a new transaction context. All database access must be performed through a transaction context.
Version:
$Revision: 1.2 $ $Date: 2003/03/03 17:14:16 $
Author:
Assaf Arkin

Nested Class Summary

Nested classes/interfaces inherited from class org.exolab.castor.persist.TransactionContext

TransactionContext.ObjectEntry

Field Summary

Fields inherited from class org.exolab.castor.persist.TransactionContext

OBJECT_STATE_HOLLOW, OBJECT_STATE_PERSISTENT, OBJECT_STATE_PERSISTENT_DELETED, OBJECT_STATE_PERSISTENT_NEW, OBJECT_STATE_PERSISTENT_NEW_DELETED, OBJECT_STATE_READ_ONLY, OBJECT_STATE_TRANSIENT

Constructor Summary

TransactionContextImpl(Database db, boolean globalTx)
Create a new transaction context.

Method Summary

protected void
closeConnections()
protected void
commitConnections()
Object
getConnection(LockEngine engine)
protected void
rollbackConnections()

Methods inherited from class org.exolab.castor.persist.TransactionContext

addObjectEntry, addTxSynchronizable, close, closeConnections, commit, commitConnections, create, delete, fetch, getClassLoader, getConnection, getDatabase, getIdentity, getLockTimeout, getObjectEntry, getObjectEntry, getObjectState, getReadOnlyObjectEntry, getScope, getStatus, getTransactionTimeout, getWaitOnLock, getXid, isAutoStore, isDeleted, isDeletedByOID, isDepended, isOpen, isPersistent, isReadOnly, isRecorded, load, load, makeReadOnly, markCreate, markDelete, markModified, markUpdate, prepare, query, query, rehash, release, removeObjectEntry, removeTxSynchronizable, rollback, rollbackConnections, setAutoStore, setCallback, setInstanceFactory, setLockTimeout, setTransactionTimeout, setWaitOnLock, softLock, toDatabaseAccessMode, txcommitted, txrolledback, update, writeLock

Constructor Details

TransactionContextImpl

public TransactionContextImpl(Database db,
                              boolean globalTx)
Create a new transaction context.

Method Details

closeConnections

protected void closeConnections()
            throws TransactionAbortedException
Overrides:
closeConnections in interface TransactionContext

commitConnections

protected void commitConnections()
            throws TransactionAbortedException
Overrides:
commitConnections in interface TransactionContext

getConnection

public Object getConnection(LockEngine engine)
            throws PersistenceException
Overrides:
getConnection in interface TransactionContext

rollbackConnections

protected void rollbackConnections()
Overrides:
rollbackConnections in interface TransactionContext

Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com