Subject Re: Connection.isValid not implemented?
Author Fabiano
> > 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

Great, is it stable enought to give it a try?

> > 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).

Yes, but we need to know in advance what database we are connected to and have a specif query for each database, what is bad for generic pools which doesn´t know the type of database they are connected to.

> 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.

I didn´t use FB pooled driver because i want a generic pooling mechanism that can be used with any database driver.

I looked superficially to dbcp and didn´t like it because i don´t like to configure my application using config files (there should be a way to programatically configure dbcp, but i preffered to write my own connection pooling class.

I will take a look at c3po.



> --
> Mark Rotteveel