-->
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: real-time replication of RAM db to FS based DB
PostPosted: Tue Jan 05, 2010 8:43 am 
Newbie

Joined: Tue Aug 25, 2009 3:25 am
Posts: 6
What is the best way to ensure that a hibernate accessed/managed RAM db gets backed up in real time?

I have a web app which uses a RAM db for performance reasons. Most tables are read-only and are loaded on app start-up. The read-write tables need to be replicated in real time to an FS db. I'm using hsql. Hsql's file system persistence mechanism does not qualify because it requires a "CHECKPOINT" which writes the entire database to a sql script file.

I'm thinking of using the replication feature as described in section 10.9 of http://docs.jboss.org/hibernate/core/3. ... state.html to replicate entities from the RAM DB to a file system db. Obviously I would like to hide this replication stuff from my application logic as is NOT the case in the example given in the docs. I'm thinking I should implement PostInsertEventListener, PostDeleteEventListener, PostUpdateEventListener and do the replication there. Also, I would extend Spring's OpenSessionInViewFilter to open/close the second (not RAM-db) session.
Is this the way to go? Are there alternatives? Should I use the hibernate listeners or Interceptor?

Thanks in advance.
Stefaan


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.