Note that there are some explanatory texts on larger screens.

plurals
  1. POJDBC connection to Microsoft SQL Server doesn't reconnect
    text
    copied!<p>I have a database that is connected through an unreliable network connection to an application server, so occasionally the connections break down. Each time this happens, all database connections in the AP pool will need to reconnect - which they don't unfortunately.</p> <p>I went through different setups of c3p0, dbcp and bonecp as pools and used JTDS as well as the SQL Server V3 driver, (I even ditched pooling atogether to try out whether the regular DataSource would be able to create a new unpooled connection - which it didn't) but all configuration variants don't seem able to recover after network failure. </p> <p>To clarify, none of the DataSources were able to get a new Connection. Is there some inherent Problem with the MS Sql Server regarding reconnects? Am I missing something fundamental here? </p> <p>I realize this might not be of big help, but just as an example this is the dbcp configuration</p> <pre><code>&lt;bean id="dataSource" class="com.jolbox.bonecp.BoneCPDataSource" destroy-method="close"&gt; &lt;property name="driverClass" value="${jdbc.driverClassName}" /&gt; &lt;property name="jdbcUrl" value="${jdbc.databaseurl}" /&gt; &lt;property name="username" value="${jdbc.username}" /&gt; &lt;property name="password" value="${jdbc.password}" /&gt; &lt;property name="idleConnectionTestPeriodInMinutes" value="1" /&gt; &lt;property name="idleMaxAgeInMinutes" value="1" /&gt; &lt;property name="maxConnectionsPerPartition" value="3" /&gt; &lt;property name="minConnectionsPerPartition" value="1" /&gt; &lt;property name="partitionCount" value="1" /&gt; &lt;property name="acquireIncrement" value="5" /&gt; &lt;property name="acquireRetryAttempts" value="50" /&gt; &lt;property name="acquireRetryDelayInMs" value="1000" /&gt; &lt;property name="queryExecuteTimeLimitInMs" value="5000" /&gt; &lt;property name="connectionTestStatement" value="SELECT count(*) FROM dbo.sysobjects" /&gt; &lt;property name="closeConnectionWatch" value="true" /&gt; &lt;property name="lazyInit" value="false" /&gt; &lt;property name="statementsCacheSize" value="100" /&gt; &lt;property name="releaseHelperThreads" value="3" /&gt; &lt;/bean&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload