commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <phil.ste...@gmail.com>
Subject Re: Reseting a connection in RDCP
Date Fri, 01 Apr 2011 21:43:54 GMT
On 4/1/11 12:37 PM, Fernando O. wrote:
> Hi All
>     I'm evaluating RDCP for a project. We need to be able to reset a
> connection on an error, meaning: if an error occurs I want to close a
> connection , take it out of the pool, and get a new one (not an existing
> one) into the pool and get that connection.
> Something like
>
> Connection conn = connectionPool.reset(oldConnection);
>
> Most of the time I wil use connection.close(), but just in some rare cases I
> need to do a reset :(.
>
> Is there a clean way to do that?
>
The only thing close to this available now is to set testOnReturn to
true and configure a validation query.  Then, assuming the bad
connection will fail validation once an error has occurred, it will
be destroyed instead of being put back into the pool. 
 
As Gary said, it would be great to open a JIRA for this enhancement
request.

Phil

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message