+

Search Tips   |   Advanced Search

(ZOS) Enabling optimized local adapter high availability support

Use this task to enable optimized local adapters to use high availability support.

The optimized local resource adapter participates in the WebSphere Application Server high availability support, which provides the ability to specify an alternate connection factory JNDI name in the connection factory pool custom properties.

Important: For the high availability support to function properly, the resource register name must be specified on the managed connection using the connection factory Register Name attribute for both the primary and alternate resource connection factory. Using the setRegisterName() method prevents the alternate resource from getting control.

To use the optimized local adapters high availability support, complete the following steps.


Tasks

  1. Add the property, alternateResourceJNDIName, to the connection pool properties for a connection factory. Specify the JNDI name of the alternate resource connection factory.

    For example, if our primary JNDI is eis/ola and we want to make eis/ola_backup the alternate, set alternateResourceJNDIName property to eis/ola_backup and add this property to a connection pool property on the eis/ola connection factory.

  2. Ensure that the external address space associated with the alternate connection factory registration name is available for the fail over to occur.

    The optimized local adapter resource fail over process is triggered when an application makes a getconnection() request for a resource that fails because the target registration is not available. During this process, the alternate JNDI resource name is used for the getconnection() instead. The number of failed attempts before the fail over is tried can be configured by adding another connection pool property, failurethreshold. Setting a threshold of 1, means that after a single attempt at getting a connection is failed (with a Resource Exception) subsequent requests are routed to the alternate connection factory.

    A fail over event triggers a process to send subsequent requests to the alternate resource with the alternate JNDI name and register name and initiates a polling process where WAS connection management sends a request every 10 seconds to determine if the primary resource is available again. WAS connection management can also send a message to the WAS servant log, indicating the fail over to the alternate, and switch back to the primary. Use the failureNotificationActionCode property on the connection pool for the connection factory to select which notification is wanted. The default value of 1 indicates that messages are sent to the servant job log. Refer to the topic, Resource routing for data source and connection factory, for more information.

    When the WOLA resource adapter detects that the primary resource is available again or that the register name is active, WAS connection management is notified that future requests for the primary resource JNDI can be routed back to the primary connection factory. Since there is a 10-second delay between requests to check for the primary, when the primary registration is active again, there can be as much as 10 seconds before the switch occurs back to the primary registration.

  3. Restart the server. After adding the alternateResourceJNDIName or any other connection pool properties, the server must be restarted for the properties to take effect.


Related:

  • Connection factory considerations for optimized local adapters
  • Use optimized local adapters to connect to an application in an external address space from a WebSphere application
  • Use the outbound APIs with the external address space or subsystem
  • Enable the server environment to use optimized local adapters
  • Resource workload routing