tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Different DelegatingResultSet.getDelegate() between Tomcat 6.0.26 and 6.0.29
Date Tue, 28 Sep 2010 21:13:08 GMT
Hash: SHA1


On 9/21/2010 3:00 AM, Andreas Knees wrote:
> I am using Tomcat 6.0.26 under Eclipse 3.6.


> Then I switched to use Tomcat 6.0.29. [Now,] DelegatingResultSet
> contains another DelegatingResultSet which again contains the 
> OracleResultSet.

Try reading:

Hint: search for "dbcp"

> To save BLOBs with Oracle I have to access the OracleResultSet
> (unfortunately)

I'm not convinced. Why doesn't anyone want to use the Java APIs for blobs?

PreparedStatement ps = conn.prepareStatement("INSERT INTO table
(blobField) VALUES (?)");

ps.setBinaryStream(/* input stream containing by blob */);


Want to update a BLOB? How about ResultSet.updateBinaryStream()?

> 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();

You should be using DelegatingResultSet.getInnermostDelegate().

> 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?

It's not documented very well, but you almost always want to use
DelegatingResultSet.getInnermostDelegate. You're right, though: it's
unfortunate that a point release ended up causing code incompatibilities.

I read-through the DBCP changelog, and they don't say anything at all
about a change in behavior from 1.2.2 (old Tomcat DBCP dependency) to 1.3.

Would you care to make a note on the "upgrading" section of the wiki?

- -chris
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message