Multi Data Source Failback/Failover Callback Handler Issues
(Doc ID 2033349.1)
Last updated on MARCH 06, 2023
Applies to:Oracle WebLogic Server - Version 188.8.131.52.0 and later
Information in this document applies to any platform.
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>.
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:
1. Ensure file DIR/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 DIR/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.
1. Do the steps mentioned for problem #1
2. Delete file DIR/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.
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document