对数LocahOption,他是用在get 或者load是加载持续化对象时,
当使用READ UPDREADE 表示共享锁,和修改锁
对于别人,如果也想修改数据,那就得排队wait
Session first=GetConnnection_Session.GetSession();
Transaction ta=first.beginTransaction();
New n=(New)first.get(New.class, 1,LockOptions.UPGRADE);
n.setNew_content(UUID.randomUUID()+"");
try {
} catch (Exception e) {
// TODO: handle exception
System.out.println("matter is happen in this action");
}
first.update(n);
ta.commit();
first.close();
https://zhidao.baidu.com/question/206269850.html