};
try {
runOnce = TaskLocatorUtil.getFixTaskClasses();
} catch (Exception e) {
throw new DotRuntimeException(e.getMessage(), e);
}
Collections.sort(runOnce, comparator);
//PreparedStatement update = null;
try {
for (Class<?> c : runOnce) {
String name = c.getCanonicalName();
name = name.substring(name.lastIndexOf(".") + 1);
String id = name.substring(7, 12);
try {
int taskId = Integer.parseInt(id);
if (FixTask.class.isAssignableFrom(c)) {
FixTask task;
try {
task = (FixTask) c.newInstance();
} catch (Exception e) {
throw new DotRuntimeException(e.getMessage(), e);
}
HibernateUtil.startTransaction();
Boolean shouldrun=task.shouldRun();
if (shouldrun) {
Logger.info(this, "Running: " + name);