0 Replies Latest reply on May 13, 2010 1:05 PM by jcarnegi

    Configuring a ValidConnectionChecker from datasource definition

    jcarnegi

      Hi All,

       

      I've developed a ValidConnectionChecker in JBoss AS 5.1.0.GA that ensures that each connection has a maximum life time. This comes from a strange use case in which an F5 loadbalancer is used to choose which database machine to connect to, so if we want to bring down a specific database machine, taking it out of the F5 pool is unsufficient because JBoss (rightly so I think) does not invalidate the connection because it is still considered valid (in that it still works).

       

      Anyway, I expect that my problem quite simple and is it this:

       

      How can I configure my ValidConnectionChecker? I'd like to be able to configure it (i.e. set the maximum lifetime), but without introducing other dependencies. Ideally, I'd be able to add some configuration to the Data Source configuration file directly.

       

      Anyone have any ideas how I might achieve this?

       

      Kindest regards,

       

      James.