[jboss-user] [EJB 3.0] - Re: how to prevent multi-access

john_woo@canada.com do-not-reply at jboss.com
Sun Jul 8 09:40:14 EDT 2007


"wolfc" wrote : Use the @Version annotation, see EJB 3 Persistence 9.1.17.
  | 
  | @Version
  |   | @Column(name="OPTLOCK")
  |   | protected int getVersionNum() { return versionNum; }

Thanks for the reply. but where is the document?

further question:
what's the mechanism using @version? I meant we don't have to do it that way, ex. we can use like timestamp field, and treat that field as just regular field, before modifying a record, simply compare the timestamp values.

John

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061706#4061706

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4061706



More information about the jboss-user mailing list