public int[] batch(String sql, Object[][] params) throws SQLException {
		Connection conn = null;
		PreparedStatement stmt = null;
        int[] rows = null;
        try {
        	conn = getConnection();
        	boolean autoCommit = conn.getAutoCommit();
        	conn.setAutoCommit(false);
            stmt = conn.prepareStatement(sql);

            for (int i = 0; i < params.length; i++) {
                fillStatement(stmt, params[i]);
                stmt.addBatch();
            }
            rows = stmt.executeBatch();
            
            conn.commit();
            conn.setAutoCommit(autoCommit);
        } catch (SQLException e) {
           throw e;
        } finally {
        	try {
        		DbUtils.close(stmt);
			} catch (Exception e2) {
			}
        	closeConn(conn);
        }
		
		return rows;
	}