Assembly Toolkit: Configure transactional deployment attributes

 

To set transactional attributes:

  1. Start the Assembly Toolkit

  2. Import the EAR file...

    File | Import | EAR file | Next | EAR_file. | Finish

  3. In the J2EE Hierarchy view select...

    Component instance (right-click) | Open With | Deployment Descriptor Editor

  4. For a session bean, select...

    EJB Modules | ejb_module | Session Beans | bean_instance

    For a servlet, select...

    Web Modules | web_application | web component | servlet_instance

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

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

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

  7. Under WebSphere Extensions, configure J2EE component extensions attributes for extended LTC.To enable management of LTCs, configure the following EJB extensions attributes. These attributes configure, for the component, the behavior of the container's LTC environment that the container establishes whenever a global transaction is not present.

    Boundary Specifies the duration of a local transaction context. Set this attribute to Bean method or ActivitySession.

    Note that The ActivitySession option is not supported in the web container.

    This property can be changed on WBI Server Foundation only.

    Resolver 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. Set this attribute to either Application or ContainerAtBoundary.

    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. You can set this attribute to either Commit or Rollback.

    For a value of Commit, the container will take the commit action only in the absence of an un-handled exception. If the application method executing under the local transaction context ends with an exception, then the local transaction context is rolled back by the container. (This is the same behavior as for global transactions.)

  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, click the Assembly Descriptor tab. The Container Transactions box 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.

  9. Save your changes to the deployment descriptor.

    1. Close the deployment descriptor editor.

    2. When prompted, click Yes to indicate that you want to save changes to the deployment descriptor.

  10. Verify the archive files.

  11. Generate code for deployment for EJB modules or for enterprise applications that use EJB modules.

  12. (Optional)   Test your completed module on a WAS installation. Right-click a module, click Run on Server, and follow the instructions in the displayed wizard. Note that Run on Server works on the Windows, Linux/Intel, and AIX operating systems only; you cannot deploy remotely from the Assembly Toolkit to a WAS installation on a UNIX operating system such as Solaris.

    Use Run On Server for unit testing only. Assembly Server Toolkit controls the WAS installation and, when an application is published remotely, the Toolkit overwrites the server configuration file for that server. Do not use on production servers. For instructions on remote testing, see the article "Setting Up a Remote WAS in WebSphere Studio V5" at http://www7b.boulder.ibm.com/wsdd/techjournal/0303_yuen/yuen.html .

After assembling your application, use a systems management tool to deploy the EAR file onto the appserver that is to run the application; for example, using the administrative console as described in Deploying and managing applications.

 

See Also

Developing components to use transactions
Configuring transaction properties for an appserver
Assembling applications with the Assembly Toolkit
Using local transactions