我被检查的NHibernate的日志文件同步数据库状态,并发现了随机误差,如下: NHibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [MaltaIndependent.Modules._Au
我有这样的方法: @Transactional(propagation = Propagation.REQUIRES_NEW)
public void doSomeWork(){
Entity = entity = dao.loadEntity();
// do some related work
...
try {
dao.saveEntity(entity);
}
ca
我不知道什么是赶在6的JavaEE的OptimisticLockException最好的方式,我有以下EJB: @Stateless
public class SeminarBooking {
public void bookSeminar(Long seminarId, int numberOfPersons) {
...
//check capacity & do b
在我们的旧数据库结构中,我们在一个表中有两个字段在我们更改数据时得到更新。 create table dbo.example(
name varchar(50),
...,
changed smalldatetime, -- here we save the last update date
version int -- and here we incr