Oracle RAC Environment
In an Oracle RAC environment, the calls to get(), insert(), update(), deleteToken(), and deleteValue() will not failover when a database server goes down.
To overcome the lack of automatic failover in an Oracle RAC environment:
- Set the following c3p0 parameters in the SfntDbp.properties file. - c3p0.testConnectionOnCheckin=true
- c3p0.idleConnectionTestPeriod=10
- c3p0.preferredTestQuery=select * from dual- By configuring the above properties, the CT-V API calls will be successful within the time specified in the - c3p0.idleConnectionTestPeriodparameter. This is the maximum time for an invalid connection to get cleared from the connection pool.
 
- Place the API call in the try block and decrement the loop counter in the catch block to retry for the same input value as shown below: - Retry Logic Code: - while (true) { for (int loop = 0; loop < 10000; loop++) { data_toTokenize = data_toTokenize + loop; try { token = ts.insert(data_toTokenize,dbTable,format, true); System.out.println("Token #"+loop+" Original Data "+data_toTokenize+" in newformat: " + token); }catch (Exception e) { System.out.println("Token #"+loop+" Original Data "+data_toTokenize+" in new format: " + token+" FAILED"); e.printStackTrace(); //For retrying for the same input value loop--; } } }