LS Enabler: MULTI DATA SOURCE FAILBACK/FAILOVER CALLBACK HANDLER ISSUES (Doc ID 2033349.1)

Last updated on AUGUST 05, 2015

Applies to:

Oracle WebLogic Server - Version 12.1.3.0.0 and later
Information in this document applies to any platform.

Goal

If a DS1 suspends itself, the HA MDS fails over to the next DS, and keeps trying DS1, and then when the DS1 re-enables itself, the MDS succeeds immediately using it. The trouble is (only) if the user has configured a callback handler for failover/failback. Even if it was the DS that suspended itself, the customer wants the callback handler to be consulted before 'failing back' to the first DS.

This is the same problematic behavior that has been previously reported in Bug 13536734.

Configuration:

1. Database - Apache Derby 10.8.3.0
2. Two data sources - DS1 and DS2. One Multi Data Source MDS1 - contains DS1 and DS2. Order - DS1, DS2.
3. Connection Pool Failover Callback Handler registered to MDS1.

Callback handler implementation:


Problem #1:

1. Ensure file C:/wls_mds_allow_failover does NOT exist
2. Request a connection from MDS1. Connection is returned from DS1.
3. Shutdown the database to which DS1 is mapped.
4. Request a connection from MDS1.
5. The callback handler is consulted; it returns DONOT_FAILOVER. Connection request fails with an exception.
6. Create file C:/wls_mds_allow_failover
7. Request a connection from MDS1.
8. The callback handler is consulted; this time it returns OK. Failover succeeds. Connection is returned from DS2.
9. Request a connection from MDS1.
10. The callback handler is CONSULTED EVEN AFTER THE FAILOVER HAS HAPPENED. Why? Inputs passed to callback handler are: currPool=DS1,nextPool=DS2,opcode=OPCODE_CURR_POOL_DEAD.

Problem #2:

1. Do the steps mentioned for problem #1
2. Delete file C:/wls_mds_allow_failover
3. Restart the database to which DS1 is mapped.
4. Request a connection from MDS1. The connection is returned from DS1. The MDS does a failback to DS1 WITHOUT CONSULTING THE CALLBACK HANDLER. It SHOULD consult the callback handler before the failback.
 

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms