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 (1) WAS version as well as (2) the WAS container in which Hibernate will be utilized.
WebSphereExtendedJTATransactionLookup is reported to work on WAS version 6 in any of the standard J2EE/JEE component containers.
| Modifier and Type | Class and Description |
|---|---|
| public static class |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | getTransactionIdentifier(Transaction
The transaction to be identified. transaction)Implements org. |
| public TransactionManager | getTransactionManager(Properties
The configuration properties. props)Implements org. TransactionManager.
|
| public String | getUserTransactionName()
Implements org. javax. for this platform or null;
optional operation.
|
| WebSphereExtendedJTATransactionLookup | back to summary |
|---|---|
| public WebSphereExtendedJTATransactionLookup() | |
| getTransactionIdentifier | back to summary |
|---|---|
| public Object getTransactionIdentifier(Transaction transaction) 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 JEE containers (although WebSphere is still the only known such brain-dead, sales-driven impl).
| |
| getTransactionManager | back to summary |
|---|---|
| public TransactionManager getTransactionManager(Properties props) Implements org. Doc from org. Obtain the JTA
| |
| getUserTransactionName | back to summary |
|---|---|
| public String getUserTransactionName() Implements org. Doc from org. Return the JNDI namespace of the JTA
| |
| Modifier and Type | Class and Description |
|---|---|
| public class |
| Modifier and Type | Field and Description |
|---|---|
| private Object | |
| private final Method | |
| private final Properties | |
| private final Method | |
| private final Class |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | begin()
Implements javax. |
| public void | commit()
Implements javax. |
| public int | getStatus()
Implements javax. |
| public Transaction | getTransaction()
Implements javax. |
| public void | resume(Transaction
The txn)Transaction object that represents the
transaction to be resumed.Implements javax. |
| public void | rollback()
Implements javax. |
| public void | setRollbackOnly()
Implements javax. |
| 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 javax. |
| public Transaction | suspend()
Implements javax. |
| extendedJTATransaction | back to summary |
|---|---|
| private Object extendedJTATransaction | |
| getLocalIdMethod | back to summary |
|---|---|
| private final Method getLocalIdMethod | |
| properties | back to summary |
|---|---|
| private final Properties properties | |
| registerSynchronizationMethod | back to summary |
|---|---|
| private final Method registerSynchronizationMethod | |
| synchronizationCallbackClass | back to summary |
|---|---|
| private final Class<T> synchronizationCallbackClass | |
| TransactionManagerAdapter | back to summary |
|---|---|
| private TransactionManagerAdapter(Properties props) throws HibernateException | |
| begin | back to summary |
|---|---|
| public void begin() throws NotSupportedException, SystemException Implements javax. Doc from javax. Create a new transaction and associate it with the current thread.
| |
| commit | back to summary |
|---|---|
| public void commit() throws UnsupportedOperationException Implements javax. Doc from javax. 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 javax. Doc from javax. Obtain the status of the transaction associated with the current thread.
| |
| getTransaction | back to summary |
|---|---|
| public Transaction getTransaction() throws SystemException Implements javax. Doc from javax. 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 javax. Doc from javax. 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 javax. Doc from javax. 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 javax. Doc from javax. 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 javax. Doc from javax. 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 javax. Doc from javax. 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 javax. |
| public boolean | delistResource(XAResource
The XAResource object associated with the resource
(connection). resource, int One of the values of TMSUCCESS, TMSUSPEND, or TMFAIL. i)Implements javax. |
| public boolean | enlistResource(XAResource
The XAResource object associated with the resource
(connection). resource)Implements javax. |
| public boolean | equals(Object
the reference object with which to compare. other)Overrides java. |
| private Object | |
| public int | getStatus()
Implements javax. |
| public int | |
| public void | registerSynchronization(final Synchronization
The Synchronization object for the transaction associated
with the target object. synchronization)Implements javax. |
| public void | rollback()
Implements javax. |
| public void | setRollbackOnly()
Implements javax. |
| TransactionAdapter | back to summary |
|---|---|
| private TransactionAdapter(Properties props) | |
| commit | back to summary |
|---|---|
| public void commit() throws UnsupportedOperationException Implements javax. Doc from javax. Complete the transaction represented by this Transaction object. | |
| delistResource | back to summary |
|---|---|
| public boolean delistResource(XAResource resource, int i) throws UnsupportedOperationException Implements javax. Doc from javax. Disassociate the resource specified from the transaction associated with the target Transaction object.
| |
| enlistResource | back to summary |
|---|---|
| public boolean enlistResource(XAResource resource) throws UnsupportedOperationException Implements javax. Doc from javax. Enlist the resource specified with the transaction associated with the target Transaction object.
| |
| equals | back to summary |
|---|---|
| public boolean equals(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 Getter for property 'localId'.
| |
| getStatus | back to summary |
|---|---|
| public int getStatus() Implements javax. Doc from javax. 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 javax. Doc from javax. 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 javax. Doc from javax. Rollback the transaction represented by this Transaction object. | |
| setRollbackOnly | back to summary |
|---|---|
| public void setRollbackOnly() throws UnsupportedOperationException Implements javax. Doc from javax. Modify the transaction associated with the target object such that the only possible outcome of the transaction is to roll back the transaction. | |