-->
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: Hibernate x External DB changes
PostPosted: Sun Mar 06, 2005 12:02 pm 
Newbie

Joined: Mon Oct 04, 2004 8:53 am
Posts: 10
Hibernate version: 2.1.7
Name and version of the database you are using: MySQL 4.0.23

How do I configure the Hibernate to recognize all changes done by external events in the database ?

My configuration is only:
props.put("hibernate.show_sql","false");
props.put("hibernate.dialect","net.sf.hibernate.dialect.MySQLDialect");
props.put("hibernate.transaction.factory_class","net.sf.hibernate
transaction.JDBCTransactionFactory");

Thanks,

Glauber Andrade


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 07, 2005 10:50 am 
Newbie

Joined: Mon Oct 04, 2004 8:53 am
Posts: 10
Nobody??


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 07, 2005 10:04 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Maybe if we had some idea what you are talking about...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 08, 2005 2:55 pm 
Newbie

Joined: Mon Oct 04, 2004 8:53 am
Posts: 10
I have a system using Hibernate and the database also is modified by an external system.

I would like to know how to configure the Hibernate so that it recognizes the modifications made in the database.

The current configuration it not "refresh" and it keeps an old image of the base.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 08, 2005 5:06 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Yes that is true.

Caching data from a database to which your application does not have exclusive access is a *bad* idea.

Hibernate does not just periodically query the database to look for stale data (you do of course realize the performance cost this would mean, right?).

What you need here is some locking strategy, either pessimistic or optimisitic.


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.