Re: Tomcat JDBC Connection Pool interfaces to PostgreSQL...

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Tomcat JDBC Connection Pool interfaces to PostgreSQL...
Дата
Msg-id CAKFQuwY5A3Fms5-77wmH242QtWL1wQvF=7zR6fVxhALeYVX1XQ@mail.gmail.com
обсуждение исходный текст
Ответ на Tomcat JDBC Connection Pool interfaces to PostgreSQL...  (Eric Neron <eneron@e-djuster.ca>)
Список pgsql-jdbc
On Tue, May 17, 2016 at 2:40 PM, Eric Neron <eneron@e-djuster.ca> wrote:

The Tomcat documentation suggests to extract the native connection by using the following method:

Connection pgConnection = ((javax.sql.PooledConnection) conn).getConnection ( );

Although this does not fail, using a debugger, I can see that pgConnection is really an
org.postgresql.jdbc.PgConnection (not an org.postgresql.PGConnection), and there is not way it seems that I can bridge between the two... even by using:


​​​If you get this I'm not sure where the issue is...

org.postgresql.jdbc.PgConnection implements org.postgresql.core.BaseConnect which extends​
 
​org.postgresql.PGConnection​ which is the interface that you desire.
 
pgConnection.unwrap ( PGConnection.class );

Not sure...

David J.

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: Tomcat JDBC Connection Pool interfaces to PostgreSQL...
Следующее
От: Eric Neron
Дата:
Сообщение: Re: Tomcat JDBC Connection Pool interfaces to PostgreSQL...