假如不做rollback...

白糖_ 2011-06-03
jdbc代码:
Connection conn = 。。。;
         boolean success = false;
         try{
                conn.setAutoCommit(false);
                //从一个人那里扣钱
                //往另一个人那里加钱
                conn.commit();
                success = true;
         }
          catch(SQLException e){
                 conn.rollback();
                 success = false;
          }

假如:catch块中不写conn.rollback();发生异常时,jdbc会怎么处理呢!?
francis.xjl 2011-06-04
估计是不释放资源,一直等待,直到timeout,此后,rollback,然后释放资源?
Global site tag (gtag.js) - Google Analytics