-->
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.  [ 1 post ] 
Author Message
 Post subject: Optimistic concurrency
PostPosted: Mon Apr 14, 2008 7:44 pm 
Newbie

Joined: Mon Apr 14, 2008 7:32 pm
Posts: 2
Hi.

We are trying to get optimistic concurrency setup on a project that use JSF, Spring and Hibernate. We've added a version field (INTEGER) to our database table, and added these annotations to the persistance object (the BO layer):

@Version
@Column(name="version", nullable=true, length=10)
protected Integer version;

(Using the typical BO->BL->VO->Managed Bean architecture.)

But for some reason, the version field does not increment when editing and saving the record. It's always null. I have to figure it out if I want to handle the exception and send a feedback to our application's users.

Can anyone help me out with this?

Before responding, please keep in mind we are using Spring as the persistance mapping. That means we have no <class> tag. They are <bean> tags that do not have the same attributes than Hibernate's.

Thanks
Hugo


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.