-->
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.  [ 4 posts ] 
Author Message
 Post subject: object version checking w/o transactions?
PostPosted: Mon Apr 17, 2006 9:18 pm 
Regular
Regular

Joined: Thu May 26, 2005 12:20 am
Posts: 72
Hibernate version:v3.0

Do I need to use explicit transactions to use the <version ../> functionality for objects? I cant seem to get it to work at all the way I am set up now:

- no transaction manager
- flush mode FLUSH_AUTO, with Spring's OpenSessionInViewInterceptor

Thanks!

_________________
_________________
dan

If what I say is helpful, please rate the post as such by clicking 'Y'. I appreciate it.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 18, 2006 7:01 am 
Senior
Senior

Joined: Tue Mar 09, 2004 2:38 pm
Posts: 141
Location: Lowell, MA USA
If the code your working with is making changes to a persistent object, you need a transaction irrespective of weather or not a version ID is used. It is even more true when a version ID is being used. Weather it be JTA, or a Hibernate transaction, a transaction will be required.

Ryan-

_________________
Ryan J. McDonough
http://damnhandy.com

Please remember to rate!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 18, 2006 11:49 am 
Regular
Regular

Joined: Thu May 26, 2005 12:20 am
Posts: 72
With the OpenSessionInViewInterceptor with flushMode set to FLUSH_AUTO, I dont ever open/commit/close transactions explicitly... and it works fine. but no version love. is that the (inherent) downside of not demarking my transactions myself?

_________________
_________________
dan

If what I say is helpful, please rate the post as such by clicking 'Y'. I appreciate it.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 19, 2006 6:59 am 
Senior
Senior

Joined: Tue Mar 09, 2004 2:38 pm
Posts: 141
Location: Lowell, MA USA
Oh ok, please pardon my ignorance of the OpenSessionInViewInterceptor. So updates are happening just fine, but the version is not? What does your mapping file look like? If you can't show the whole thing, prehaps just the beginning with the version element would suffice.

Ryan-

_________________
Ryan J. McDonough
http://damnhandy.com

Please remember to rate!


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