0 Replies Latest reply on Sep 9, 2003 10:29 AM by sheetszc

    Connection Pool Connection Testing

    sheetszc

      I need a connection pool implementation that checks for a valid database connection BEFORE the connection is actually handed off to the application for use. It seems like the current JBoss connection pool implementation will discard a connection from the pool if the is an exception that occurs but by then it is already too late and the user can see that an error occurred.

      The scenario is as follows: In order to support full redunancy and transparent failover, I need to ensure that if a database server goes down that the application will trasparently failover to a second database instance. The JDBC driver that I am using will support this, but the issue is that if the first database server goes down there will be "stale" connections in the pool. So the pool needs to test the connection first before handing it off to the application. If the connection is not good, then it should be discarded from the pool BEFORE it can be used by the application.

      Is this sort of functionality possible with the connection pool that comes with JBoss 3.0.8 or any other version?

      If not can the JBoss connection pool be "easily" replaced without code modifications?

      Thanks for any and all thoughts in this area.