JobInstance j = em.find(JobInstance.class, idJob, LockModeType.PESSIMISTIC_READ);
jqmlogger.trace("The " + j.getState() + " job (ID: " + idJob + ")" + " will be marked for kill");
j.setState(State.KILLED);
MessageJi m = new MessageJi();
m.setJobInstance(j);
m.setTextMessage("Kill attempt on the job");
em.persist(m);
em.getTransaction().commit();
}
catch (NoResultException e)
{