[
https://jira.jboss.org/jira/browse/JBPM-2691?page=com.atlassian.jira.plug...
]
Bernd Ruecker commented on JBPM-2691:
-------------------------------------
I was in a hurry to get it working, I just changed that line to get it working. But I am
still a bit puzzled why the reattached throws an exception if we have a new JbpmSession?
Environment is the soa-p 3.4.0
private void saveJobException(Job job, Exception exception) {
JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
try {
JobSession jobSession = jbpmContext.getJobSession();
// jobSession.reattachJob(job);
job = jobSession.getJob(job.getId());
StringWriter out = new StringWriter();
exception.printStackTrace(new PrintWriter(out));
job.setException(out.toString());
job.setRetries(job.getRetries() - 1);
}
finally {
jbpmContext.close();
}
}
Save exceptions thrown while executing a job in a separate
transaction
----------------------------------------------------------------------
Key: JBPM-2691
URL:
https://jira.jboss.org/jira/browse/JBPM-2691
Project: jBPM
Issue Type: Bug
Affects Versions: jBPM 3.2.8
Reporter: Alejandro Guizar
Assignee: Alejandro Guizar
Fix For: jBPM 3.2.9
Attachments: JobExecutorThread.diff
Original Estimate: 0 minutes
Remaining Estimate: 0 minutes
Currently the stack trace printout is saved in the same transaction provided the
exception is not related to persistence. This scheme has two drawbacks:
1. Exceptions not related to persistence may still leave the job and the process instance
as a whole in an inconsistent state.
2. Persistence exceptions are never saved.
Hence saving the stack trace in a separate transaction would be preferable.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira