Hi,
I am using Hibernate v22branch and I was trying to access the JDBC connection object of a session. When I load hibernate I get this message:
INFO DriverManagerConnectionProvider:42 - Using Hibernate built-in connection pool (not for production use!)
I understand what this means: I am using no external connection pool manager. This is not the problem. When I use this I can get in my code the JDBC connection object like this:
Code:
( (PGConnection) session.connection() ).addDataType( "geometry", business.types.postgis.PGgeometry" );
Of course, this will only work if I use the PostgreSQL database dialect.
Well, the problem is when I started to use C3P0Connection provider. What is returned by the session.connection() method? Java throws a invalid typecast exception. This means that the JDBC connection is not a PGConnection anymore. Does anyone have experience on this?
Thanks,
Romano