Hi Lily,

DBCP version 1.1 is more strict about giving direct access to the underlying connection by using the getDelegate() method.
The PoolableConnection you expect is wrapped and access to the delegate is restricted by default.
http://cvs.apache.org/viewcvs.cgi/jakarta-commons/dbcp/release_notes.txt?rev=1.5&view=auto


If you need access to the physical connection then you have to set
accessToUnderlyingConnectionAllowed to true.
See http://jakarta.apache.org/commons/dbcp/configuration.html
for the recommended way of getting access to the underlying connection.

Cheers
Dirk

Dong, Lily/Sloan-Kettering Institute wrote:

Hi Dirk,  thanks for the quick response.  Somehow my reply to your email
yesterday got lost.  Anyhow here's our system info:

Version of DBCP: 1.1
Tomcat Version: 5.0.18
DBCP jar place: tomcat/common/lib

and we use context configuration (specified in the file
tomat/Catalina/localhost/our_application.xml)

Thanks,
Lily

----- Original Message ----- From: "Dirk Verbeeck" <[EMAIL PROTECTED]>
To: "Jakarta Commons Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, March 09, 2004 2:46 PM
Subject: Re: DBCP Connection.getDelegate () class cast problem




A little more info is needed:

Version of DBCP and exact tomcat versions?
Do you have a DBCP jar in the WEB-INF/lib directory of your
application or only in tomcat/common/lib?
Do you create your own pool or use JNDI? (context configuration?)

-- Dirk

Dong, Lily/Sloan-Kettering Institute wrote:

Hi.

After updating tomcat to 5.0, part of our system stopped working.

Looked


at the source code and found out the line

((PoolableConnection)conn_l).getDelegate()

caused java.lang.ClassCastException exception. But the same code works

fine


for Tomcat 4.1.

Any idea what went wrong?

Thanks,
Lily





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








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



Reply via email to