commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tauzell, Dave" <>
Subject RE: [Pool] Newbie question on pools (modified subject)
Date Wed, 19 Mar 2003 14:10:44 GMT
You could:

1. Wrap the pooled objects in your own wrapper which contains the
methods: isGood() and setBad().
2. Setup a validator on checkin that checks the isGood() method.
3. When your application determines there is a problem, call setBad()
and return to the pool.


-----Original Message-----
From: Donie Kelly [] 
Sent: Wednesday, March 19, 2003 5:08 AM
To: 'Jakarta Commons Users List'
Subject: [Pool] Newbie question on pools (modified subject)

Sorry about posting without proper subject. I'm resending in case a lot
of you are using filtering.
-----Original Message-----
From: Donie Kelly []
Sent: 19 March 2003 11:03
To: Jakarta Commons (E-mail)
Subject: Newbie question on pools
Hi all
I've looked through the source and all the javadocs and I cannot find a
way to do the following with the pool library. Note I have marked that I
can achieve parts of the intended functions:
1)      Get a connection from the pool (I can do this)
2)      Use the connection (I can do this)
3)      Return the connection to the pool (I can do this)
4)      When I get a connection and I have detected it has failed how
can I
mark it for removal as it may have been dropped by the server at the
other end of the connection (HOW TO??)
I understand that I can use the pool ObjectPoolFactory to test
connections on retrieval and submission to the pool but this is an
overhead I don't want. I want the pool to drop the connection when the
application has decided it is bad. I know the other way is desirable and
I will probably implement this by using the evictor thread but surely
it's important for the application to be able to decide that the
connection is useless??
The connection I'm pooling is a Corba connection object.
Thanks for any insights or help.

View raw message