dbcp

Поиск
Список
Период
Сортировка
Искать

dbcp

От:
Felipe Schnack <felipes@ritterdosreis.br>
Дата:
  I'm using our driver with Tomcat and DBCP connection pooling. For some
reason when I get a connection from the pool and can
Connection.toString() method, I don't get my sql query, but toString()
default implementation (class name, etc). Why this happens? As I
understand pgsql jdbc driver source code it does override this method..
-- 

Felipe Schnack
Analista de Sistemas
felipes@ritterdosreis.br
Cel.: (51)91287530
Linux Counter #281893

Centro Universitário Ritter dos Reis
http://www.ritterdosreis.br
ritter@ritterdosreis.br
Fone/Fax.: (51)32303341

Re: dbcp

От:
Barry Lind <blind@xythos.com>
Дата:
Felipe,

My guess is that the DBCP connection pool code is wrapping the postgres 
jdbc connection object with its own object (most connection pools do 
this).  So when you call Connection.toString() you are calling the DBCP 
implementation's method not the postgres jdbc driver method.  Thus you 
would need to ask the DBCP developers why they chose not to include the 
output from the enclosed connection object's toString() method in their 
wrapper's toString() implementation.

thanks,
--Barry


Felipe Schnack wrote:
>   I'm using our driver with Tomcat and DBCP connection pooling. For some
> reason when I get a connection from the pool and can
> Connection.toString() method, I don't get my sql query, but toString()
> default implementation (class name, etc). Why this happens? As I
> understand pgsql jdbc driver source code it does override this method..



FAQ