Hi Samuel,

Thanks for your submission. It's great that you want to get involved. Next 
time please have a look at http://jakarta.apache.org/site/source.html 
(especially the "Patches" section), so that you can submit code in a format 
which helps us.

Regarding the specifics of your solution, I'm pretty strongly against the 
inclusion of Vendor-specific JDBC code in James, particularly as part of the 
core.  I've done some work with Oracle in the past, and I was able to store 
Large Binary fields using standard JDBC functionality, without having to 
resort to using the oracle.sql.* classes.

There are some limitations with the Oracle Thin JDBC driver, which does not 
fully support the JDBC spec (notably, certain LOB features). Fortunately, 
using the type3 Oracle driver (which uses native code on the client), gets 
around these issues, as it fully supports the JDBC spec. (However, I'm not 
certain that we would actually require the features missing from the Thin 
driver.)

If this is the fix that you want to use, then feel free to use a patched 
version of James yourself. But I'm currently -1 on this particular patch 
being applied to CVS.

So where to go from here? I would like to try a couple of things (but I don't 
have Oracle installed):
1) Try using a "LONG RAW" datatype in place of "LONG" or "BLOB". I know that 
this datatype is deprecated in Oracle (as is LONG), but it may function 
perfectly with the current James code. This assumes that 
PreparedStatement.setBytes() works on this datatype.
2) Maybe look at trying to modify the "PreparedStatement.setBytes()" call 
(which I think was the original culprit) to instead use 
"PreparedStatement.setBinaryStream()". This should work with Oracle BLOB 
columns, using the Type3 Oracle JDBC Driver. (as well as working with Oracle 
LONG RAW columns and hopefully MSSQL NTEXT columns). This would eliminate the 
need for reading the entire message body into a ByteArrayOutputStream before 
handing it into the PreparedStatement, but will require some more serious 
changes, including a way to obtain the entire message body as an InputStream. 
(Or is this already possible, Serge?)

Hope this helps,
ciao
Daz

On Mon, 25 Feb 2002 21:02, you wrote:
> Serge,
>
> Please find the final patch code for Oracle. You'll need to download two
> vital classes from Oracle to support its JDBC driver (classes12.zip &
> nls_charset12.zip for national char set support).
>
<snip...>

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

Reply via email to