|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ojb.odmg.TransactionImpl
org.apache.ojb.odmg.J2EETransactionImpl
public class J2EETransactionImpl
Implementation for use in managed environments.
Field Summary |
---|
Fields inherited from interface org.odmg.Transaction |
---|
READ, UPGRADE, WRITE |
Constructor Summary | |
---|---|
J2EETransactionImpl(ImplementationImpl implementation)
|
Method Summary | |
---|---|
void |
abort()
Abort and close the transaction. |
void |
afterCompletion(int status)
FOR internal use. |
void |
beforeCompletion()
FOR internal use. |
void |
checkpoint()
Commit the transaction, but reopen the transaction, retaining all locks. |
void |
commit()
Commit and close the transaction. |
boolean |
isInExternTransaction()
|
void |
join()
Attach the caller's thread to this Transaction and detach the
thread from any former Transaction the thread may have been
associated with. |
void |
leave()
Detach the caller's thread from this Transaction , but do not
attach the thread to another Transaction . |
void |
setInExternTransaction(boolean mode)
|
Methods inherited from class org.apache.ojb.odmg.TransactionImpl |
---|
afterLoading, afterMaterialization, beforeLoading, beforeMaterialization, begin, clearRegistrationList, configure, deletePersistent, flush, getAssociatedDatabase, getBroker, getBrokerInternal, getGUID, getImplementation, getNamedRootsMap, getObjectByIdentity, getRegistrationList, isDeleted, isImplicitLocking, isOpen, isOrdering, lock, lockAndRegister, lockAndRegister, markDelete, markDirty, setCascadingDelete, setCascadingDelete, setImplicitLocking, setOrdering, tryLock |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public J2EETransactionImpl(ImplementationImpl implementation)
Method Detail |
---|
public void setInExternTransaction(boolean mode)
public boolean isInExternTransaction()
public void join()
TransactionImpl
Transaction
and detach the
thread from any former Transaction
the thread may have been
associated with.
join
in interface Transaction
join
in class TransactionImpl
public void leave()
TransactionImpl
Transaction
, but do not
attach the thread to another Transaction
.
leave
in interface Transaction
leave
in class TransactionImpl
public void checkpoint()
TransactionImpl
checkpoint
commits persistent object modifications
made within the transaction since the last checkpoint to the database. The
transaction retains all locks it held on those objects at the time the
checkpoint was invoked.
checkpoint
in interface Transaction
checkpoint
in class TransactionImpl
public void afterCompletion(int status)
afterCompletion
in interface javax.transaction.Synchronization
Synchronization
public void beforeCompletion()
beforeCompletion
in interface javax.transaction.Synchronization
Synchronization
public void commit()
TransactionImpl
commit
commits to
the database all persistent object modifications within the transaction and
releases any locks held by the transaction. A persistent object
modification is an update of any field of an existing persistent object, or
an update or creation of a new named object in the database. If a
persistent object modification results in a reference from an existing
persistent object to a transient object, the transient object is moved to
the database, and all references to it updated accordingly. Note that the
act of moving a transient object to the database may create still more
persistent references to transient objects, so its referents must be
examined and moved as well. This process continues until the database
contains no references to transient objects, a condition that is guaranteed
as part of transaction commit. Committing a transaction does not remove
from memory transient objects created during the transaction.
The updateObjectList contains a list of all objects for which this transaction
has write privledge to. We need to update these objects.
commit
in interface Transaction
commit
in class TransactionImpl
public void abort()
TransactionImpl
abort
in interface Transaction
abort
in class TransactionImpl
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |