-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: impl UserType for String <-> CLOB/BLOB in Oracle 8i
PostPosted: Fri Oct 24, 2003 7:48 am 
Newbie

Joined: Thu Oct 23, 2003 8:19 am
Posts: 14
Location: Tampa, FL USA
First, let me say that I'm well aware of http://www.hibernate.org/56.html (for Oracle 9i) and http://www.hibernate.org/76.html (nullSafeSet() does not work), but neither of these approaches seem to work with Oracle 8i. Oracle does not seem to be too thrilled with the single transaction oriented setClob, passing in a Hibernate.createClob(). Oracle wants you to first insert an empty_lob() as a locator, commit, and then obtain a reference via a select, to which you may direct your output stream. Therefore, you must do something like register a Synchronization with the transaction, and implement the CLOB/BLOB select and output stream write in the afterCompletion() callback. However, this assumes that you have some notion of a unique reference to the data you just inserted into the database, and that you could somehow obtain a reference to the transaction instance from inside a UserType impl.

I'm at a loss here. Can somebody throw me a bone? Am I heading down the wrong path?

Cheers.
Steve Maring
Tampa, FL


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.