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 Thu, 07 Sep 2006 16:14:02 GMT
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); 

> -----Original Message-----
> From: John Hauf [mailto:j@hauf.org] 
> Sent: Thursday, September 07, 2006 9:59 AM
> To: torque-user@db.apache.org
> Subject: GetConnection
> 
> Hello,
> 
> I have a problem with the method Torque.getConnection(). I 
> use Torque with SharedPoolDataSourceFactory.
> I try to do the following - as suggested on the 
> dbcp-configuration page:
> Connection conn = Torque.getConnection(); Connection dconn = 
> ((org.apache.commons.dbcp.DelegatingConnection)
> conn).getInnermostDelegate();
> 
> I have also set this in my torque-configuration: 
> torque.dsfactory.spatial.pool.accessToUnderlyingConnectionAllo
> wed = true
> 
> But I always get a ClassCastException back when I try to cast 
> the connection to "DelegatingConnection".
> 
> I need to do this, because I need to add some datatypes to 
> the underlaying postgres-connection:
> ((org.postgresql.PGConnection) conn).addDataType("geometry", 
> PGgeometry.class);
> 
> Has anybody a solution for this problem?
> 
> Thank you!
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
> 
> 

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


Mime
View raw message