[jbpm-commits] JBoss JBPM SVN: r4078 - jbpm3/trunk/modules/core/src/main/java/org/jbpm.
do-not-reply at jboss.org
do-not-reply at jboss.org
Sat Feb 28 04:01:22 EST 2009
Author: alex.guizar at jboss.com
Date: 2009-02-28 04:01:22 -0500 (Sat, 28 Feb 2009)
New Revision: 4078
Modified:
jbpm3/trunk/modules/core/src/main/java/org/jbpm/JbpmConfiguration.java
Log:
undo top JbpmContext pushback
Modified: jbpm3/trunk/modules/core/src/main/java/org/jbpm/JbpmConfiguration.java
===================================================================
--- jbpm3/trunk/modules/core/src/main/java/org/jbpm/JbpmConfiguration.java 2009-02-28 08:36:10 UTC (rev 4077)
+++ jbpm3/trunk/modules/core/src/main/java/org/jbpm/JbpmConfiguration.java 2009-02-28 09:01:22 UTC (rev 4078)
@@ -603,17 +603,14 @@
void popJbpmContext(JbpmContext jbpmContext) {
List<JbpmContext> stack = getJbpmContextStack();
- if (stack.isEmpty()) {
- throw new JbpmException("closed JbpmContext more than once... "
+ int size = stack.size();
+ if (size == 0) {
+ log.warn("closed JbpmContext more than once... "
+ "check your try-finally clauses around JbpmContext blocks");
}
- JbpmContext topContext = stack.remove(stack.size() - 1);
- if (jbpmContext != topContext) {
- // put the other context back
- stack.add(topContext);
- // prevent our context from remaining in the stack
- stack.remove(jbpmContext);
- throw new JbpmException("closed JbpmContext in some order that differs from creation... "
+ else if (jbpmContext != stack.remove(size - 1)) {
+ stack.remove(jbpmContext); // prevent context from remaining in the stack
+ log.warn("closed JbpmContext in some order that differs from creation... "
+ "check your try-finally clauses around JbpmContext blocks");
}
}
@@ -624,8 +621,8 @@
}
void jbpmContextClosed(JbpmContext jbpmContext) {
- popJbpmConfiguration();
popJbpmContext(jbpmContext);
+ popJbpmConfiguration();
}
public void startJobExecutor() {
More information about the jbpm-commits
mailing list