Configuring for resource workload routing

Use the resource workload routing feature in WebSphere® Application Server to provide data source and connection factory failover and failback from a predefined alternate resource.

Before you begin

Prerequisite: You must have created at least two connection factories for the IMS TM resource adapter. For steps on how to create a connection factory, see Creating a connection factory in WebSphere Application Server.

About this task

WebSphere Application Server Version 8 or later provides a resource workload routing function that enables applications to recover from resource outages without having to embed alternate resource or configuration information.

A data source and connection factory can fail over and fail back automatically when a specified or default failure threshold value is reached. When fail over occurs, the application switches from using the primary resource to using the alternate resource. Fail back occurs when the application switches back from the alternate resource to the primary resource.

When an alternate resource is configured for the IMS TM resource adapter, WebSphere Application Server sends a ping message to IMS Connect to verify that it is up and running before re-establishing a connection to the currently available resource.

To enable the resource workload routing function, configure the alternateResourceJNDIName property as a custom connection pool property for your primary connection factory. Set the value of the alternateResourceJNDIName property to the JNDI name of the secondary connection factory.

Procedure

  1. In the WebSphere Application Server administrative console, expand Resources > Resource Adapters. Click Resource adapters.
  2. Click the Connection pool properties link under the Additional Properties section.
  3. In the Connection pools page, click Connection pool custom properties.
  4. In the Custom properties page, click New to add the alternateResourceJNDIName property.
  5. The property name must be set to alternateResourceJNDIName. The value is the JNDI name of the alternate connection factory.
    Figure 1. The Custom properties page when you create a property.
    This image shows the custom properties page when you create a property. There are two fields to enter a value for. The first one is the name of the new property. It must be set to alternateRresourceJNDIName. The other is the JNDI value for this custom property. End figure description.
  6. Click OK.
    An alternate resource is configured.

Results

You have created an alternate connection factory for your IMS TM resource adapter.

What to do next

You can repeat the same step to add other custom properties such as failureThreshold. For other properties that you can configure, see the WebSphere Application Server information.