-->
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.  [ 6 posts ] 
Author Message
 Post subject: session.close() question
PostPosted: Wed Aug 29, 2007 6:59 am 
Beginner
Beginner

Joined: Tue Aug 21, 2007 4:58 am
Posts: 30
When I make changes to some objects and the session.closes those changes are commited is there away to close the session without commiting the changes.
Regards


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 29, 2007 7:30 am 
Regular
Regular

Joined: Thu Oct 19, 2006 12:07 pm
Posts: 75
Turn off hibernate.connection.autocommit option in the configuration.

(Are you using transactions ?)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 29, 2007 8:53 am 
Beginner
Beginner

Joined: Tue Aug 21, 2007 4:58 am
Posts: 30
What do you mean by using transactions. I assume that you mean if I define explicitly the transaccions by an advice or something similar. If that is what you mean. The answer it´s yes.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 29, 2007 12:04 pm 
Regular
Regular

Joined: Thu Oct 19, 2006 12:07 pm
Posts: 75
Do you call beginTransaction() and Transaction.commit() ?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 29, 2007 12:08 pm 
Beginner
Beginner

Joined: Tue Aug 21, 2007 4:58 am
Posts: 30
No, I don´t all of that stuff it´s managed by the hibernatetemplate.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 29, 2007 2:44 pm 
Expert
Expert

Joined: Fri Aug 19, 2005 2:11 pm
Posts: 628
Location: Cincinnati
Manually handle your transactions so you can control that better when you need to

_________________
Chris

If you were at work doing this voluntarily, imagine what you'd want to see to answer a question.


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