ex.printStackTrace();
attempt--;
if (attempt > 0) {
con = Manager.reInitConnection(con);
} else
throw new SysException(ex);
}
sql = "select u.id from tasks u \n" + "where u.id=? and \n"
+ "u.processor_id=?";
attempt = 2;
while (true)
try {
pst = con.prepareStatement(sql);
pst.setLong(1, id);
pst.setLong(2, subject_id);
try {
ResultSet rs = pst.executeQuery();
if (rs.next()) {
id_task = id;
} else {
id_task = 0L;
}
rs.close();
} finally {
pst.close();
}
break;
} catch (SQLException ex) {
ex.printStackTrace();
attempt--;
if (attempt > 0) {
con = Manager.reInitConnection(con);
} else
throw new SysException(ex);
}
return id_task;
} catch (SysException ex) {
throw ex;
} finally {