WAS v8.5 > End-to-end paths > EJB applicationsUse 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.
- 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, that is 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:
- Develop components to use transactions
- Configure transaction properties for an application server
- Manage active and prepared transactions
- Manage active and prepared transactions using wsadmin.sh
- Manage transaction logging for optimum server availability
- Interoperate transactionally between application servers
- Use WS-Transaction policy to coordinate transactions or business activities for web services
- Troubleshooting transactions
- Use one-phase and two-phase commit resources in the same transaction
- Use the ActivitySession service
Subtopics
- Transaction support in WAS
Support for transactions is provided by the transaction service within WAS. The way that applications use transactions depends on the type of application component.- Develop components to use transactions
These topics provide information about developing WebSphere application components to use transactions- Administer the transaction service
We can view or change settings for the transaction service and manage active and prepared transactions. We can configure transaction properties to enable peer recovery of failed application servers in a cluster.- Interoperate transactionally between application servers
We can configure application servers so that transaction messages are sent and received between application servers at different versions of WAS. Depending on the version of the application server, we can set system properties, or use the transaction coordination authorization setting.- Configure an application server to log heuristic reporting
We can configure the transaction service for an application server to indicate whether to log the transaction service is about to commit a one-phase commit resource. This configuration is useful when we use last participant support, when there is an increased risk that a transaction has an heuristic outcome.- Troubleshooting transactions
Use this overview task to help resolve a problem that you think is related to the Transaction service.
Related concepts:
JTA support
Related
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 using wsadmin.sh
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
Reference:
Transaction service exceptions
Additional Application Programming Interfaces (APIs)
Transaction service custom properties
Local transaction containment
Related information:
Java Transaction API (JTA) 1.1 Specification