commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juozas Baliuka" <bali...@centras.lt>
Subject Re: DBCP validation query: how to use?
Date Sun, 09 Jun 2002 14:12:14 GMT

It is code in GenericObjectPool. "_testOnBorrow"  must be set to true.
Sorry, but I dont know how to set it in DBCP, I believe somebody more
competent will respond to your message.
..........................
if( _testOnBorrow && !_factory.validateObject(pair.value)) {
                try {
                    _factory.passivateObject(pair.value);
                } catch(Exception e) {
                    ; // ignored, we're throwing it out anyway
                }
                _factory.destroyObject(pair.value);
            } else {
.............................................

> Thanks,
>
> Actually the problem is in my code, there should not be any nulls at all
> in the String I'm trying to insert. It's supposed to be a normal
> human-readable string.
>
> But talking about DBCP again -- how do I enable "ping" in configuration
> of DBCP?
>
> I'm looking at the source code for DBCP, and the "validateObject" method
> in PoolableConnectionFactory is where the test occurs (on your
> validation query). But either the code doesn't work, or validateObject
> is never called in the first place.
>
> Again, help would be appreciated!
>
> Bryan
>
> On Sun, 2002-06-09 at 01:34, Juozas Baliuka wrote:
>
>     Hi,
>      I think you need to enable "ping" in configuration.
>     But you can solve this in postgres :
>     1. use BYTEA type for bynary strings.
>     2. check the last driver version, I am not sure it is fixed in the
last
>     versoin, but it
>     is no problems to fix it, driver is open source. Current "STABLE"
version
>     has this bug.
>     Escape table you can find in user's guide.
>
>
>


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message