1 Reply Latest reply on Nov 26, 2013 9:34 PM by Cory Dahlstrom

    JBoss 7.1.1 Final / OptimisticLockException not happening

    Cory Dahlstrom Novice

      We upgraded our applications from JBoss 4 to JBoss 7.  In our persistence.xml file for our applications we have this set:


      <property name="hibernate.jdbc.batch_versioned_data" value="true" />



      With this property set we are not getting an optimistic lock exception in JBoss 7 when we go to update a stale entity.  We had this same issue years ago and fixed it using a patch defined at the below link ( we use Oracle ).




      However, this patch is not compatible with the version of Hibernate included in the JBoss 7.1.1 Final application server.


      Has anyone seen this and know of an alternative solution?


      NOTE: If I set the "batch_versioned_data" property to false the OptimisticLockException is thrown, at the expense of slowing down our batch updates.