-
1. Re: How to configure jboss for optimistic locking?
nraghuram Oct 15, 2003 10:58 PM (in response to equine)You need to modify the container configuration in jboss.xml and also make changes at the entity level in jbosscmp-jdbc.xml
I am using version based locking (there are other options also like timestamp and modified fields) .
I had to add the foll to each entity which required optimistic locking in jbosscmp-jdbc.xml
<optimistic-locking>
<version-column/>
<field-name>versionNo</field-name>
<column-name>VERSION_NO</column-name>
<jdbc-type>BIGINT</jdbc-type>
<sql-type>NUMBER</sql-type>
</optimistic-locking>
In jboss.xml the foll changes to the container configuration
<locking-policy>org.jboss.ejb.plugins.lock.JDBCOptimisticLock</locking-policy>
hth
raghu -
2. Re: How to configure jboss for optimistic locking?
equine Oct 16, 2003 11:32 AM (in response to equine)Do I need to create any field on database table?
-
3. Re: How to configure jboss for optimistic locking?
nraghuram Oct 16, 2003 11:40 PM (in response to equine)yes. in my case i created the VERSION_NO field . but if u are using locking strategy based on modified fields then u dont. for version locking and timestamp based locking u will need the field
raghu