}
final DeploymentUnitDir dudir = pconf.getDeploymentUnit();
// Update in the database.
ProcessState old = exec(new Callable<ProcessState>() {
public ProcessState call(ConfStoreConnection conn) {
DeploymentUnitDAO dudao = conn.getDeploymentUnit(dudir.getName());
if (dudao == null) {
String errmsg = __msgs.msgProcessNotFound(pid);
__log.error(errmsg);
throw new ContextException(errmsg);
}
ProcessConfDAO dao = dudao.getProcess(pid);
if (dao == null) {
String errmsg = __msgs.msgProcessNotFound(pid);
__log.error(errmsg);
throw new ContextException(errmsg);
}
ProcessState old = dao.getState();
dao.setState(state);
pconf.setState(state);
return old;
}
});