Methods Summary |
---|
protected javax.transaction.TransactionManager | acquireTransactionManager()INTERNAL:
Obtain and return the JTA TransactionManager on this platform.
By default do nothing.
This method can be can be overridden by subclasses to obtain the
transaction manager by whatever means is appropriate to the server.
This method is invoked by the constructor to initialize the transaction
manager at instance-creation time. Alternatively the transaction manager
can be set directly on the controller instance using the
setTransactionManager() method after the instance has been created.
return null;
|
protected void | beginTransaction_impl()INTERNAL:
Begin an external transaction.
getTransactionManager().begin();
|
protected boolean | canBeginTransaction_impl(java.lang.Object status)INTERNAL:
Return true if the status indicates that a transaction can be started. This
would normally mean that no transaction is currently active.
return getIntStatus(status) == Status.STATUS_NO_TRANSACTION;
|
protected boolean | canCommitTransaction_impl(java.lang.Object status)INTERNAL:
Return true if the status indicates that a transaction can be committed. This
would normally mean that a transaction is currently active.
return getIntStatus(status) == Status.STATUS_ACTIVE;
|
protected boolean | canIssueSQLToDatabase_impl(java.lang.Object status)INTERNAL:
Return true if the status indicates that the SQL should be issued to the db.
This would normally mean that a transaction was active.
int stat = getIntStatus(status);
return ((stat == Status.STATUS_ACTIVE) || (stat == Status.STATUS_PREPARING));
|
protected boolean | canMergeUnitOfWork_impl(java.lang.Object status)INTERNAL:
Return true if the status indicates that the unit of work should be merged
into the shared cache. This would normally mean that the transaction was
committed successfully.
return getIntStatus(status) == Status.STATUS_COMMITTED;
|
protected boolean | canRollbackTransaction_impl(java.lang.Object status)INTERNAL:
Return true if the status indicates that a transaction can be rolled back. This
would normally mean that a transaction is currently active.
return getIntStatus(status) == Status.STATUS_ACTIVE;
|
protected void | commitTransaction_impl()INTERNAL:
Commit the external transaction.
getTransactionManager().commit();
|
protected int | getIntStatus(java.lang.Object status)INTERNAL:
Convenience method to return the int value of the transaction status.
Assumes that the status object is an Integer.
return ((Integer)status).intValue();
|
protected java.lang.Object | getTransactionKey_impl(java.lang.Object transaction)INTERNAL:
Return a key for the specified external transaction object.
The key is just something that can be inserted into a hashtable (must support
hashCode() and equals() methods).
// Use the transaction itself as the key
return transaction;
|
public javax.transaction.TransactionManager | getTransactionManager()PUBLIC:
Return the transaction manager used to control the JTA transactions.
return transactionManager;
|
protected java.lang.Object | getTransactionStatus_impl()INTERNAL:
Return the transaction status as an object. We will pass around Integers that
wrap the int JTA status values.
return new Integer(getTransactionManager().getStatus());
|
protected java.lang.Object | getTransaction_impl()INTERNAL:
Return the active external transaction, or null if none is currently
active for this thread.
return getTransactionManager().getTransaction();
|
public boolean | isRolledBack_impl(java.lang.Object status)INTERNAL:
Return true if the transaction is rolled back.
return getIntStatus(status) == Status.STATUS_ROLLEDBACK;
|
protected void | markTransactionForRollback_impl()INTERNAL:
Mark the external transaction for rollback.
getTransactionManager().setRollbackOnly();
|
protected void | registerSynchronization_impl(oracle.toplink.essentials.transaction.AbstractSynchronizationListener listener, java.lang.Object txn)INTERNAL:
Register the specified synchronization listener with the given active
transaction.
((Transaction)txn).registerSynchronization((Synchronization)listener);
|
protected void | rollbackTransaction_impl()INTERNAL:
Roll back the external transaction.
getTransactionManager().rollback();
|
public void | setTransactionManager(javax.transaction.TransactionManager mgr)PUBLIC:
Set the transaction manager used to control the JTA transactions.
transactionManager = mgr;
|
protected java.lang.String | statusToString_impl(java.lang.Object status)
int statusCode = getIntStatus(status);
return codes[statusCode];
|