Set transactional attributes in the deployment descriptor

 

To set transactional attributes in the deployment descriptor for an application component (enterprise bean or servlet), complete the following steps:

  1. Start the Application Assembly Tool.

  2. Create or edit the application EAR file. For example, to change attributes of an existing application, click File-> Open then select the EAR file.

  3. In the navigation pane, select the component instance; for example:

    • For a session bean, expand ejb_module_instance-> Session beans then select the bean instance.

    • For a servlet, expand web_application-> Web Components then select the servlet instance.

    A property dialog notebook for the component is displayed in the property pane.

  4. In the property pane, select the Advanced tab.

  5. Set the Transaction type attribute, which defines the transactional manner in which the container invokes a method. One can set this attribute to Container or Bean, as follows:

  6. In the property pane, select the IBM Extensions tab.

  7. Configure J2EE component extensions attributes for extended local transaction containment. To enable management of local transaction containments, configure the following EJB extensions attributes. These attributes configure, for the component, the behaviour of the container's local transaction containment (LTC) environment that the container establishes whenever a global transaction is not present.

     

    Boundary

    Specifies the duration of a local transaction context. One can set this attribute to Bean method or ActivitySession, as described in Entity bean assembly settings.

    The ActivitySession option is not supported in the web container.

    This property can be changed on WAS Enterprise only.

     

    Resolution control

    Specifies how the local transaction is to be resolved before the local transaction context ends: by the application through user code or by the EJB container. One can set this attribute to either Application or ContainerAtBoundary, as described in Entity bean assembly settings.

     

    Unresolved action

    Specifies the action that the container must take when the local transaction context scope ends, if resources are uncommitted by an application in a local transaction and the Resolution control is set to Application. One can set this attribute to either Commit or Rollback, as described in Entity bean assembly settings.

  8. [For EJB components only] For container-managed transactions, configure how the container must manage the transaction boundaries when delegating a method invocation to an enterprise bean's business method:

    1. In the navigation pane, select Container Transactions. This displays a table of the methods for enterprise beans.

    2. For each method of the enterprise bean set the Transaction attribute attribute to an appropriate value, as defined in Container transaction assembly settings.

 

See also:

  1. Developing components to use transactions
  2. Configure transaction properties for an appserver
  3. Using local transactions

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.