-->
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: Copying databases causes Hibernate to not respond
PostPosted: Thu Sep 04, 2003 11:43 am 
Newbie

Joined: Thu Sep 04, 2003 11:18 am
Posts: 4
Due to some strange requirements from our Oracle DBAs, I cannot access our databases "live", I must copy the data from Oracle to a local MySQL database (yes, it's very lame but totally out of my control). I have written a utility to do this (not using Hibernate, just straight JDBC as it's "legacy"). The problem that I run into is that I run this via cron, outside of the web app and again not using Hibernate, and when it is done running, the web app cannot access the database for a while (until a cache timeout?).

In order to speed up the copy, and because the original data doesn't have any timestamps or anything (ie. a way to know if it's changed), I just delete the contents of the table, then iterate over the ResultSet from the original and insert into the copy. I'm guessing this is when Hibernate looses things.

I am looking for a way to make the copy happen so that Hibernate will notice the changes and just keep "working". I am guessing I will have to do this within the web app (with Quartz to schedule?).

I'm using the Hibernate Struts PlugIn if it makes any difference. Any pointers on either making a copy or making Hibernate aware of what happens underneath it would be appreciated.

Thanks!


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.