1 Reply Latest reply on Sep 27, 2002 9:31 AM by David Jencks

    How to flush the connection pool

    Ludovico Basili Newbie

      Hello,

      I am using JBoss-2.4.4 <OT>but I am looking forward to moving the 3.x release !! </OT>

      I developed a Connector for the LDAP directory service.
      When the LDAP server goes down, for a system or a network failure, and I try to connect, the physical connection that I am trying to use fires a ConnectionEvent (CONNECTION_ERROR_OCCURRED).
      This event is intercepted by the connection manager that destroys that connection.
      All other connections are invalid, but remain in the pool until another client have tried to use them.

      I would like to have another behavior for the that event.
      Being all the connections to the same server, I would like to destroy all of them when a server failure occurs.
      Is it possible in some way ?

      Thanks,
      L.B.



        • 1. Re: How to flush the connection pool
          David Jencks Master

          This is not possible within the jca architecture. It seems like a good idea though.

          You could write your own connection manager (or modify a jboss one) that had that behavior and deploy it in jboss: this would be pretty easy in 3.x but I hesitate to recommend it in 2.4.x.

          Your clients will get some kind of exception until the service is running again, right? So how about just setting the idle timeout to less than the time it takes to restart the service?