Use the transaction service
In WebSphere Application Server, applications can use transactions to coordinate multiple updates to resources as atomic units (as indivisible units of work) such that all or none of the updates are made permanent.
In WAS, transactions are managed by three main components:
- A transaction manager. The transaction manager supports the enlistment of recoverable XAResources and ensures that each resource of this type is driven to a consistent outcome either at the end of a transaction or after a failure and restart of the application server.
(ZOS) Also, WAS for z/OS supports the coordination of resource managers through RRS (z/OS resource recovery services).
- A container in which the enterprise application runs. The container manages the enlistment of XAResources on behalf of the application when the application performs updates to transactional resource managers (for example, databases). Optionally, the container can control the demarcation of transactions for enterprise beans configured for container-managed transactions.
- An application programming interface, UserTransaction, available to bean-managed enterprise beans and servlets. These application components can use the UserTransaction interface to control the demarcation of their own transactions.
For details about the methods available with the UserTransaction interface, see the Java Transaction API (JTA) 1.1 Specification.
Also, Java Transaction API (JTA) support includes additional application programming interfaces so that application frameworks can manipulate the unit of work (UOW) context of a thread, and components can register with a JTA transaction (for example, a persistence manager can be notified of transaction completion).
Use the following tasks to work with transactions in WAS applications:
Tasks
- Developing components to use transactions
- Configure transaction properties for an application server
- Configure transaction properties for peer recovery
- Manage manual peer recovery of the transaction service
- Manage active and prepared transactions
- Manage active and prepared transactions by
- Manage transaction logging for optimum server availability
- Interoperating transactionally between application servers
- Use WS-Transaction policy to coordinate transactions or business activities for web services
- Troubleshoot transactions
- Use one-phase and two-phase commit resources in the same transaction
- Use the ActivitySession service
Subtopics
- Transaction support in WAS
- Administer the transaction service
- Transactional high availability
- Configure an application server to log heuristic reporting
- Tune for applications that access CICS in z/OS
- Tune GRS when using global transactions in z/OS
Related:
JTA support Use the ActivitySession service Use one-phase and two-phase commit resources in the same transaction Manage active and prepared transactions Manage active and prepared transactions by Manage manual peer recovery of the transaction service Manage transaction logging for optimum server availability Configure transaction properties for an application server Use WS-Transaction policy to coordinate transactions or business activities for web services Configure transaction properties for peer recovery Transaction service exceptions Additional Application Programming Interfaces (APIs) Transaction service custom properties Local transaction containment Java Transaction API (JTA) 1.1 Specification