From torque-user-return-7188-apmail-db-torque-user-archive=db.apache.org@db.apache.org Thu Sep 07 13:59:35 2006 Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 86485 invoked from network); 7 Sep 2006 13:59:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Sep 2006 13:59:35 -0000 Received: (qmail 99175 invoked by uid 500); 7 Sep 2006 13:59:34 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 98881 invoked by uid 500); 7 Sep 2006 13:59:33 -0000 Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Users List" Reply-To: "Apache Torque Users List" Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 98870 invoked by uid 99); 7 Sep 2006 13:59:33 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Sep 2006 06:59:33 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [217.160.109.197] (HELO arsmail.de) (217.160.109.197) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Sep 2006 06:59:33 -0700 Received: from localhost (localhost.localdomain [127.0.0.1]) by arsmail.de (Postfix) with ESMTP id 481C61F02AD for ; Thu, 7 Sep 2006 15:59:10 +0200 (CEST) Received: from arsmail.de ([127.0.0.1]) by localhost (p15093809 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 25955-07 for ; Thu, 7 Sep 2006 15:59:05 +0200 (CEST) Received: from [10.13.11.111] (p5496CF1F.dip.t-dialin.net [84.150.207.31]) by arsmail.de (Postfix) with ESMTP id ABA811F02AA for ; Thu, 7 Sep 2006 15:59:05 +0200 (CEST) Message-ID: <450025A8.1070808@hauf.org> Date: Thu, 07 Sep 2006 15:59:04 +0200 From: John Hauf User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: torque-user@db.apache.org Subject: GetConnection Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at arsmail.de X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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.accessToUnderlyingConnectionAllowed = 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