org.apache.ojb.broker.core
Class PersistenceBrokerFactorySyncImpl.PersistenceBrokerSyncImpl
java.lang.Object
org.apache.ojb.broker.core.DelegatingPersistenceBroker
org.apache.ojb.broker.core.PoolablePersistenceBroker
org.apache.ojb.broker.core.PersistenceBrokerFactorySyncImpl.PersistenceBrokerSyncImpl
- All Implemented Interfaces:
- Configurable, ObjectContainer, PBState, PersistenceBroker, javax.transaction.Synchronization
- Enclosing class:
- PersistenceBrokerFactorySyncImpl
- public static class PersistenceBrokerFactorySyncImpl.PersistenceBrokerSyncImpl
- extends PoolablePersistenceBroker
- implements javax.transaction.Synchronization
| Methods inherited from class org.apache.ojb.broker.core.DelegatingPersistenceBroker |
addListener, addListener, addMtoNImplementor, clearCache, configure, delete, deleteByQuery, deleteMtoNImplementor, fireBrokerEvent, fireBrokerEvent, fireBrokerEvent, getBroker, getClassDescriptor, getCollectionByQuery, getCollectionByQuery, getCount, getDelegate, getDescriptorRepository, getInnermostDelegate, getIteratorByQuery, getObjectByIdentity, getObjectByQuery, getPBKey, getPKEnumerationByQuery, getReportQueryIteratorByQuery, getTopLevelClass, hasClassDescriptor, isClosed, isInTransaction, query, removeAllListeners, removeAllListeners, removeFromCache, removeListener, retrieveAllReferences, retrieveReference, serviceBrokerHelper, serviceConnectionManager, serviceJdbcAccess, serviceObjectCache, serviceSequenceManager, serviceSqlGenerator, serviceStatementManager, setClosed, setDelegate, store, store |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PersistenceBrokerFactorySyncImpl.PersistenceBrokerSyncImpl
public PersistenceBrokerFactorySyncImpl.PersistenceBrokerSyncImpl(PersistenceBroker broker,
org.apache.commons.pool.KeyedObjectPool pool)
beforeCompletion
public void beforeCompletion()
- Specified by:
beforeCompletion in interface javax.transaction.Synchronization
afterCompletion
public void afterCompletion(int status)
- Specified by:
afterCompletion in interface javax.transaction.Synchronization
close
public boolean close()
- Description copied from interface:
PersistenceBroker
- Close this PersistenceBroker so that no further requests may be made on it.
A PersistenceBroker instance can be used only until it is closed.
Closing a PersistenceBroker might release it to the pool of
available PersistenceBrokers, or might be garbage collected, at the option of the implementation.
- Specified by:
close in interface PersistenceBroker- Overrides:
close in class PoolablePersistenceBroker
beginTransaction
public void beginTransaction()
throws TransactionInProgressException,
TransactionAbortedException
- Description copied from interface:
PersistenceBroker
- Begin a transaction against the underlying RDBMS.
Calling
beginTransaction multiple times,
without an intervening call to commitTransaction or abortTransaction,
causes the exception TransactionInProgressException to be thrown
on the second and subsequent calls.
- Specified by:
beginTransaction in interface PersistenceBroker- Overrides:
beginTransaction in class DelegatingPersistenceBroker
- Throws:
TransactionInProgressException
TransactionAbortedException
commitTransaction
public void commitTransaction()
throws TransactionNotInProgressException,
TransactionAbortedException
- Description copied from interface:
PersistenceBroker
- Commit and close the transaction.
Calling
commit commits to the database all
UPDATE, INSERT and DELETE statements called within the transaction and
releases any locks held by the transaction.
If beginTransaction() has not been called before a
TransactionNotInProgressException exception is thrown.
If the transaction cannot be commited a TransactionAbortedException exception is thrown.
- Specified by:
commitTransaction in interface PersistenceBroker- Overrides:
commitTransaction in class DelegatingPersistenceBroker
- Throws:
TransactionNotInProgressException
TransactionAbortedException
abortTransaction
public void abortTransaction()
throws TransactionNotInProgressException
- Description copied from interface:
PersistenceBroker
- Abort and close the transaction.
Calling abort abandons all persistent object modifications and releases the
associated locks.
If transaction is not in progress a TransactionNotInProgressException is thrown
- Specified by:
abortTransaction in interface PersistenceBroker- Overrides:
abortTransaction in class DelegatingPersistenceBroker
- Throws:
TransactionNotInProgressException
Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14