Reputation: 352
On a 2 node cluster when one node is shutdown the following c3p0 errors are seen:
2015-11-10 10:00:25,655 | WARN | scheduler-1 | org.apache.log4j.Category | Exception on close of inner statement.
java.sql.SQLRecoverableException: Closed Connection
at oracle.jdbc.driver.PhysicalConnection.needLine(PhysicalConnection.java:5416)
at oracle.jdbc.driver.OracleStatement.closeOrCache(OracleStatement.java:1585)
at oracle.jdbc.driver.OracleStatement.close(OracleStatement.java:1570)
at oracle.jdbc.driver.OracleStatementWrapper.close(OracleStatementWrapper.java:94)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.close(OraclePreparedStatementWrapper.java:82)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.close(NewProxyPreparedStatement.java:1811)
The above warning is followed by :
2015-11-10 10:00:25,668 | WARN | DefaultQuartzScheduler_Worker-10 | org.apache.log4j.Category | [c3p0] Another error has occurred [ java.sql.SQLRecoverableException: Closed Connection ] which will not be reported to listeners!
java.sql.SQLRecoverableException: Closed Connection
at oracle.jdbc.driver.PhysicalConnection.needLine(PhysicalConnection.java:5416)
at oracle.jdbc.driver.OracleStatement.closeOrCache(OracleStatement.java:1585)
at oracle.jdbc.driver.OracleStatement.close(OracleStatement.java:1570)
at oracle.jdbc.driver.OracleStatementWrapper.close(OracleStatementWrapper.java:94)
Ase per the comment by Steve Swaldman on c3p0 github page,these warnings are associated with invalid/stale connections.
So on oracle RAC environment when one instance is shutdown , what happens to the connections already acquired when the node was up and running? for most part the Database operations were working fine after node shutdown. Only few inserts failed throwing the Warnings above. Does c3p0 connection pooling suitable for use on RAC environments?
More information about the warnings : http://sourceforge.net/p/c3p0/mailman/message/18310863/
Upvotes: 2
Views: 1894
Reputation: 14073
The warnings shown above don't look to be a problem. c3p0 was trying to clean up Statements whose parent Connection was already close()ed.
In general, c3p0 will gracefully recover from database outtages under common configurations. But you may see some warnings and Exceptions as tests start to fail and then attempts to clean things up fail as well.
c3p0 should work fine with Oracle RAC. However, Oracle's Universal Connection Pool offers special support for RAC-specific features that c3p0 does not provide.
Upvotes: 1