解决方案 »

  1.   

    你可以尝试一下hibernate的批量更新,http://blog.csdn.net/uohzoaix/article/details/7372427
      

  2.   

    把这三个操作放在service层里面的一个方法里就行了,事务管理管理service的方法
      

  3.   

    是的,事物可以管理这三个update操作同时成功的时候提交,但是我的Update是成功了,我要每个返回值都不是0或者其他特定的返回值才能提交.
    service的方法不能管理.
      

  4.   

    if xx=0 throw e 
    else{
    if xxx=0 throw
    是这样么?
      

  5.   

    Hql1="update a set a.name='aa' where a.id=1";
    Hql2="update b set b.name='bb' where b.id=1";
    Hql3="update c set c.name='cc' where c.id=1";
    if(query.executeUpdate(hql1)==0)throw e;
    if(query.executeUpdate(hql2)==0) throw e;下面同理
    if xx=0 throw e 
    else{
    if xxx=0 throw
    是这样么?