Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle TopLink API Reference 10g Release 3 (10.1.3) B13698-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.toplink.transaction
Class JTATransactionController

`java.lang.Object
oracle.toplink.transaction.AbstractTransactionController
oracle.toplink.transaction.JTATransactionController`

All Implemented Interfaces:
  ExternalTransactionController

Direct Known Subclasses:
  JBossTransactionController, Oc4jTransactionController, WebLogicTransactionController, WebSphereTransactionController_5_0, WebSphereTransactionController_5_1

public class JTATransactionController
extends AbstractTransactionController

Purpose: TransactionController implementation for JTA 1.0

Description: Implements the required behaviour for controlling JTA 1.0 transactions. Specific JTA implementations may need to extend this class when special controller behavior is necessary.

The JTA TransactionManager must be obtained and set on the instance in order for a Synchronization listener to be registered against the transaction. This can be done either by extending this class and defining acquireTransactionManager() to return the manager for the server, or by using this class and explicitly calling the setTransactionManager() method on it after the fact. e.g. TransactionManager mgr = controller.jndiLookup("java:comp/TransactionManager"); controller.setTransactionManager(mgr);

If a different listener needs to be used for synchronization, the SynchronizationListenerFactory should be set on the controller instance. The listener subclass should implement the factory interface, so that setting the factory is simply a matter of assigning an instance of the listener. e.g. controller.setSynchronizationListenerFactory( new DifferentServerSynchronizationListener()); The default listener factory creates instances of JTATransactionListener.

See Also:
  `JTASynchronizationListener`, `AbstractTransactionController`

Constructor Summary
`JTATransactionController()` PUBLIC: Return a new controller for use with a JTA 1.0 compliant TransactionManager.

Method Summary
`javax.transaction.TransactionManager` | `getTransactionManager()` PUBLIC: Return the transaction manager used to control the JTA transactions.
`void` | `setTransactionManager(javax.transaction.TransactionManager mgr)` PUBLIC: Set the transaction manager used to control the JTA transactions.

Methods inherited from class oracle.toplink.transaction.AbstractTransactionController
`jndiLookup, logTxStateTrace, logTxTrace`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JTATransactionController

    public JTATransactionController()

  PUBLIC: Return a new controller for use with a JTA 1.0 compliant TransactionManager.

Method Detail

### getTransactionManager

    public javax.transaction.TransactionManager getTransactionManager()

  PUBLIC: Return the transaction manager used to control the JTA transactions.
  Returns:
    The JTA TransactionManager that is used to obtain transaction state information and control the active transaction.

### setTransactionManager

    public void setTransactionManager(javax.transaction.TransactionManager mgr)

  PUBLIC: Set the transaction manager used to control the JTA transactions.
  Parameters:
    `mgr` - A valid JTA TransactionManager that can be accessed by this controller to obtain transaction state information and control the active transaction.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 1998, 2006, Oracle. All Rights Reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD