Weblogic Server: Data Source Started Manually Becomes RUNNING after DB Recovers although Test Frequency of Multi Data Source Is Set to 0 (Doc ID 2229072.1)

Last updated on FEBRUARY 13, 2017

Applies to:

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

Symptoms

Below manual explains the recovery of generic data source which is in multi data source.
It means that, when test frequency of multi data source is set to 0, if a generic data source is suspended by some DB problem,
the suspended generic data source will not be re-enabled by multi data source  after the DB is recovered.

http://docs.oracle.com/middleware/12211/wls/JDBCA/jdbc_multidatasources.htm#JDBCA222
---
Automatic Re-enablement on Recovery of a Failed Generic Data Source within a Multi Data Source

After a generic data source is automatically disabled because a connection failed a connection test, the multi data source periodically tests a connection from the disabled generic data source to determine when the generic data source (or underlying database) is available again. When the generic data source becomes available, the multi data source automatically re-enables the generic data source and resumes routing connection requests to the generic data source, depending on the multi data source algorithm and the position of the generic data source in the list of included generic data sources. Frequency of these tests is controlled by the Test Frequency Seconds attribute of the multi data source. The default value for Test Frequency is 120 seconds, so if you do not specifically set a value for the option, the multi data source will test disabled generic data sources every 120 seconds. See "JDBC Multi Data Source: Configuration: General" in the Oracle WebLogic Server Administration Console Online Help.
---

But, the test results are different according to different way to start the generic data source as test.
 1). When generic data source is started with server, generic data source will not be re-enabled by multi data source. This is expected behavior.
 2). When generic data source is started manually by clicking [RESUME] button on admin console, generic data source will be re-enabled after DB is recovered. This is unexpected behavior.

The steps to confirm 1) and 2) .
---
1. create a multi data source MDS with data source DS1 and DS2,
and set test frequency of multi data source to 0.
2.deploy an application which is connected to MDS to server.
3.stop DB service of DS1.
4.access to application for two times,
and this will make DS1 to be Suspended status.
5.restart DB service of DS1,
and DS1 will be Suspended status. * 1)

6.resume DS1 manually in admin console.
7.stop DB service of DS1.
8.access to application for two times,
and this will make DS1 to be Suspended status.
9.restart DB service of DS1,
and DS1 will be Running status. * 2)
---

Cause

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