[
https://jira.jboss.org/jira/browse/JBPM-1887?page=com.atlassian.jira.plug...
]
Bernd Ruecker commented on JBPM-1887:
-------------------------------------
Okay, I could reproduce the behavior. If the ExceptionHandler itself throws an exception
it can catch, it will hang in an infinitive loop. In my eyes this is a bug and I would
resolve it for next jbpm version (even if I think it doesn't affect a lot of people).
Unfortunately the CVS-history wasn't importent in the new SVN and my "old"
CVS access doesn't work any more (don't know why), so I cannot easily check what
has changed and why it was not there in jbpm 3.2.GA.
Anyway, I would say, an exception caused by an action executed by exception handler should
NOT be handled by the jbpm exception handler. This could be implemented by checking if the
exception is set on the ExecutionContext already:
GraphElement 280:
// If an exception is already set we are in an action of an exception handler
// in this case don't give the exception to the handlers but throw it to the
client
if (executionContext.getException()==null) {
// if an exception handler is available
raiseException(exception, executionContext);
}
else {
// if there is no parent we need to throw an action exception to the client
if (exception instanceof JbpmException) {
throw (JbpmException) exception;
} else {
throw new DelegationException(exception, executionContext);
}
}
What do you guys think? Worked for my local test case. I could add the test case and
commit this change if it doesn't break anything of the test suite... Thoughts?
ExceptionHandler may cause infinite loop
----------------------------------------
Key: JBPM-1887
URL:
https://jira.jboss.org/jira/browse/JBPM-1887
Project: JBoss jBPM
Issue Type: Quality Risk
Security Level: Public(Everyone can see)
Components: Core Engine
Affects Versions: jBPM 3.2.2, jBPM 3.2.3, jBPM 3.3.0 GA
Environment: Windows XP, Java 1.6
Reporter: Marko Petersen
Fix For: jBPM 3.3.2 GA
In case an exception handler class is not available (or causes an exception itself),
3.1.2 and 3.2GA stopped executing the process flow. After upgrading to 3.2.2 or above
(have not tried 3.2.1), if the exception handler class is not available or causes an
exception, that exception seems to be handled by the same exception handler - causing an
(infinite ?) loop. Might this be a bug or is the new behaviour intended? Or am I missing
something?
Thanks for any help.
Marko
--
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