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.

Before you begin

You must 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.

About this task

To enable an application to use one-phase and two-phase commit capable resources in the same transaction, you must configure the deployment attributes of the application to accept the increased risk of an heuristic outcome. You can configure the deployment attributes of an application by using an assembly tool.

You can also configure an application to accept the heuristic hazard after deployment, by using the administrative console and the Last participant support extension settings.

[Fix Pack 17 or later] Alternatively, you can configure the transaction service for an application server to accept the heuristic hazard so that last participant support (LPS) is enabled for all applications that run on that server.

This topic describes how to configure the deployment attributes of an application using the Application Server Toolkit. To configure an application to accept the increased risk of an heuristic outcome, use the following steps.

Procedure

  1. Start the assembly tool. For more information about starting the Application Server Toolkit, refer to the Application Server Toolkit information in the navigation pane of this information center.
  2. Create or edit the application EAR file.
    Note: Ensure that you set the target server as WebSphere Application Server version 6.1.

    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.1
    4. Click Finish
  3. In the J2EE Hierarchy view, complete the following steps:
    1. Expand the Enterprise Application instance.
    2. Right click on the Deployment Descriptor.
    3. 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. If you are using an IBM Rational Software Development Platform and do not see the Extended Services tab, complete the following steps:
    1. Close the Enterprise Application Deployment Descriptor editor.
    2. In the toolbar select Windows > Preferences.
    3. In the left pane, select Capabilities.
    4. In the right pane, expand Advanced J2EE and select the WebSphere PME Development option.
    5. Click Apply.
    6. Open the Enterprise Application Deployment Descriptor editor and you should see the Extended Services page.
  5. In the Last Participant Support section, select the Last participant support check box.
  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. For more information about verifying files using the Application Server Toolkit, refer to the Application Server Toolkit information in the navigation pane of this information center.
  8. From the popup menu of the project, click Deploy to generate EJB deployment code.
  9. Optional: Test your completed module on a WebSphere Application Server installation. Right-click a module, click Run on Server, and follow the instructions in the displayed wizard.
    Important: Use Run On Server for unit testing only. The assembly tool controls the WebSphere Application Server 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 administering J2EE applications.



In this information ...


Related reference

IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic Task topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Aug 30, 2013 4:53:43 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=pix&product=was-base-dist&topic=tla_cfap2
File name: tla_cfap2.html