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);
-----Original Message-----
From: John Hauf [mailto:[EMAIL PROTECTED] 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
--------------------------------------------------------------
ars navigandi [lat. die Kunst zu navigieren]

Johannes Hauf M.A.                         ars navigandi GmbH
Telefon: +49 (0)89 82989164                Spiegelstr. 4
FAX:     +49 (0)89 244325475               81241 Muenchen
http://www.arsnavigandi.de                 Germany
mailto:[EMAIL PROTECTED]

Internet-Agentur - Software-Lösungen - E-Learning - Design
--------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to