The BMP process you are following to both make the Clob work and to use the thin 
driver are the rubs. Here is what I have found:

1. The OCI driver allows you to bypass all the Oracle proprietary calls to empty_lob 
etc. etc. unless the size of the LOB is less than ~1024 bytes (not surgically sure 
that number is correct, but it is small....). This seems to me to be a limitation of 
Oracle's Type 4 driver, but I suppose it's possible that you might be able to fiddle 
with it and make it work. However, the thin driver does not really have much in the 
way of fine tunable parameters.

2. I have been able to get BLOBS to work seamlessly. However, instead of using a byte 
array or some such data type, I simply define it as a java.sql.Blob. e.g. code from my 
bean:

/**
  |  * getNotes()
  |  * XDoclet Field Tags for Notes
  |  *
  |  * @return  the Notes
  |  * @ejb.persistence
  |  *   column-name="NOTES"
  |  * @jboss.column-name NOTES
  |  * @jboss.method-attributes
  |  *   read-only=true
  |  * @jboss.load-group
  |  *   name="lazy"
  |  */
  |   public abstract java.sql.Blob getNotes();
  | 
  | /**
  |  * setNotes(java.sql.Clob notes)
  |  * @param notes
  |  */
  |   public abstract void setNotes(java.sql.Blob notes);
  | 
  | 

The actual implementation of the java.sql.Blob is 
org.jboss.ejb.plugins.cmp.jdbc.ByteArrayBlob  which works quite nicely. The only 
limitation, which does not affect me is that the blob payload is immuatble.

This worked really well, and I assumed it would be trivial to convert the Blob 
handling over to Clobs based on the ByteArrayBlob. You simply need to implement 
java.sql.Clob, which is basically a matter of wraping a StringBuffer and implementing 
the methods in the interface.

Or so I though. Actually, I am still wrestling with it and I could not get it to work 
yet. Perhaps I missed something silly, but the Blobs do the job admirably, so I have 
not really pursued the Clob that aggresively.

Let me know what you find. Perhaps we can get the Clob stuff working.

//Nicholas

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3832176#3832176

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3832176


-------------------------------------------------------
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to