0 Replies Latest reply on Apr 6, 2006 3:04 PM by thomasr1974

    help ! problems with connection pool and db2 connections

      hi all,

      i have a problem with jboss connection pool, db2 type-4 driver and db2 server 7 (z/os).
      so... i hope you can help me.

      i think the problem is between handshake of type-4 driver and the jboss connection pool.
      today we had a lot of network troubles, which was the cause for following exception:

      Caused by: com.ibm.db2.jcc.a.DisconnectException: A communication error has been detected. Communication protocol being used: {0}. Communication API being used: {1}. Location where the error was detected: {2}. Communication function detecting the error: {3}. Protocol specific error codes(s) {4}, {5}, {6}. TCP/IP SOCKETS Reply.fill() InputStream.read() insufficient data * 0
      at com.ibm.db2.jcc.b.a.a(a.java:322)
      at com.ibm.db2.jcc.b.ba.b(ba.java:184)
      at com.ibm.db2.jcc.b.ba.c(ba.java:201)
      at com.ibm.db2.jcc.b.ba.c(ba.java:314)
      at com.ibm.db2.jcc.b.ba.v(ba.java:1218)
      at com.ibm.db2.jcc.b.bd.a(bd.java:41)
      at com.ibm.db2.jcc.b.r.a(r.java:31)
      at com.ibm.db2.jcc.b.bp.g(bp.java:103)
      at com.ibm.db2.jcc.a.co.g(co.java:968)
      at com.ibm.db2.jcc.a.cp.T(cp.java:1378)
      at com.ibm.db2.jcc.a.cp.Y(cp.java:1491)
      at com.ibm.db2.jcc.a.cp.setObject(cp.java:833)
      at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.setObject(WrappedPreparedStatement.java:641)

      (we catch the exception in the application and close the connection)

      thats still ok; everything is perfect ;) but ..

      in datasource we defined

      <min-pool-size>5</min-pool-size>
      <max-pool-size>20</max-pool-size>
      <idle-timeout-minutes>10</idle-timeout-minutes>
      <blocking-timeout-millis>10000</blocking-timeout-millis>
      <check-valid-connection-sql>SELECT count(*) FROM xxx</check-valid-connection-sql>

      after 20 (max pool size) of the DisconnectException we get

      Caused by: org.jboss.util.NestedSQLException: No ManagedConnections available within configured blocking timeout ( 10000 [ms] ); - nested throwable: (javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 10000 [ms] ))
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:106)

      when the network problems was solved, we further get the "No ManagedConnections" exception;
      so i have to restart the jboss server, to reinitialize the connection pool.


      why jboss thinks that the connections was still alive and busy although we get the disconnectexception ?
      which are our possibilities to change this "bad" connection handling ?
      i think that a disconnectexception from the driver should be reason enough for jboss to reinialize the connection. isn't it ?

      whats wrong with my jboss configuration/implementation ?


      thx for help, thomas.