While using a multi datasource having 2 datasources DS1 and DS2. DS1 connects to the primary DB instance.DS2 is the secondary instance ( which is in the standby mode all the time)
DS1 fails and WLS directs the new connection request to DS2 which in turn fail since the DB is on standby. Once the DS1 is back online the new connection requests are served by DS1 and the application starts to work fine, but the server logs get the following error messages continuously for the DS2 even though it is not being used any more by the application.
The connection creation retry frequency is set to 20 secs.
####<Oct 4, 2011 6:25:17 AM CEST> <Warning> <JDBC> <TP><techpaste> <FabricScheduler_QuartzSchedulerThread> <<anonymous>> <0f6780344b19791c:-11a0a7df:132ca7ddf01:-7ffd-0000000000002002> <1317702317287> <BEA-001129> <Received exception while creating connection for pool "DS2": ORA-01033: ORACLE initialization or shutdown in progress
The above errors start getting logged only after the multi DS failover from DS1 to DS2.
Data sources rely on the Test Reserved Connections (TestConnectionsOnReserve) feature on the data source to know when database connectivity is lost. Testing reserved connections must be enabled (the default) for the data sources within the multi data source. WebLogic Server will test each connection before giving it to an application. With the Failover algorithm, the multi data source uses the results from connection test to determine when to fail over to the next data source in the multi data source. After a test failure, the data source attempts to recreate the connection. If that attempt fails, the multi data source fails over to the next data source.
In this case DS1 failed and now DS2 was in the list that the Callback handler maintains. Even after DS1 came back, DS2 remains at top of the list and application uses DS2.
Check below link for more details