Java Transaction API (JTA) UserTransaction

The Java Transaction API (JTA) UserTransaction type allows JDBC, JMS, ActiveEnterprise Adapter (using JMS transports), and EJB activities to participate in transactions. JTA specifies standard Java interfaces between a transaction manager and the parties involved in a distributed transaction system: the resource manager, the application server, and the application. Sun Microsystems developed and maintains the API. For more information about the API, see http://java.sun.com/products/jta/.

Note: For activities that use the JMS transport, request/reply operations cannot participate in a JTA transaction.

Using this type of transaction requires an installed and configured application server that implements the JTA interface javax.transaction.UserTransaction. For example, the following transaction servers implement the JTA transaction interface:

  • BEA WebLogic Application Server

  • IBM Websphere Application Server

  • JBoss Application Server

Note: Not all application servers permit JMS and JDBC operations to participate in the JTA transaction. For more information about supported operations, refer to your application server documentation. If the application server does not permit an operation, ActiveMatrix BusinessWorks still allows you to configure the operations in the transaction. However, no exception is raised and the operations that are not supported by the application server are performed independent of the transaction.

If the transaction commits, all eligible activities in the transaction group commit. If the transaction rolls back, all eligible activities in the transaction group roll back. The transaction group commits automatically if all activities in the group complete and a non-error transition is taken out of the transaction group. If any errors occur while processing the activities in the group, even errors in activities that do not participate in the transaction, the transaction is rolled back and an error is returned. You should create an error transition out of the group to handle this situation.