-->
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: Maintain persistence at all times
PostPosted: Tue Aug 29, 2006 10:23 am 
Newbie

Joined: Tue Aug 29, 2006 10:05 am
Posts: 2
Hi,

first off, I'm rather new to Hibernate. I've spent the last couple of hours browsing websites and manuals with different keywords, but so far have found not answer to my original problem.

We are currently designing a system, which requires object persistence at all times. On startup, the objects are retrieved from the database. Objects created during runtime are passed to a persistency component once for initial storage.
What we were hoping for, especially regarding Hibernate's capability to detect changes to the persistent objects, is a feature that keeps the objects persistent at all times. So, whenever a change occurs, the change is to be committed to the database automatically.
What is the easiest way to achieve this (Hibernate 3.2, Hibernate Annotations)? What we would like to avoid is calling the Persistency Component explicitly. After all, Hibernate KNOWS that there has been a change, it simply doesn't immediately commit it to the database.
The initial idea was to have a "Maintenance Thread" which periodically flushes the session. But the way I see it this does not get me anywere, because the associated transaction (if there even is one) is still not committed.
So I guess the question basically is:
What to I have to do, to create a mechanism which immediatly (or in very short intervals) commits automatically detected changes to the database without invoking any update/save-methods from the outside.

Thank you for any input, manual references, ...

Rouven


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 29, 2006 1:20 pm 
Newbie

Joined: Wed Oct 26, 2005 11:55 pm
Posts: 14
I don't know if Hibernate can support this mode of operation (perhaps though some creativity), but there are a couple of other products that might provide what you need:

Prevalyer is a transparent persistence framework that behaves like a giant in-memory cache, although it does so with some tradeoffs. Its home is at http://www.prevayler.org/ (although the site appears to be down right now.

Also, GemStone used to offer a transparent persistence "fabric" with their app server. The company has changed hands and directions since then, but it appears they still have similar produts. However, GemStone is enterprise-class software and priced accordingly.

Hope this helps (please give credit if it does),
Eric


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 29, 2006 1:55 pm 
Newbie

Joined: Tue Aug 29, 2006 10:05 am
Posts: 2
Hi,

thanks for the input. But we are set to use Hibernate. Either we will implement some mechanism ourselves or find a different approach.

Rouven


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.