Greetings all:

First of all, I'm new to the jboss-dev mailing list, so go easy on
me.  This is my first message to the list and today was my first day
with the jBoss source, so I apologize in advance if my ignorance
shines through ...

There is a limitation in the standard Oracle 8i jdbc type IV driver
(classes12.zip) that makes it such that you cannot issue the setNull()
method on a PreparedStatement for certain "unsupported" types from the
java.sql.Types class.  One of these types happens to be BLOB.

Our project is using JAWS extensively, including functionality such as
nesting entity beans, nesting collections of entity beans, etc.
Because of the aforementioned limitation, it's exceedingly difficult
(near impossible) to ejbCreate() entity beans without first
initializing all of the fields which happen to be nested entity beans
or collections.  The reason is that we map java objects to BLOBs in
the standardjaws.xml file.

After decompiling the Oracle driver code and looking at the source, I
was unable to patch it successfully -- the decompiler rendered some of
Oracle's source uncompilable.  :-(  However, with a one-line
configuration file (standardjaws.xml) change and a one-line change to
org/jboss/ejb/plugins/jaws/jdbc/JDBCCommand.java, I *WAS* able to work
around the problem.  The diff of JDBCCommand.java is below.  The
standardjaws.xml file change is just a matter of changing JAVA_OBJECT
to BLOB for the Oracle8 configuration.

This has been tested and works to solve the aforementioned problem on
JBoss-2.0-FINAL (I'm not using pre-2.1.)

Here are the issues:

1- Will you accept the patch so that when my company upgrades to 2.1
when it is released, I don't have to re-patch it?

2- Is the patch dangerous for non-Oracle databases?  Personally, I
don't see much harm.

---------------------- FILENAME ----------------------
org/jboss/ejb/plugins/jaws/jdbc/JDBCCommand.java:
--------------------- BEGIN DIFF ---------------------
290c290
<           if (jdbcType == Types.JAVA_OBJECT) {
---
 >           if (jdbcType == Types.JAVA_OBJECT || jdbcType == Types.BLOB) {
---------------------- END DIFF ----------------------

Thanks.

++Jeff
[EMAIL PROTECTED]


Reply via email to