Re: [Resin-interest] Obtaining a PGConnection object
Thanks, Scott. AFAIK conn.unwrap is only available in JDK 1.6, and we are still on 1.5. I re-tried casting the UserConnection into a PGConnection and get a ClassCastException: java.lang.ClassCastException: org.postgresql.jdbc3g.Jdbc3gConnection On Oct 2, 2008, at 4:13 PM, Scott Ferguson wrote: You can either use Resin's getConnection() method or the unwrap method, Connection conn = _database.getConnection(); PGConnection pgConn = conn.unwrap(PGConnection.class); or PGConnection pgConn = (PGConnection) ((com.caucho.sql.UserConnection) conn).getConnection(); -- Scott -- Claire McLister[EMAIL PROTECTED] 21060 Homestead Road Suite 150 Cupertino, CA 95014408-733-2737(fax) http://www.zeemaps.com ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] Obtaining a PGConnection object
On Oct 1, 2008, at 8:47 PM, Claire McLister wrote: Hi, We have an application running on Tomcat and are evaluating migration to Resin. One of the current sticking points is the use of Postgresql Large Objects. In the Tomcat configuration, we could use the 'allowAccesstoUnderlyingConnection' property to access the PGConnection object and use the large object API from there. You can either use Resin's getConnection() method or the unwrap method, Connection conn = _database.getConnection(); PGConnection pgConn = conn.unwrap(PGConnection.class); or PGConnection pgConn = (PGConnection) ((com.caucho.sql.UserConnection) conn).getConnection(); -- Scott It seems Resin supports the retrieval of the Connection object from the Datasource, but trying to cast it into a PGConnection gives an exception. Can someone please tell us how we can use Large Object API from within the Resin container. Thanks for any pointers. Claire ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
[Resin-interest] Obtaining a PGConnection object
Hi, We have an application running on Tomcat and are evaluating migration to Resin. One of the current sticking points is the use of Postgresql Large Objects. In the Tomcat configuration, we could use the 'allowAccesstoUnderlyingConnection' property to access the PGConnection object and use the large object API from there. It seems Resin supports the retrieval of the Connection object from the Datasource, but trying to cast it into a PGConnection gives an exception. Can someone please tell us how we can use Large Object API from within the Resin container. Thanks for any pointers. Claire ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest