try
{
 if(array!=null)
 {
 
conn.setAutoCommit(false);
stmt = conn.createStatement();
Iterator it=array.iterator();
while(it.hasNext())
        {
String sql=(String)it.next();
        stmt.executeUpdate(sql);
        }
conn.commit();
 }
}
catch(Exception e)
{
  try
  {
     conn.rollback();
  }
  catch(SQLException ex)
  {
     ex.printStackTrace();
  }
     e.printStackTrace();

}
这是我的代码,我的sql语句都存储在一个泛型数组里,做个循环读出来后,一起作为一个事务提交,但是,为什么有的sql执行有错误时,其他语句无法执行回滚?
亟盼各位高手赐教!