-->
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: Update/invalidate session cache
PostPosted: Sat Jun 17, 2006 11:38 am 
Newbie

Joined: Sun Jun 04, 2006 8:41 pm
Posts: 13
Hello,

With this I update my help request. Based on the demo application
CaveaTemptor I build a web application with Tomcat, Mysql, Hibernate 3 and Common Controls. Within one browser session everything from update, select and delete works without any problems.

If I have second or third browser session the updates of data in one session is not propagated to the other browser session. The session are not invalidated by Hibernate and loads the data from the session cache and not from the database. Against this behaviour new data stored by save is visible for other browser session. If I clear the session before loading the data of other browser session are visible. But I don't like to use clear() because I will use lazy loading.

What can I do? I search for solution for more then two weeks and have also placed some posting in this forum, but without any concret solutions.

Is this really my own problem. I think the update the session cache of other browser sessions should be done by Hibernate. Does Hibernate do this?

Thanks
Thomas


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 18, 2006 10:37 pm 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
No, Hibernate doesn't do that. Either you want cached (and thus potentially stale) data, or you want non-stale (and there's probably not cached) data. The database does not push information out along Hibernate's JDBC connections, and Hibernate Sessions do no tell each other what they are doing (how can they, seeing as different sessions can easily be on different machines, possibly even on different networks, just connected to the same database).

If you have any requirements like this, you have to solve the problems independently of Hibernate. Application servers are good platforms for solving this sort of problem: if you're using anything more light-weight, then you're probably letting yourself in for a lot of work.

_________________
Code tags are your friend. Know them and use them.


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.