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 WebSphere Application Server connection management
sends a request every 10 seconds to determine if the primary resource
is available again. WebSphere Application Server connection
management can also send a message to the WebSphere Application Server servant log, indicating
the fail over to the alternate, and switch back to the primary. You
can 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, WebSphere Application Server 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.