users@glassfish.java.net

Re: Resource Connector

From: Richard Kolb <rjdkolb_at_openrap.org>
Date: Mon, 13 Feb 2012 16:50:18 +0200

Hi John

I have only written one of these, and not sure it's in production yet.

But, how do you do connection validation ?

What I did was set up a commons pooling pool, and got my resources from
there when needed.
Commons pooling does all the validation pre-checkout, post-checkout and in
the background etc.

I am not sure it is the right way mainly because it does introduce threads,
but it did work.

http://commons.apache.org/pool/examples.html

regards
Richard.


On 13 February 2012 16:44, John Lister <john.lister_at_kickstone.com> wrote:

> Hi, I have a resource connector installed (a custome built one) which is
> generally working fine except for one thing - connection validation.
>
> I have the connection pool to validate every use and I can see that
> initally it calls my validation function for every request, but after a
> period of time this stops. The pool is also setup to validate each
> connection every 5 minutes which I can see in the logs go through ok.
>
> I have is-connection-validation-**required set to true for the connection
> pool and all other parameters look correct, does any one have any
> suggestions or is this a bug?
>
> Using lataest stable glassfish 3.1.1 (b12)
>
> Thanks
>
> John
>
> --
> Get the PriceGoblin Browser Addon
> www.pricegoblin.co.uk
>
>