-->
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: Using Same Hibernate Session
PostPosted: Fri Jun 17, 2005 6:15 pm 
Beginner
Beginner

Joined: Fri Apr 15, 2005 4:53 pm
Posts: 29
Hi,
I've a webapp and a console application that work together. They share the same Database and hibernate mapping files but using different hibernate sessions. It seems that everything that I do in one session (insert, delete...) is not visible to other session until the server restart. Is there a way I could use same session?


Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 20, 2005 3:50 am 
Beginner
Beginner

Joined: Fri Feb 11, 2005 12:03 pm
Posts: 48
Location: Kiel, Germany
The Session object is the first-level cache. Changes made in the scope of a Session object are not immediately propagated to the database.
Even the changes made using Session objects in one application are independent of each other.
The changes in a Session are generally flushed to the database after the transaction is committed or when session.flush() is called.

When do you flush the session?


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.