Subject Re: [Firebird-Java] Connection.isValid not implemented?
Author Mark Rotteveel
On 22-4-2010 14:24, Fabiano wrote:
> I´m using Jaybird 2.1.6 and when i try to check if the connection is valid, i get a "not yet implemented" exception.
>
> Am i doing something wrong or it is really not implemented?

As the error says it is not implemented. You could also have checked the
sourcecode. It will be (is) implemented in Jaybird 2.2

> If it is not implemented, i think it is a showstopper for connection pooling mechanisms to use this driver, isn´t it? Or there is another standard way in Java to check if the connection is valid?
>
> I´m implementing a connection pool, and i would like to check if the connection is valid before deliver a pooled connection.

The method isValid() was introduced in JDBC 4, I would simply use a
validation mechanism that was used by most if not all connections pools
that were developed before JDBC 4 (eg fire off a simple query).

May I ask why you are implementing your own connection pool, as Firebird
comes with its own connectionpool and there are also connection pool
solutions like c3po and dbcp.

--
Mark Rotteveel