-->
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.  [ 3 posts ] 
Author Message
 Post subject: Caching and blobs
PostPosted: Tue Feb 24, 2004 4:08 pm 
Beginner
Beginner

Joined: Wed Jan 28, 2004 3:42 pm
Posts: 36
Hi,

I'm using Hibernate 2.1.2 with Oracle9i. I'm following the example from the wiki on blobs and oracle and I'm also using the testcase harness from the hibernate junit tests. I get the following exception while trying to save:

[junit] Blobs are not cacheable
[junit] java.lang.UnsupportedOperationException: Blobs are not cacheable
[junit] at net.sf.hibernate.type.BlobType.disassemble(BlobType.java:60)

When I comment out the line:

Configuration.setCacheConcurrencyStrategy(clazz.getMappedClass(), new NonstrictReadWriteCache());

then of course it works. My question is how can I turn off session caching for this specific persistent class that contains the blob after the fact?

Thanks,
Peter


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 24, 2004 4:12 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
This has allready been discussed: http://forum.hibernate.org/viewtopic.php?t=928097&highlight=blobs+cacheable


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 24, 2004 4:15 pm 
Beginner
Beginner

Joined: Wed Jan 28, 2004 3:42 pm
Posts: 36
Thanks for the reply, but my question still stands, is it possible for me to programmatically disable the session cache afterwards? So I can just override it in my testcases....

I thought something like Configuration.setCacheConcurrencyStrategy(clazz.getMappedClass(), new DisableCaching); or somesuch maybe ?

Thanks!
Peter


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

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.