-->
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: Cached object updated via SP
PostPosted: Tue Apr 27, 2004 11:41 am 
Regular
Regular

Joined: Fri Nov 07, 2003 6:31 am
Posts: 104
Location: Beijing, China
Hi everyone,

I unfortunately have to lauch some SP in my webapp for some heavy data updates.

I'm using ehcache as second level cache.
I'm actually launching the SP with JDBC. So of course ehcache doesn't know about it and my cached persistent objects are getting out of date.

I'm looking for a good elegant way to handle this pb. I know i could use a custom persister but I can't picture how that could solve my problem.

does Spring provides such a feature?

any help /idea is greatly welcome!

thanks,
nodje


Last edited by nodje on Tue Jun 03, 2008 5:34 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 27, 2004 2:02 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Well just evict your objects from the cache after you launched the SP, you know when it happens don't you?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 28, 2004 4:02 am 
Regular
Regular

Joined: Fri Nov 07, 2003 6:31 am
Posts: 104
Location: Beijing, China
Well, I wish I could have find a way to make HIbernate knows about object updated by an SP.
I realize it was probably hopeless, I don't see anyway for hibernate to catch what is like an "external" data modification.

But using the SessionFactory.evict* method is specified as occuring
Quote:
outside
of any transaction; it performs an immediate "hard" remove, so does not respect any transaction isolation semantics of the usage strategy


So how can I isolate theobjects modified by SP?
Is there any way start a transaction when triggering a SP with JDBC?

Sorry for the newbie's questions, but my knowledge of transactionnal aspects is very fresh and thin.


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.