2 Replies Latest reply on Jun 27, 2003 3:47 PM by Larry Wilson

    Datasource Connection Pool Problem

    Larry Wilson Newbie

      We have a network that drops connections often (don't ask), which results in a disconnected datasource in the connection pool, causing failed access until the idle time resets the connection.

      Is there any way to have the connection attempt a reconnect?

      Here's one of the errors I'm getting:
      Exception. See error log for stack trace.
      [Atinav][JDBC SQL Server Driver] Connection reset by peer: socket write errorconnection exception - commmunication link failure


      We're using Avenir's driver, JBoss 4.0DR1, and SQL Server 2000.

        • 1. Re: Datasource Connection Pool Problem
          Elias Ross Master

          There is a feature that supports the Oracle database, which decides (upon Exception) whether or not the physical connection is still valid. This appears in JBoss 3.2.1 I believe.

          In any case, if you download the CVS version, you can write your own based off the OracleExceptionSorter (look in the connector directory.) Then, in your jboss-ds.xml file you reference your class:

          <no-tx-datasource>
          <jndi-name>xxx/ds</jndi-name>
          <connection-url>jdbc:oracle:thin:@localhost:1521:system</connection-url>
          <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
          <user-name>xxx</user-name>
          xxx
          <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
          </no-tx-datasource>

          Copy the .jar file to the lib directory or make a .sar out of it.

          • 2. Re: Datasource Connection Pool Problem
            Larry Wilson Newbie

            Lordy! Guess that's the answer though.

            Thanks.