WAS, unlike every other app server on the planet, does not allow direct access to the JTS TransactionManager. Instead, for common transaction-related tasks users must utilize a proprietary API known as ExtendedJTATransaction.
Even more unfortunate, the exact TransactionManagerLookup to use inside of WAS is highly dependent upon
This class is reported to work on WAS version 6 in any of the standard J2EE/Java EE component containers.
| Modifier and Type | Class and Description |
|---|---|
| public class |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected boolean | |
| public Object | getTransactionIdentifier(Transaction
The transaction to be identified. transaction)Overrides org. Implements org. |
| protected TransactionManager | |
| protected UserTransaction |
| UT_NAME | back to summary |
|---|---|
| public static final String UT_NAME | |
| WebSphereExtendedJtaPlatform | back to summary |
|---|---|
| public WebSphereExtendedJtaPlatform() | |
| canCacheTransactionManager | back to summary |
|---|---|
protected boolean canCacheTransactionManager()
| |
| getTransactionIdentifier | back to summary |
|---|---|
| public Object getTransactionIdentifier(Transaction transaction) Overrides org. Implements org. Doc from org. Determine an identifier for the given transaction appropriate for use in caching/lookup usages. Generally speaking the transaction itself will be returned here. This method was added specifically for use in WebSphere and other unfriendly Java EE containers.
| |
| locateTransactionManager | back to summary |
|---|---|
| protected TransactionManager locateTransactionManager() Implements abstract org.
| |
| locateUserTransaction | back to summary |
|---|---|
| protected UserTransaction locateUserTransaction() Implements abstract org.
| |
| Modifier and Type | Class and Description |
|---|---|
| public class |
| Modifier and Type | Field and Description |
|---|---|
| private Object | |
| private final Method | |
| private final Method | |
| private final Class |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | begin()
Implements jakarta. |
| public void | commit()
Implements jakarta. |
| public int | getStatus()
Implements jakarta. |
| public Transaction | getTransaction()
Implements jakarta. |
| public void | resume(Transaction
The txn)Transaction object that represents the
transaction to be resumed.Implements jakarta. |
| public void | rollback()
Implements jakarta. |
| public void | setRollbackOnly()
Implements jakarta. |
| public void | setTransactionTimeout(int
The value of the timeout in seconds. If the value is zero,
the transaction service restores the default value. If the value
is negative a SystemException is thrown. i)Implements jakarta. |
| public Transaction | suspend()
Implements jakarta. |
| extendedJTATransaction | back to summary |
|---|---|
| private Object extendedJTATransaction | |
| getLocalIdMethod | back to summary |
|---|---|
| private final Method getLocalIdMethod | |
| registerSynchronizationMethod | back to summary |
|---|---|
| private final Method registerSynchronizationMethod | |
| synchronizationCallbackClass | back to summary |
|---|---|
| private final Class<T> synchronizationCallbackClass | |
| TransactionManagerAdapter | back to summary |
|---|---|
| private TransactionManagerAdapter() throws HibernateException | |
| begin | back to summary |
|---|---|
| public void begin() throws NotSupportedException, SystemException Implements jakarta. Doc from jakarta. Create a new transaction and associate it with the current thread.
| |
| commit | back to summary |
|---|---|
| public void commit() throws UnsupportedOperationException Implements jakarta. Doc from jakarta. Complete the transaction associated with the current thread. When this method completes, the thread is no longer associated with a transaction.
| |
| getStatus | back to summary |
|---|---|
| public int getStatus() throws SystemException Implements jakarta. Doc from jakarta. Obtain the status of the transaction associated with the current thread.
| |
| getTransaction | back to summary |
|---|---|
| public Transaction getTransaction() throws SystemException Implements jakarta. Doc from jakarta. Get the transaction object that represents the transaction context of the calling thread.
| |
| resume | back to summary |
|---|---|
| public void resume(Transaction txn) throws UnsupportedOperationException Implements jakarta. Doc from jakarta. Resume the transaction context association of the calling thread with the transaction represented by the supplied Transaction object. When this method returns, the calling thread is associated with the transaction context specified.
| |
| rollback | back to summary |
|---|---|
| public void rollback() throws UnsupportedOperationException Implements jakarta. Doc from jakarta. Roll back the transaction associated with the current thread. When this method completes, the thread is no longer associated with a transaction.
| |
| setRollbackOnly | back to summary |
|---|---|
| public void setRollbackOnly() throws UnsupportedOperationException Implements jakarta. Doc from jakarta. Modify the transaction associated with the current thread such that the only possible outcome of the transaction is to roll back the transaction.
| |
| setTransactionTimeout | back to summary |
|---|---|
| public void setTransactionTimeout(int i) throws UnsupportedOperationException Implements jakarta. Doc from jakarta. Modify the timeout value that is associated with transactions started by the current thread with the begin method. If an application has not called this method, the transaction service uses some default value for the transaction timeout.
| |
| suspend | back to summary |
|---|---|
| public Transaction suspend() throws UnsupportedOperationException Implements jakarta. Doc from jakarta. Suspend the transaction currently associated with the calling thread and return a Transaction object that represents the transaction context being suspended. If the calling thread is not associated with a transaction, the method returns a null object reference. When this method returns, the calling thread is not associated with a transaction.
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | commit()
Implements jakarta. |
| public boolean | delistResource(javax.
The XAResource object associated with the resource
(connection). resource,One of the values of TMSUCCESS, TMSUSPEND, or TMFAIL. i)Implements jakarta. |
| public boolean | enlistResource(javax.
The XAResource object associated with the resource
(connection). resourceImplements jakarta. |
| public boolean | equals(@Nullable Object
the reference object with which to compare. other)Overrides java. |
| private Object | |
| public int | getStatus()
Implements jakarta. |
| public int | |
| public void | registerSynchronization(final Synchronization
The Synchronization object for the transaction associated
with the target object. synchronization)Implements jakarta. |
| public void | rollback()
Implements jakarta. |
| public void | setRollbackOnly()
Implements jakarta. |
| TransactionAdapter | back to summary |
|---|---|
| private TransactionAdapter() | |
| commit | back to summary |
|---|---|
| public void commit() throws UnsupportedOperationException Implements jakarta. Doc from jakarta. Complete the transaction represented by this Transaction object.
| |
| delistResource | back to summary |
|---|---|
| public boolean delistResource(javax. Implements jakarta. Doc from jakarta. Disassociate the resource specified from the transaction associated with the target Transaction object.
| |
| enlistResource | back to summary |
|---|---|
| public boolean enlistResource(javax. Implements jakarta. Doc from jakarta. Enlist the resource specified with the transaction associated with the target Transaction object.
| |
| equals | back to summary |
|---|---|
| public boolean equals(@Nullable Object other) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getLocalId | back to summary |
|---|---|
| private Object getLocalId() throws HibernateException | |
| getStatus | back to summary |
|---|---|
| public int getStatus() Implements jakarta. Doc from jakarta. Obtain the status of the transaction associated with the target Transaction object.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| registerSynchronization | back to summary |
|---|---|
| public void registerSynchronization(final Synchronization synchronization) throws RollbackException, IllegalStateException, SystemException Implements jakarta. Doc from jakarta. Register a synchronization object for the transaction currently associated with the target object. The transction manager invokes the beforeCompletion method prior to starting the two-phase transaction commit process. After the transaction is completed, the transaction manager invokes the afterCompletion method.
| |
| rollback | back to summary |
|---|---|
| public void rollback() throws UnsupportedOperationException Implements jakarta. Doc from jakarta. Rollback the transaction represented by this Transaction object.
| |
| setRollbackOnly | back to summary |
|---|---|
| public void setRollbackOnly() throws UnsupportedOperationException Implements jakarta. Doc from jakarta. Modify the transaction associated with the target object such that the only possible outcome of the transaction is to roll back the transaction.
| |