users@glassfish.java.net

Re: Resource Connector

From: <forums_at_java.net>
Date: Tue, 14 Feb 2012 09:30:21 -0600 (CST)

Thanks for your reply. I use it as per the JCA specs. The RA is registered on
the server, then a connection pool is constructed in glassfish as
normal. From this I inject the managed connection factory into my web code
and construct an instance of the managed connector. This in turn talks to the
physical backend.

The validation is done using the glassfish connector pool and up to a point
works fine. By that I mean before every use of my connector there is a call
to the isValid method. But for some reason it stops after a while, bizarrely
the periodic validation tests are done every 5 minutes as specified...

Time to update my glassfish source and step through it. Although I have only
got it to break in my production environment...

Thanks

[quote=rjdkolb]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


--
[Message sent by forum member 'jsl123']
View Post: http://forums.java.net/node/883482