db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Monroe" <Greg.Mon...@DukeCE.com>
Subject RE: GetConnection
Date Fri, 08 Sep 2006 15:18:26 GMT
Hmm, did some code spelunking and found that the accessTo...
parameter in dbcp only works for BasicDataSources.  Torque's 
SharedPoolDataSourceFactory uses DBCP's SharedPoolDataSource
which does not support this option.  So the class of connection 
object you get will be: 


and this doesn't allow access to the real connection.

That said, one thing to try is subclassing the PostGres JDBC
Driver class and overriding the connect method to add your
'geometries' type.  Then use this subclass in your Torque

> Johannes Hauf said:
> Thank you. I tried with your suggestion and I think this 
> would work if the database wouldn't be Postgres.
> In the postgres-jdbc driver, the typeMap-mechanism seems not 
> to be implemented yet.
> Has anyone another idea?
> John
> Greg Monroe wrote:
> > Can you use the standard Connection interface TypeMap support to do 
> > the same thing rather than the PostGres extension?  E.g.
> > 
> > Map map = conn.getTypeMap();
> > map.put("geometry", Pggeometry.class); conn.setTypeMap(map);
> > 

Duke CE Privacy Statement
Please be advised that this e-mail and any files transmitted with it are confidential communication
or may otherwise be privileged or confidential and are intended solely for the individual
or entity to whom they are addressed.  If you are not the intended recipient you may not rely
on the contents of this email or any attachments, and we ask that you  please not read, copy
or retransmit this communication, but reply to the sender and destroy the email, its contents,
and all copies thereof immediately.  Any unauthorized dissemination, distribution or copying
of this communication is strictly prohibited.

To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org

View raw message