0 Replies Latest reply on Feb 19, 2007 11:42 PM by Alfred Thomas

    Exception when getting connection from ConnectionPool

    Alfred Thomas Newbie

      Hi guys.

      I am using JBoss 4.0.5 GA, and DB2 JDBC driver com.ibm.db2.jcc.Driver to persist data ia a DB (DB2 ver 8.1). Unfortunately the legacy code gets a connection (and closes it in a finally block) for each record that is persisted. This works for a few thousand records, but when I start persisting tens of thousands of records I get the following exception. Changing the application to use fewer connections is not really an option at this stage but I feel it shouldn't be necessary as the ConnectionPool should be able to handle this gracefully.

      [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
      org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (com.ibm.db2.jcc.a.DisconnectException: A communication error has been detected. Commun ication 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)

      Regards
      Alfred