JBoss Community

SELECT @@VERSION for Sybase Connections isn't always what you want

created by Martijn Verburg in Datasource Configuration - View the full discussion

Hi all,

 

Quick note (not sure if Jboss docs should be update for this or not).  After some extensive testing we've discovered that when a Sybase server gets bounced that database connection pools can grab 'stale' connections if the connection SQL you use is the SELECT @@VERSION (as shown in the jboss docs as a default).  This is due to the master DB being up but the actual DB you want to hit not being up.

 

Something like the the detection of the sysobjects table in your DB is a better way to go.  We now have a happily recovering Jboss :)

 

Cheers,

Martijn

Reply to this message by going to Community

Start a new discussion in Datasource Configuration at Community