tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phillip Qin <Phillip....@shareowner.com>
Subject RE: [dbcp] Call Oracle stored procedure via DBCP?
Date Thu, 02 Dec 2004 16:50:39 GMT
If you need to get the underlying connection,

((BasicDataSource) dataSource).setAccessToUnderlyingConnectionAllowed(true);

Before you can getConnection.



-----Original Message-----
From: Shankar Unni [mailto:shankarunni@netscape.net] 
Sent: December 1, 2004 5:32 PM
To: tomcat-user@jakarta.apache.org
Subject: Re: [dbcp] Call Oracle stored procedure via DBCP?


Sergey Karpov wrote:
> During a call of stored procedure through DBCP there is a mistake of 
> reduction of type:
> 
> java.lang.ClassCastException

That's because you're assuming that dbcp returns you a naked vendor JDBC 
Connection object. It doesn't - it returns you a pooled connection 
wrapper with forwarding methods.  Ditto for CallableStatements.

If you really needed to get the underlying object, you'd have to look at 
the JavaDoc for DBCP.


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


!DSPAM:41ae4678152041696882794!

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message