-->
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: Cache management and suitable strategy
PostPosted: Fri Nov 10, 2006 11:37 am 
Newbie

Joined: Thu Mar 09, 2006 7:02 am
Posts: 6
Location: Kiev
Hibernate version:3.1.3
Name and version of the database you are using:Oracle 9.2


Hi,

I’m using Hibernate with second-level and query cache, as cache provider - JBoss TreeCache. Web-application is using in cluster. Like a strategy – “transactional” for all instances and collection.

I have the following situation:

One time per day I need to make new “import” to database. It means remove all Rows from 10 Table and insert new. Time, when database is empty – about 60 seconds (I’ve measured time before Hibernate started to removing instances and after finished saving new). This happened in one transaction (duration of transaction – 5 Minutes).

During this 60 second my application can’t do anything, but I need to keep it available. One of the possibilities is not to update cache during this 60 seconds and Hibernate will get data from cache when database is empty.

The first question:
Do you how can I manage Hibernate and don’t clear cache for 60 seconds when database already empty?(Hibernate still should use cache)

Also I’m not sure if strategy “transactional” suitable for instance that could be changed only 1 time per day.

The second question:
What is the better strategy for instance that could be changed only one time per day? “read-only” or “transactional”. If “read-only”, have can I with JBoss TreeCache manage life-time of instance?

Database is empty for 60 seconds because I use value from sequence for new Object ID and Hibernate makes a lot of requests to this sequence.

The third question:
Can I somehow increase performance of Hibernate when it requests new value from sequence 4000 times for ID?

Thanks in advance

_________________
Oleksandr Markelov
SCJP, SCWCD, SCBCD


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.