tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Knees <andreas.kn...@nikem.de>
Subject Different DelegatingResultSet.getDelegate() between Tomcat 6.0.26 and 6.0.29
Date Tue, 21 Sep 2010 07:00:05 GMT
Hi,
I am using Tomcat 6.0.26 under Eclipse 3.6. I have configured a data source in server.xml:

<Resource auth="Container" 
description="Oracle database" 
driverClassName="oracle.jdbc.driver.OracleDriver" 
logAbandoned="true" 
maxActive="30" maxIdle="10" maxWait="10000" 
name="jdbc/ORACLE" password="xxx" 
removeAbandoned="true" 
removeAbandonedTimeout="60"
type="javax.sql.DataSource" 
url="jdbc:oracle:thin:@vm:1521:bmdev" username="xxx" connectionProperties="SetBigStringTryClob=true"/>

To save BLOBs with Oracle I have to access the OracleResultSet (unfortunatelly) which I extract
as delegate from the DelegatingResultSet provided by the connection pool implementation:

ResultSet rs = stmt.executeQuery();
org.apache.tomcat.dbcp.dbcp.DelegatingResultSet drs = (DelegatingResultSet) rs;
OracleResultSet oracleResultSet = (OracleResultSet) drs.getDelegate();

Then I switched to use Tomcat 6.0.29. I just changed the server runtime in Eclipse. The above
cast to OracleResultSet now fails because the DelegatingResultSet contains another DelegatingResultSet
which again contains the OracleResultSet. So I had to change the code like this:

OracleResultSet oracleResultSet = (OracleResultSet) ((DelegatingResultSet) drs.getDelegate()).getDelegate();

Why do these two versions of Tomcat differ so much? I thought that the third part of the version
(26 or 29) is just a patch level. Why do I have to adjust the application code if I migrate
to another patch level?

Thank you and best regards
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message