Minimize use of two-phase commit

Multiple database transactions require two-phase commit, and consequently execute more slowly than those that use only a single database. Review your application design and component transaction settings to make sure that two-phase commit is used only when the component work involved must be part of the same atomic unit of database work.

If a component inherits a transaction in an intercomponent call involving two or more database connections, EAServer uses two-phase commit. The component’s transaction attribute determines whether transactions can be inherited through intercomponent calls. For more information, see “Component properties: Transactions” in the EAServer Programmer’s Guide. For example, two-phase commit is required if the component’s transaction attribute is “Supports,” the component has been called from another component that has attribute “Requires,” and the components use different connection caches.

To avoid use of two-phase commit for a component’s database work, set the transaction attribute to “Requires New” after verifying that the work can be commit or rollback independently of the calling components transaction outcome. If a component performs updates to a noncritical database you can choose “Not Supported” as the component's transaction attribute to eliminate the overhead of using EAServer transactions at all. For example, the component may log usage statistics to a remote database.

If a component requires different transaction attributes for different contexts, you can create a copy of the component definition in EAServer Manager and change only the transaction attribute.