|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.TransactionImpl
org.datanucleus.JTATransactionImpl
public class JTATransactionImpl
A transaction that is synchronized with a Java Transaction Service (JTA) transaction. Works only in a J2EE environments where a TranactionManager is present
When this feature is turned on, transactions must be controlled using javax.transaction.UserTransaction,
not e.g. using PM.currentTransaction().begin(). Should also work for SessionBeans, as
per spec UserTransaction reflects SessionBean-based tx demarcation.
Transaction
TODO Merge functionality with JTAJCATransactionImpl when J�rg/Erik document what each are providing.
| Field Summary | |
|---|---|
protected org.datanucleus.JTATransactionImpl.JoinStatus |
joinStatus
|
| Fields inherited from class org.datanucleus.TransactionImpl |
|---|
LOCALISER, nontransactionalRead, nontransactionalWrite, optimistic, restoreValues, retainValues, rollbackOnly, serializeRead |
| Fields inherited from interface org.datanucleus.Transaction |
|---|
TRANSACTION_ISOLATION_OPTION |
| Method Summary | |
|---|---|
void |
afterCompletion(int status)
This method is called by the transaction manager after the transaction is committed or rolled back. |
void |
beforeCompletion()
The beforeCompletion method is called by the transaction manager prior to the start of the two-phase transaction commit process. |
void |
begin()
"16.1.3 Stateless Session Bean with Bean Managed Transactions": "acquiring a PersistenceManager without beginning a UserTransaction results in the PersistenceManager being able to manage transaction boundaries via begin, commit, and rollback methods on javax. |
protected void |
checkTransactionJoin()
|
void |
commit()
Allow UserTransaction demarcation |
boolean |
isActive()
Accessor for whether the transaction is active. |
void |
rollback()
Allow UserTransaction demarcation |
void |
setRollbackOnly()
Allow UserTransaction demarcation |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.datanucleus.JTATransactionImpl.JoinStatus joinStatus
| Method Detail |
|---|
protected void checkTransactionJoin()
public boolean isActive()
Status.STATUS_NO_TRANSACTION, i.e. when the current thread is associated with a
JTA transaction.
isActive in interface TransactionisActive in class TransactionImplpublic void begin()
begin in interface Transactionbegin in class TransactionImplpublic void commit()
commit in interface Transactioncommit in class TransactionImplpublic void rollback()
rollback in interface Transactionrollback in class TransactionImplpublic void setRollbackOnly()
setRollbackOnly in interface TransactionsetRollbackOnly in class TransactionImplpublic void beforeCompletion()
beforeCompletion in interface javax.transaction.Synchronizationpublic void afterCompletion(int status)
afterCompletion in interface javax.transaction.Synchronizationstatus - The status
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||