-->
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.  [ 5 posts ] 
Author Message
 Post subject: Is hibernate meant to be used this way
PostPosted: Wed May 12, 2004 4:13 am 
Newbie

Joined: Wed May 12, 2004 1:57 am
Posts: 2
hi all,

We need a tool that could reflect the content of a table in database.
The table is changed (from outside) about once an hour, so I want to be able to query the table without making a real select on each request but instead query some kind of cache that will be synchronized with the real table.

so my question is whether Hibernate (or other O-R tool) can do that? and how?

Thanks
Anat


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 12, 2004 4:47 am 
Senior
Senior

Joined: Fri Nov 21, 2003 5:55 am
Posts: 155
Hi Anat,

If I understand your question, you don't really need hibernate.
You only need to creat a good model object with a cache to keep your data and a messaging system who invalidate your data in cache when an update or delete or insert is done.
You could use Hibernate for queries, but this is not the goal of hibernate.
You may use some pattern to do this.
I hope I answer your question.


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 12, 2004 4:54 am 
Regular
Regular

Joined: Wed May 12, 2004 3:03 am
Posts: 51
Location: France
Hi,

I don't understand what you really want to do...
Hibernate is a tool that helps you storing and querying relationnal databases in Object Oriented Applications. Hiberate gives you many options to do this in a very optimized way. It uses a cache to save the real modifications made on objects and then optimizes the queries.

Tell me more about your need, and I'll see if I could help...

Charles


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 12, 2004 6:21 am 
Newbie

Joined: Wed May 12, 2004 1:57 am
Posts: 2
Thanks for your quick answers, I'll try to clarify my problem.

I have a data that is stored in a table in Oracle.
This data is updated once an hour by a job running in the database.

My application needs to check each user request against this data.
I don't want to make a 'select' on every request (too slow) and instead I want to make the check against a mirror (cache?) located in memory.

But I need the data to be up-to-date as much as possible (I can do with a delay of a few minutes but not more).

Thanks again
Anat


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 12, 2004 6:22 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
It might be possible to come up with a Hibernate solution, but its certainly not a good scenario. You will probably be much faster writing something yourself than learning Hibernate.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.