Hello,
I am using appfuse-jsf 1.9.4.
In the following save function, whenever an internalEvaluation details is inserted I am updating
the manuscript status. My question is will this insert and update comes under same transaction?
public String save()
{
boolean isNew = (internalEvaluation.getId() == null);
internalEvaluationManager.saveInternalEvaluation(internalEvaluation);
String key = (isNew) ? "internalEvaluation.added" : "internalEvaluation.updated";
addMessage(key);
String manuscriptId = (String)FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get( "manuscript_id_p");
manuscript = manuscriptManager.getManuscript(manuscriptId);
String processId = (String)FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get( "process_id");
manuscript.setStatus(Integer.valueOf(processId));
manuscriptManager.saveManuscript(manuscript);
if (isNew)
{
return "list";
}
else
{
return "edit";
}
}
Thank you.
Sudheer
|