Assembling an application to use one-phase and two-phase commit resources in the same transaction

Use this task to assemble an application to use one-phase and two-phase commit resources within the same transaction.

 

Overview

To enable an application to use one-phase and two-phase commit capable resources within the same transaction, configure the deployment attributes of the application to accept the increased risk of an heuristic outcome.

One can configure the deployment attributes of an application by using an assembly tool such as the Application Server Toolkit (AST) or Rational Web Developer.

This task description assumes that you have an EAR file for an application component, that can be deployed in WebSphere Application Server. For more details about assembling applications, see Assembling applications.

To configure an application to indicate that you accept the increased risk of an heuristic outcome, complete the following steps:

 

Procedure

  1. Start the assembly tool.

  2. Create or edit the application EAR file.

    Note: Ensure that you set the target server as WAS v6.

    For example, to change attributes of an existing application, use the import wizard to import the EAR file into the assembly tool. To start the import wizard:

    1. Click File-> Import-> EAR file

    2. Click Next, then select the EAR file.

    3. In the Target server field, select WebSphere Application Server v6.0

    4. Click Finish

  3. In the J2EE Hierarchy view, right-click the Enterprise Application instance, then click Open With > Deployment Descriptor Editor. A property dialog notebook for the component is displayed in the property pane.

  4. In the property pane, select the Extended Services tab.

  5. In the Last Participant Support section, select the Last participant support checkbox.

  6. 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.

  7. Verify the archive files.

  8. From the popup menu of the project, click Deploy to generate EJB deployment code.

  9. 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; one cannot deploy remotely from the Application Server Toolkit (AST) or Rational Web Developer to a WAS installation on a UNIX operating system such as Solaris. Important

    Note: Use Run On Server for unit testing only. The Application Server Toolkit (AST) or Rational Web Developer controls the WAS installation and, when an application is published remotely, the assembly tool overwrites the server configuration file for that server. Do not use on production servers.

 

What to do next

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

 

See also


Last participant support extension settings

 

See Also


Coordinating access to one-phase and two-phase commit capable resources within the same transaction

 

Related Tasks


Assembling applications