-->
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: Oracle Temporary LOB Cleanup Strategy
PostPosted: Thu Mar 11, 2004 6:20 pm 
Regular
Regular

Joined: Fri Dec 12, 2003 2:09 pm
Posts: 84
Location: San Francisco, USA
To handle Oracle CLOBs and BLOBs within Hibernate, my team has implemented custom user types that leverage temporary LOBs as described in the community area:

http://www.hibernate.org/56.html (CLOBs)
http://www.hibernate.org/73.html (BLOBs)

We are now trying to figure out the best way to free those temporary LOBs in order to prevent any resource leaks. Our tests show that a temporary LOB cannot be freed until the PreparedStatement that inserts the corresponding permanent LOB has executed. This means we have to free the LOBs "sometime later", definitely not within the custom user types.

We're not using JTA, so we cannot adopt the strategy described in the community area for freeing temporary LOBs (hook into the JTA transaction manager):

http://www.hibernate.org/56.74.html

(This thread mentions that Hibernate will eventually acquire "proper event handling" -- where can I find out more about this?)

Does Hibernate provide hooks so that, for instance, we could free temporary LOBs right before a session is flushed or a transaction is committed/rolled back? We've considered implementing an Interceptor that frees temporary LOBs in the postFlush method, but this doesn't appear to be an intended use of that mechanism.

Any help is much appreciated!
- nate

p.s. Does anyone have specifics on which resources temporary LOBs hold on to? I'm not clean whether these are JVM resources, database resources, or both.


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.