GlassFish / Oracle RAC / java.sql.SQLRecoverableException: Closed Connection

For a period of time we’ve been having issues with failover of Oracle RAC for an application sitting on GlassFish.

After considering various solutions, we’re currently monitor one implementation that appears to have promising indications at the moment for being a permanent solution (although perhaps a little early to be certain).

The solution appears to be to use the ‘Connection Validation’ properties under the Advanced Tab. We’re currently enabled to perform a select before the actual query attempted to run (and we’ve nominated the DUAL table for the select to be carried out on). If this fails, then that connection is dropped from the pool, and the next available connection is sourced. If all available connections fail, then fresh connections are made within the pool.

There appears to be an omission for RAC failover support in the Oracle-Thin library, hence the requirement for using this setting.

Further reading:–td21432580.html

2 thoughts on “GlassFish / Oracle RAC / java.sql.SQLRecoverableException: Closed Connection

    • Hi.

      This solution has generally worked for us. We’ve had the very odd occasion when it hasn’t, but on the very odd occasion this has happened, it has been something to do with Oracle RAC affecting everything, rather than just us.

      Hope this helps.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s