Hi Dain,

I've been doing some work on making the "binary data" support more 
portable in JDBCUtil.java.

In particular, I wanted to get all use cases of this working with 
Oracle, where (despite what I may have said before) there are still 
issues with BLOBS.

Current Oracle JDBC drivers absolutely do support the use of the 
java.sql.* apis for accessing LOBS and the other forms of binary data 
(VARBINARY, etc).

I believe that you added the code that uses 
org.jboss.ejb.plugins.cmp.jdbc.ByteArrayBlob to try and resolve the 
Oracle issues. Please correct me if I am wrong as I've ditched it 
because Oracle barfs on it (technically, the provision of a 
java.sql.Blob implementation is in the driver's domain).

The only other issue was the use of "byte[] bytes = 
rs.getBytes(index);" in getResult. According to the javadoc, 
ResultSet.getBytes() returns "raw" bytes from the driver. In Oracle's 
case, this seems to be the LOB pointer or something, rather than the 
LOB data. However, going direct to ResultSet.getBinaryStream works 
fine, so I've modified convertByteArrayToObject to take an InputStream 
instead, which seems to be a bit more streamlined as you were wrapping 
the array in a ByteArrayInputStream anyway, unless it already happened 
to be expecting a byte array.

Currently, I have my changes working in Branch_3_0, and the cmp2 test 
suite passes using both Hypersonic and Oracle. I'll get it working in 
Branch_3_2 as well.

I want to emphasize that I have not used any Oracle apis for this work, 
only the java.sql.* interfaces.

This will not fix the Oracle issues with LOB size when using the "thin" 
drivers. The only way to fix that problem is to use the "oci" drivers.

Anyway, I wanted to run this past you and make sure that I'm not 
working at cross purposes with anyone else before checking it in.

Steve Coy



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to