-->
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.  [ 2 posts ] 
Author Message
 Post subject: Simultaneous database table access
PostPosted: Mon May 11, 2009 5:17 am 
Newbie

Joined: Thu Feb 07, 2008 6:48 am
Posts: 14
Hello all,

I'm working on an application with (nhibernate v2.0.1.4000). Everything is going fine. I was able to
add a <version> property to my mapping file. So from now on I'm able to detect (external) changes to one of my
records.

But I still have a question about 'show the most recent data'.
Suppose I have two applications (A and B) using the same table.

- Application A and B are running.

- Application A is doing some modifications to the table X.

- When Application B queries the rows on the same table X it will put the data in it's cache... So from that point in time... Application B always
works on this cached version. When application A continues making changes to the content of table X these changes are not visible to Application B.

What is the best way to solve this issue? Do I need to use another caching-strategy? How do you solve issues like this?
For the moment I solve this issue by closing the session: Session.Close(). On the next query nHibernate will go fetch the most recent data from the database.
But I think this is not the correct way?


Top
 Profile  
 
 Post subject: Re: Simultaneous database table access
PostPosted: Wed Jul 01, 2009 3:12 pm 
Newbie

Joined: Sat May 30, 2009 11:42 am
Posts: 15
Hi,

Have you ever found a solution to this ? I am experiencing the same issue as to where a service (multiple actually) is running in the back and doing stuff on objects in the database. The Gui AND web application that use the same database don't see these changes unless i'm refreshing/evicting objects out of the cache all the time which is not the idea :s


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