The transaction service provides the following functionality. Note that with Application Server, a transaction service is started as an in-process of the J2EE server.
- Controlling the start, commit conclusion, and rollback conclusion of global transactions
This functionality controls the transaction processing using the two-phase commit protocol. The two-phase commit protocol is a method that separates the processing at the synchronization points into two stages, the prepare processing (resource update preparation) and the commit processing (resource update processing). With the two-phase commit protocol, you can synchronize, commit, or roll back multiple resource objects such as DBMS. Also, even if an error occurs during the transaction processing, you can consistently and automatically roll back all the resource objects with the two-phase commit protocol.
- Propagating the transaction context (Invoking Enterprise Beans using the RMI-IIOP)
This functionality manages the transaction context that indicates the state of the global transaction. For example, when a client, such as a servlet/ JSP, invokes the remote Enterprise Bean method, this functionality transmits the client-side transaction context to the server-side Enterprise Bean.
- System recovery by managing the transaction information using the status files and restarting the J2EE server after an error occurs
When the J2EE server stops due to a system error, this functionality recovers the transaction processing of the application programs that were running, and rolls back or commits the transaction processing. Whether the transaction is rolled back or committed is determined based on the extent to which the transaction processing has progressed. From the two-phase commit, if the transaction processing has progressed until the pre-completion of the first phase, the global transaction is rolled back. If the first phase from the two-phase commit is complete, the global transaction is rolled back or committed according to the decision for the root transaction branch.
- Duplicating the status file
When you use the status file duplication functionality, if an error occurs on the disk where one status file is allocated, the transaction is recovered using the other status file #. However, if you use this functionality, the disk is accessed twice, so the online processing response time is delayed.
- #
- The online processing cannot be continued.
- Reporting errors during heuristic conclusion in the resource manager
When a heuristic conclusion is detected in the resource manager for resources such as databases, this functionality reports the error through messages.