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 in the same transaction.
This task description assumes that we have an EAR file for an application component that can be deployed in WebSphere Application Server. For more details about assembling applications, see the topic about assembling applications.
To enable an application to use one-phase and two-phase commit capable resources in the same transaction, configure the deployment attributes of the application to accept the heuristic hazard, that is, the increased risk of an heuristic outcome. We can configure the deployment attributes of an application by using an assembly tool.
We can also configure an application to accept the heuristic hazard after deployment, using the administrative console and the Last participant support extension settings. Alternatively, we can configure the transaction service for an application server to accept the heuristic hazard.
This topic describes the use of Rational Application Developer to configure the deployment attributes of an application.
To configure an application to indicate that you accept the increased risk of an heuristic outcome...
- Start the assembly tool. For more information, refer to the Rational Application Developer information.
- Create or edit the application EAR file.
Ensure set the target server as WAS v7.
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:
- Click File > Import > EAR file.
- Click Next, then select the EAR file.
- In the Target server field, select WebSphere Application Server v7.0.
- Click Finish.
- In the Project Explorer view of the Java EE perspective...
A property dialog notebook for the component is displayed in the property pane.
- Expand the Enterprise Application instance.
- Right click on the Deployment Descriptor.
- Click Open With > Deployment Descriptor Editor.
- To display the Extended Services tab.
- Close the Enterprise Application Deployment Descriptor editor.
- In the toolbar, select Windows > Preferences.
- In the left pane, select Capabilities.
- In the right pane, expand Advanced Java EE and select the WebSphere PME Development option.
- Click Apply.
- Open the Enterprise Application Deployment Descriptor editor.
- On the Extended Services tab, in the Last Participant Support section, select the Last participant support check box.
- Save the changes to the deployment descriptor.
- Close the Deployment Descriptor Editor.
- When prompted, click Yes to save changes to the deployment descriptor.
- Verify the archive files. For more information about verifying files using Rational Application Developer, refer to the Rational Application Developer information.
- From the popup menu of the project, click Deploy to generate EJB deployment code.
- Optional: Test the completed module on a WAS installation. Right-click a module, click Run on Server, and follow the instructions in the displayed wizard.
Important: Use Run On Server only for unit testing. The assembly tool 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 the Run On Server option on production servers.
What to do next
After assembling the 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 the topic about deploying and administering enterprise applications.
Subtopics
- Last participant support extension settings
Use this page to configure settings for last participant support. Last participant support is an extension to the transaction service that enables a single one-phase resource to participate in a two-phase transaction with one or more two-phase resources. Values on this panel are ignored if you select Use configuration information in binary on the Application binaries panel.
Related concepts
Coordination of access to one-phase commit and two-phase commit capable resources in the same transaction Development and assembly tools
Related tasks
Assembling applications Deploy
Transaction service settings
Related information: