JDBC connection does not reconnect when dropped

When the Rhythmyx server drops it’s connection to the Repository database it does not attempt to reconnect.

Is there a way to achieve this?

This should be happening for Oracle dbs, unless the connection checker setting was removed from the rx-ds.xml.
For MSSql, you can add the <check-valid-connection-sql> element with a value of ‘select count(*) from RXDUAL’.

A fragment from the file w/ the setting is:

  &lt;idle-timeout-minutes&gt;15&lt;/idle-timeout-minutes&gt;
  &lt;check-valid-connection-sql&gt;select count(*) from RXDUAL&lt;/check-valid-connection-sql&gt;
  &lt;metadata&gt;

Adding this call will cause an extra db query for every connection obtained from the pool.

Hi Paul,

I don’t quite understand how an additional select query will re-connect dropped connections to the rx repository ?

Thanks

DB connections come from a pool managed by the app server. When CM Server needs to make a db request, it asks the app server for a connection. Before returning that connection, a test query is made. If that fails, the connection is closed and removed from the pool and another connection from the pool is checked until a valid connection is found. If the pool is empty (or has reached the minimum # of connections) a new connection would be opened.

So, even if the connection fails while the CM Server is using it, the next time that connection is going to be returned from the pool, it fails the query and is discarded.

What server versions will this fix work with?

This should work w/ any version of CM Server using JBoss, which is any version >= 6.0.

FYI, see this post.

Apparently, prior to version 6.7, database publishing is somewhat borked. You may need to consider upgrading to 6.7 if you haven’t already.