From do-not-reply at jboss.org Thu May 12 03:43:50 2011
Content-Type: multipart/mixed; boundary="===============7091044791465714421=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: jbpm-commits at lists.jboss.org
Subject: [jbpm-commits] JBoss JBPM SVN: r6917 - in
jbpm3/branches/jbpm-3.2-soa/core/src/test: java/org/jbpm/soa2010 and 2 other
directories.
Date: Thu, 12 May 2011 03:43:49 -0400
Message-ID: <201105120743.p4C7hnjf003124@svn01.web.mwc.hst.phx2.redhat.com>
--===============7091044791465714421==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: marco.rietveld
Date: 2011-05-12 03:43:49 -0400 (Thu, 12 May 2011)
New Revision: 6917
Added:
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/soa2010/
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/soa2010/SOA2010T=
est.java
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.gp=
d.processdefinition1.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.gp=
d.processdefinition2.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.gp=
d.processdefinitiona.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.gp=
d.processdefinitionb.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pro=
cessdefinitiona.jpg
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pro=
cessdefinitiona.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pro=
cessdefinitionb.jpg
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pro=
cessdefinitionb.xml
Log:
SOA-2010 Conditional transition cannot be considered as a default one
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/soa2010/SOA2=
010Test.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/soa2010/SOA2010=
Test.java (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/soa2010/SOA2010=
Test.java 2011-05-12 07:43:49 UTC (rev 6917)
@@ -0,0 +1,90 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.soa2010;
+
+import org.jbpm.JbpmException;
+import org.jbpm.db.AbstractDbTestCase;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.graph.exe.ProcessInstance;
+
+/**
+ * Conditional transition cannot be considered as a default one (for a Nod=
e). =
+ * =
+ * @see SOA-2010
+ * @author Marco Rietveld
+ */
+public class SOA2010Test extends AbstractDbTestCase {
+ =
+ protected void setUp() throws Exception {
+ super.setUp();
+ }
+
+ /**
+ * Illustrate the following:
+ * - node with no unconditional transitions
+ * - transition with a condition that evaluates to false, as first trans=
ition (in jpdl doc) =
+ * - other conditional transitions also present from node
+ * =
+ * will throw an exception because the first/default transition is condi=
tional evaluating to false. =
+ */
+ public void testNodeWithFalseDefaultConditionalTransition() {
+ ProcessDefinition processDefinition =3D ProcessDefinition.parseXmlReso=
urce("org/jbpm/soa2010/processdefinitiona.xml");
+ deployProcessDefinition(processDefinition);
+ =
+ ProcessInstance processInstance =3D jbpmContext.newProcessInstance("so=
a2010a");
+ boolean exceptionThrown =3D false;
+ try {
+ processInstance.signal();
+ }
+ catch(JbpmException je) {
+ assertTrue("expected exception on condition", je.getMessage().contai=
ns("guarding Transition(to false) not met"));
+ exceptionThrown =3D true;
+ }
+ assertTrue("expected exception on condition", exceptionThrown);
+ }
+ =
+ /**
+ * Illustrate the following:
+ * - node with no unconditional transitions
+ * - transition with a condition that evaluates to true, as first transi=
tion (in jpdl doc) =
+ * - other conditional transitions also present from node
+ * =
+ * will succeed, because first/default is conditional that eval's to tru=
e. =
+ * =
+ * (otherwise EXACTLY the same jpdl/graph as previous test)
+ */
+ public void testNodeWithTrueDefaultConditionalTransition() {
+ ProcessDefinition processDefinition =3D ProcessDefinition.parseXmlReso=
urce("org/jbpm/soa2010/processdefinitionb.xml");
+ deployProcessDefinition(processDefinition);
+ =
+ ProcessInstance processInstance =3D jbpmContext.newProcessInstance("so=
a2010b");
+ try {
+ processInstance.signal();
+ }
+ catch(JbpmException je) {
+ fail("Did not expect exception: " + je.getMessage() );
+ }
+ assertEquals("true-condition-end", processInstance.getRootToken().getN=
ode().getName());
+
+ }
+ =
+}
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbp=
m/soa2010/SOA2010Test.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010=
/.gpd.processdefinition1.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.g=
pd.processdefinition1.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.g=
pd.processdefinition1.xml 2011-05-12 07:43:49 UTC (rev 6917)
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/or=
g/jbpm/soa2010/.gpd.processdefinition1.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010=
/.gpd.processdefinition2.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.g=
pd.processdefinition2.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.g=
pd.processdefinition2.xml 2011-05-12 07:43:49 UTC (rev 6917)
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/or=
g/jbpm/soa2010/.gpd.processdefinition2.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010=
/.gpd.processdefinitiona.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.g=
pd.processdefinitiona.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.g=
pd.processdefinitiona.xml 2011-05-12 07:43:49 UTC (rev 6917)
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/or=
g/jbpm/soa2010/.gpd.processdefinitiona.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010=
/.gpd.processdefinitionb.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.g=
pd.processdefinitionb.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.g=
pd.processdefinitionb.xml 2011-05-12 07:43:49 UTC (rev 6917)
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/or=
g/jbpm/soa2010/.gpd.processdefinitionb.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010=
/processdefinitiona.jpg
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/or=
g/jbpm/soa2010/processdefinitiona.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010=
/processdefinitiona.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pr=
ocessdefinitiona.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pr=
ocessdefinitiona.xml 2011-05-12 07:43:49 UTC (rev 6917)
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/or=
g/jbpm/soa2010/processdefinitiona.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010=
/processdefinitionb.jpg
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/or=
g/jbpm/soa2010/processdefinitionb.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010=
/processdefinitionb.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pr=
ocessdefinitionb.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pr=
ocessdefinitionb.xml 2011-05-12 07:43:49 UTC (rev 6917)
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/or=
g/jbpm/soa2010/processdefinitionb.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
--===============7091044791465714421==--
From do-not-reply at jboss.org Fri May 13 10:49:58 2011
Content-Type: multipart/mixed; boundary="===============5509814173728461403=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: jbpm-commits at lists.jboss.org
Subject: [jbpm-commits] JBoss JBPM SVN: r6918 - in
jbpm3/branches/jbpm-3.2-soa/core/src/main: java/org/jbpm/job/executor and 1
other directories.
Date: Fri, 13 May 2011 10:49:58 -0400
Message-ID: <201105131449.p4DEnweJ020173@svn01.web.mwc.hst.phx2.redhat.com>
--===============5509814173728461403==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: jcoleman(a)redhat.com
Date: 2011-05-13 10:49:57 -0400 (Fri, 13 May 2011)
New Revision: 6918
Modified:
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db/JobSession.ja=
va
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/Dis=
patcherThread.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/Job=
Executor.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/Job=
ExecutorThread.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/db/hibernat=
e.queries.hbm.xml
Log:
SOA-3007.
Fix problems with the split of the old JobExecutorThread(s) into the new
DispatcherThread + JobExecutorThread(s):
o the DispatcherThread busy-waits in a loop (and uses CPU)
o job processing could be deferred for an indeterminate time.
o crashing at certain points could leave jobs locked (not processed)
indefinitely
Fix by kconner(a).
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db/JobSes=
sion.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db/JobSession.j=
ava 2011-05-12 07:43:49 UTC (rev 6917)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db/JobSession.j=
ava 2011-05-13 14:49:57 UTC (rev 6918)
@@ -275,4 +275,14 @@
}
return session.createCriteria(Job.class).add(Restrictions.in("id", job=
s)).list();
}
+
+ public void releaseLockedJobs(final String lockOwner) {
+ try {
+ session.getNamedQuery("JobSession.releaseLockedJobs")
+ .setString("lockOwner", lockOwner)
+ .executeUpdate();
+ } catch (HibernateException e) {
+ throw new JbpmPersistenceException("could not release locked jobs by=
owner '" + lockOwner + "'", e);
+ }
+ }
}
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/execu=
tor/DispatcherThread.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/Di=
spatcherThread.java 2011-05-12 07:43:49 UTC (rev 6917)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/Di=
spatcherThread.java 2011-05-13 14:49:57 UTC (rev 6918)
@@ -52,40 +52,28 @@
}
=
public void run() {
- int retryInterval =3D jobExecutor.getRetryInterval();
while (active) {
- // acquire job; on exception, call returns null
- Job job =3D acquireJob();
- // submit job
- if (job !=3D null) submitJob(job);
+ if (jobExecutor.waitForFreeExecutorThread()) {
+ // acquire job; on exception, call returns null
+ Job job =3D acquireJob();
+ // submit job
+ if (job !=3D null) {
+ submitJob(job);
+ continue ;
+ }
+ }
=
// if still active, wait or sleep
if (active) {
try {
- if (job !=3D null) {
- // reset the current retry interval
- retryInterval =3D jobExecutor.getRetryInterval();
- // wait for next due job
- long waitPeriod =3D getWaitPeriod(jobExecutor.getIdleInterval(=
));
- if (waitPeriod > 0) {
- synchronized (jobExecutor) {
+ // wait for next due job
+ long waitPeriod =3D getWaitPeriod(jobExecutor.getIdleInterval());
+ if (waitPeriod > 0) {
+ synchronized (jobExecutor) {
+ if (active)
jobExecutor.wait(waitPeriod);
- }
}
}
- else {
- // sleep instead of waiting on jobExecutor
- // to prevent message/scheduler service from waking up this th=
read
- sleep(retryInterval);
- // after an exception, double the current retry interval
- // to avoid continuous failures during anomalous conditions
- retryInterval *=3D 2;
- // enforce maximum idle interval
- int maxIdleInterval =3D jobExecutor.getMaxIdleInterval();
- if (retryInterval > maxIdleInterval || retryInterval < 0) {
- retryInterval =3D maxIdleInterval;
- }
- }
}
catch (InterruptedException e) {
if (log.isDebugEnabled()) log.debug(getName() + " got interrupte=
d");
@@ -113,6 +101,7 @@
if (firstJob.getException() !=3D null) {
// decrease retry count
int retries =3D firstJob.getRetries() - 1;
+log.info("Has exception, retries =3D " + retries);
firstJob.setRetries(retries);
if (debug) log.debug(firstJob + " has " + retries + " retries =
remaining");
}
@@ -144,12 +133,8 @@
}
=
private void submitJob(Job job) {
- try {
- jobExecutor.getQueue().put(job);
- }
- catch (InterruptedException e) {
+ if (!jobExecutor.submitJob(job)) {
unlockJob(job);
- if (log.isDebugEnabled()) log.debug(getName() + " got interrupted");
}
}
=
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/execu=
tor/JobExecutor.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/Jo=
bExecutor.java 2011-05-12 07:43:49 UTC (rev 6917)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/Jo=
bExecutor.java 2011-05-13 14:49:57 UTC (rev 6918)
@@ -9,6 +9,7 @@
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Iterator;
+import java.util.LinkedList;
import java.util.List;
import java.util.Map;
=
@@ -16,9 +17,13 @@
import org.apache.commons.logging.LogFactory;
=
import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmContext;
+import org.jbpm.db.JobSession;
+import org.jbpm.job.Job;
=
-import edu.emory.mathcs.backport.java.util.concurrent.BlockingQueue;
-import edu.emory.mathcs.backport.java.util.concurrent.SynchronousQueue;
+import edu.emory.mathcs.backport.java.util.concurrent.locks.Condition;
+import edu.emory.mathcs.backport.java.util.concurrent.locks.Lock;
+import edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantLock;
=
public class JobExecutor implements Serializable {
=
@@ -29,7 +34,7 @@
protected int nbrOfThreads;
protected int idleInterval;
protected int maxIdleInterval;
- private int retryInterval;
+ private int retryInterval =3D 1000;
/** @deprecated property has no effect */
protected int historyMaxSize;
=
@@ -39,7 +44,13 @@
protected int lockBufferTime;
=
private ThreadGroup threadGroup;
- private BlockingQueue queue =3D new SynchronousQueue();
+ private int waitingExecutorCount ;
+ private boolean waitingDispatcher ;
+ private boolean dispatcherActive ;
+ private Lock waitingExecutorLock =3D new ReentrantLock() ;
+ private Condition waitingExecutorCondition =3D waitingExecutorLock.newCo=
ndition() ;
+ private Condition waitingDispatcherCondition =3D waitingExecutorLock.new=
Condition() ;
+ private LinkedList dispatchedJobs =3D new LinkedList();
=
/** @deprecated call {@link #getThreads()} instead */
protected Map threads;
@@ -56,6 +67,8 @@
if (!isStarted) {
log.info("starting " + name);
=
+ activateDispatcher() ;
+ =
// create thread group
threadGroup =3D new ThreadGroup(name) {
public void uncaughtException(Thread thread, Throwable throwable) {
@@ -119,6 +132,8 @@
}
}
=
+ deactivateDispatcher() ;
+ =
// return deactivated threads
return deactivatedThreads;
}
@@ -158,10 +173,6 @@
return threadGroup;
}
=
- BlockingQueue getQueue() {
- return queue;
- }
-
private String getThreadName(int index) {
return name + '@' + getHostAddress() + ":Executor-" + index;
}
@@ -418,5 +429,116 @@
this.nbrOfThreads =3D nbrOfThreads;
}
=
+ private boolean hasFreeExecutor() {
+ waitingExecutorLock.lock() ;
+ try {
+ return (waitingExecutorCount > dispatchedJobs.size()) ;
+ } finally {
+ waitingExecutorLock.unlock() ;
+ }
+ }
+ // return false when interrupted
+ boolean waitForFreeExecutorThread() {
+ waitingExecutorLock.lock() ;
+ try {
+ waitingDispatcher =3D true ;
+ if (dispatcherActive) {
+ if (hasFreeExecutor()) {
+ return true ;
+ } else {
+ waitingDispatcherCondition.await() ;
+ return hasFreeExecutor() ;
+ }
+ }
+ } catch (final InterruptedException ie) {
+ } finally {
+ waitingDispatcher =3D false ;
+ waitingExecutorLock.unlock() ;
+ }
+ return false ;
+ }
+ =
+ // return null when interrupted
+ Job getJob() {
+ waitingExecutorLock.lock() ;
+ try {
+ waitingExecutorCount++ ;
+ if (dispatcherActive) { =
+ if (waitingDispatcher && hasFreeExecutor()) {
+ waitingDispatcherCondition.signal() ;
+ }
+ if (dispatchedJobs.isEmpty()) {
+ waitingExecutorCondition.await() ;
+ }
+ if (dispatchedJobs.size() > 0) {
+ return (Job)dispatchedJobs.remove() ;
+ }
+ }
+ } catch (final InterruptedException ie) {
+ } finally {
+ waitingExecutorCount-- ;
+ waitingExecutorLock.unlock() ;
+ }
+ return null ;
+ }
+ =
+ boolean submitJob(final Job job) {
+ waitingExecutorLock.lock() ;
+ try {
+ if (hasFreeExecutor()) {
+ dispatchedJobs.add(job) ;
+ waitingExecutorCondition.signal() ;
+ return true ;
+ }
+ } finally {
+ waitingExecutorLock.unlock() ;
+ }
+ return false ;
+ }
+
+ private void activateDispatcher() {
+ waitingExecutorLock.lock() ;
+ try {
+ if (!dispatcherActive) {
+ unlockOurJobs() ;
+ dispatcherActive =3D true ;
+ }
+ } finally {
+ waitingExecutorLock.unlock() ;
+ }
+ }
+ =
+ private void unlockOurJobs() {
+ final JbpmContext jbpmContext =3D getJbpmConfiguration().createJbpmCon=
text();
+ try {
+ final String lockOwner =3D getName();
+ final JobSession jobSession =3D jbpmContext.getJobSession();
+ jobSession.releaseLockedJobs(lockOwner);
+ } catch (RuntimeException e) {
+ jbpmContext.setRollbackOnly();
+ if (log.isDebugEnabled()) log.debug("failed to release locked jobs",=
e);
+ } catch (Error e) {
+ jbpmContext.setRollbackOnly();
+ throw e;
+ } finally {
+ try {
+ jbpmContext.close();
+ } catch (RuntimeException e) {
+ if (log.isDebugEnabled()) log.debug("failed to release locked jobs=
", e);
+ }
+ }
+ }
+
+ private void deactivateDispatcher() {
+ waitingExecutorLock.lock() ;
+ try {
+ dispatcherActive =3D false ;
+ waitingDispatcherCondition.signal() ;
+ waitingExecutorCondition.signalAll() ;
+ } finally {
+ waitingExecutorLock.unlock() ;
+ }
+ }
+ =
private static Log log =3D LogFactory.getLog(JobExecutor.class);
}
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/execu=
tor/JobExecutorThread.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/Jo=
bExecutorThread.java 2011-05-12 07:43:49 UTC (rev 6917)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/Jo=
bExecutorThread.java 2011-05-13 14:49:57 UTC (rev 6918)
@@ -7,6 +7,7 @@
import java.util.Date;
import java.util.Iterator;
import java.util.List;
+import java.util.Random;
=
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -23,6 +24,7 @@
=
private final JobExecutor jobExecutor;
private volatile boolean active =3D true;
+ private Random random =3D new Random() ;
=
public JobExecutorThread(String name, JobExecutor jobExecutor) {
super(jobExecutor.getThreadGroup(), name);
@@ -42,7 +44,7 @@
public void run() {
while (active) {
// take on next job
- Job job =3D acquireJob();
+ Job job =3D jobExecutor.getJob();
// if an exception occurs, acquireJob() returns null
if (job !=3D null) {
try {
@@ -126,16 +128,6 @@
return jobs;
}
=
- private Job acquireJob() {
- try {
- return (Job) jobExecutor.getQueue().take();
- }
- catch (InterruptedException e) {
- if (log.isDebugEnabled()) log.debug(getName() + " got interrupted");
- return null;
- }
- }
-
protected void executeJob(Job job) throws Exception {
JbpmContext jbpmContext =3D jobExecutor.getJbpmConfiguration().createJ=
bpmContext();
try {
@@ -154,7 +146,11 @@
}
=
if (log.isDebugEnabled()) log.debug("executing " + job);
+/* XXX
if (job.execute(jbpmContext)) jobSession.deleteJob(job);
+*/
+ jbpmContext.setRollbackOnly();
+ throw (new Exception());
}
catch (Exception e) {
jbpmContext.setRollbackOnly();
@@ -192,10 +188,10 @@
// unlock job so it can be dispatched again
job.setLockOwner(null);
job.setLockTime(null);
- // notify job executor
- synchronized (jobExecutor) {
- jobExecutor.notify();
- }
+ int waitPeriod =3D jobExecutor.getRetryInterval() / 2;
+ waitPeriod +=3D random.nextInt(waitPeriod) ;
+log.info("rescheduled: now + " + waitPeriod);
+ job.setDueDate(new Date(System.currentTimeMillis() + waitPeriod)) ;
}
catch (RuntimeException e) {
jbpmContext.setRollbackOnly();
@@ -213,6 +209,10 @@
log.warn("failed to save exception for " + job, e);
}
}
+ // notify job executor
+ synchronized (jobExecutor) {
+ jobExecutor.notify();
+ }
}
=
private void unlockJob(Job job) {
@@ -224,10 +224,6 @@
// unlock job
job.setLockOwner(null);
job.setLockTime(null);
- // notify job executor
- synchronized (jobExecutor) {
- jobExecutor.notify();
- }
}
catch (RuntimeException e) {
jbpmContext.setRollbackOnly();
@@ -246,6 +242,10 @@
log.warn("failed to unlock " + job, e);
}
}
+ // notify job executor
+ synchronized (jobExecutor) {
+ jobExecutor.notify();
+ }
}
=
/** @deprecated responsibility moved to DispatcherThread */
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/db/h=
ibernate.queries.hbm.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/db/hiberna=
te.queries.hbm.xml 2011-05-12 07:43:49 UTC (rev 6917)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/db/hiberna=
te.queries.hbm.xml 2011-05-13 14:49:57 UTC (rev 6918)
@@ -401,6 +401,16 @@
]]>
=
+
+ 0
+ and job.isSuspended =3D false
+ ]]>
+
+
=
--===============5509814173728461403==--
From do-not-reply at jboss.org Fri May 13 11:04:52 2011
Content-Type: multipart/mixed; boundary="===============5645793855025671177=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: jbpm-commits at lists.jboss.org
Subject: [jbpm-commits] JBoss JBPM SVN: r6919 -
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor.
Date: Fri, 13 May 2011 11:04:52 -0400
Message-ID: <201105131504.p4DF4q89027432@svn01.web.mwc.hst.phx2.redhat.com>
--===============5645793855025671177==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: jcoleman(a)redhat.com
Date: 2011-05-13 11:04:52 -0400 (Fri, 13 May 2011)
New Revision: 6919
Modified:
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/Dis=
patcherThread.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/Job=
Executor.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/Job=
ExecutorThread.java
Log:
Remove testing code accidently commited with revision 6918.
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/execu=
tor/DispatcherThread.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/Di=
spatcherThread.java 2011-05-13 14:49:57 UTC (rev 6918)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/Di=
spatcherThread.java 2011-05-13 15:04:52 UTC (rev 6919)
@@ -101,7 +101,6 @@
if (firstJob.getException() !=3D null) {
// decrease retry count
int retries =3D firstJob.getRetries() - 1;
-log.info("Has exception, retries =3D " + retries);
firstJob.setRetries(retries);
if (debug) log.debug(firstJob + " has " + retries + " retries =
remaining");
}
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/execu=
tor/JobExecutor.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/Jo=
bExecutor.java 2011-05-13 14:49:57 UTC (rev 6918)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/Jo=
bExecutor.java 2011-05-13 15:04:52 UTC (rev 6919)
@@ -34,7 +34,7 @@
protected int nbrOfThreads;
protected int idleInterval;
protected int maxIdleInterval;
- private int retryInterval =3D 1000;
+ private int retryInterval;
/** @deprecated property has no effect */
protected int historyMaxSize;
=
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/execu=
tor/JobExecutorThread.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/Jo=
bExecutorThread.java 2011-05-13 14:49:57 UTC (rev 6918)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/Jo=
bExecutorThread.java 2011-05-13 15:04:52 UTC (rev 6919)
@@ -146,11 +146,7 @@
}
=
if (log.isDebugEnabled()) log.debug("executing " + job);
-/* XXX
if (job.execute(jbpmContext)) jobSession.deleteJob(job);
-*/
- jbpmContext.setRollbackOnly();
- throw (new Exception());
}
catch (Exception e) {
jbpmContext.setRollbackOnly();
@@ -190,7 +186,6 @@
job.setLockTime(null);
int waitPeriod =3D jobExecutor.getRetryInterval() / 2;
waitPeriod +=3D random.nextInt(waitPeriod) ;
-log.info("rescheduled: now + " + waitPeriod);
job.setDueDate(new Date(System.currentTimeMillis() + waitPeriod)) ;
}
catch (RuntimeException e) {
--===============5645793855025671177==--
From do-not-reply at jboss.org Fri May 13 11:09:03 2011
Content-Type: multipart/mixed; boundary="===============2732008683442899206=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: jbpm-commits at lists.jboss.org
Subject: [jbpm-commits] JBoss JBPM SVN: r6920 - in
jbpm3/branches/3.2.10.SP/core/src/main: java/org/jbpm/job/executor and 1
other directories.
Date: Fri, 13 May 2011 11:09:03 -0400
Message-ID: <201105131509.p4DF93jJ027786@svn01.web.mwc.hst.phx2.redhat.com>
--===============2732008683442899206==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: jcoleman(a)redhat.com
Date: 2011-05-13 11:09:03 -0400 (Fri, 13 May 2011)
New Revision: 6920
Modified:
jbpm3/branches/3.2.10.SP/core/src/main/java/org/jbpm/db/JobSession.java
jbpm3/branches/3.2.10.SP/core/src/main/java/org/jbpm/job/executor/Dispat=
cherThread.java
jbpm3/branches/3.2.10.SP/core/src/main/java/org/jbpm/job/executor/JobExe=
cutor.java
jbpm3/branches/3.2.10.SP/core/src/main/java/org/jbpm/job/executor/JobExe=
cutorThread.java
jbpm3/branches/3.2.10.SP/core/src/main/resources/org/jbpm/db/hibernate.q=
ueries.hbm.xml
Log:
Pull up revisions 6918, 6919 from jbpm-3.2-soa branch:
SOA-3007.
Fix problems with the split of the old JobExecutorThread(s) into the new
DispatcherThread + JobExecutorThread(s):
o the DispatcherThread busy-waits in a loop (and uses CPU)
o job processing could be deferred for an indeterminate time.
o crashing at certain points could leave jobs locked (not processed)
indefinitely
Fix by kconner(a).
Modified: jbpm3/branches/3.2.10.SP/core/src/main/java/org/jbpm/db/JobSessio=
n.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/core/src/main/java/org/jbpm/db/JobSession.java=
2011-05-13 15:04:52 UTC (rev 6919)
+++ jbpm3/branches/3.2.10.SP/core/src/main/java/org/jbpm/db/JobSession.java=
2011-05-13 15:09:03 UTC (rev 6920)
@@ -275,4 +275,14 @@
}
return session.createCriteria(Job.class).add(Restrictions.in("id", job=
s)).list();
}
+
+ public void releaseLockedJobs(final String lockOwner) {
+ try {
+ session.getNamedQuery("JobSession.releaseLockedJobs")
+ .setString("lockOwner", lockOwner)
+ .executeUpdate();
+ } catch (HibernateException e) {
+ throw new JbpmPersistenceException("could not release locked jobs by=
owner '" + lockOwner + "'", e);
+ }
+ }
}
Modified: jbpm3/branches/3.2.10.SP/core/src/main/java/org/jbpm/job/executor=
/DispatcherThread.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/core/src/main/java/org/jbpm/job/executor/Dispa=
tcherThread.java 2011-05-13 15:04:52 UTC (rev 6919)
+++ jbpm3/branches/3.2.10.SP/core/src/main/java/org/jbpm/job/executor/Dispa=
tcherThread.java 2011-05-13 15:09:03 UTC (rev 6920)
@@ -52,40 +52,28 @@
}
=
public void run() {
- int retryInterval =3D jobExecutor.getRetryInterval();
while (active) {
- // acquire job; on exception, call returns null
- Job job =3D acquireJob();
- // submit job
- if (job !=3D null) submitJob(job);
+ if (jobExecutor.waitForFreeExecutorThread()) {
+ // acquire job; on exception, call returns null
+ Job job =3D acquireJob();
+ // submit job
+ if (job !=3D null) {
+ submitJob(job);
+ continue ;
+ }
+ }
=
// if still active, wait or sleep
if (active) {
try {
- if (job !=3D null) {
- // reset the current retry interval
- retryInterval =3D jobExecutor.getRetryInterval();
- // wait for next due job
- long waitPeriod =3D getWaitPeriod(jobExecutor.getIdleInterval(=
));
- if (waitPeriod > 0) {
- synchronized (jobExecutor) {
+ // wait for next due job
+ long waitPeriod =3D getWaitPeriod(jobExecutor.getIdleInterval());
+ if (waitPeriod > 0) {
+ synchronized (jobExecutor) {
+ if (active)
jobExecutor.wait(waitPeriod);
- }
}
}
- else {
- // sleep instead of waiting on jobExecutor
- // to prevent message/scheduler service from waking up this th=
read
- sleep(retryInterval);
- // after an exception, double the current retry interval
- // to avoid continuous failures during anomalous conditions
- retryInterval *=3D 2;
- // enforce maximum idle interval
- int maxIdleInterval =3D jobExecutor.getMaxIdleInterval();
- if (retryInterval > maxIdleInterval || retryInterval < 0) {
- retryInterval =3D maxIdleInterval;
- }
- }
}
catch (InterruptedException e) {
if (log.isDebugEnabled()) log.debug(getName() + " got interrupte=
d");
@@ -144,12 +132,8 @@
}
=
private void submitJob(Job job) {
- try {
- jobExecutor.getQueue().put(job);
- }
- catch (InterruptedException e) {
+ if (!jobExecutor.submitJob(job)) {
unlockJob(job);
- if (log.isDebugEnabled()) log.debug(getName() + " got interrupted");
}
}
=
Modified: jbpm3/branches/3.2.10.SP/core/src/main/java/org/jbpm/job/executor=
/JobExecutor.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/core/src/main/java/org/jbpm/job/executor/JobEx=
ecutor.java 2011-05-13 15:04:52 UTC (rev 6919)
+++ jbpm3/branches/3.2.10.SP/core/src/main/java/org/jbpm/job/executor/JobEx=
ecutor.java 2011-05-13 15:09:03 UTC (rev 6920)
@@ -9,6 +9,7 @@
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Iterator;
+import java.util.LinkedList;
import java.util.List;
import java.util.Map;
=
@@ -16,9 +17,13 @@
import org.apache.commons.logging.LogFactory;
=
import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmContext;
+import org.jbpm.db.JobSession;
+import org.jbpm.job.Job;
=
-import edu.emory.mathcs.backport.java.util.concurrent.BlockingQueue;
-import edu.emory.mathcs.backport.java.util.concurrent.SynchronousQueue;
+import edu.emory.mathcs.backport.java.util.concurrent.locks.Condition;
+import edu.emory.mathcs.backport.java.util.concurrent.locks.Lock;
+import edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantLock;
=
public class JobExecutor implements Serializable {
=
@@ -39,7 +44,13 @@
protected int lockBufferTime;
=
private ThreadGroup threadGroup;
- private BlockingQueue queue =3D new SynchronousQueue();
+ private int waitingExecutorCount ;
+ private boolean waitingDispatcher ;
+ private boolean dispatcherActive ;
+ private Lock waitingExecutorLock =3D new ReentrantLock() ;
+ private Condition waitingExecutorCondition =3D waitingExecutorLock.newCo=
ndition() ;
+ private Condition waitingDispatcherCondition =3D waitingExecutorLock.new=
Condition() ;
+ private LinkedList dispatchedJobs =3D new LinkedList();
=
/** @deprecated call {@link #getThreads()} instead */
protected Map threads;
@@ -56,6 +67,8 @@
if (!isStarted) {
log.info("starting " + name);
=
+ activateDispatcher() ;
+ =
// create thread group
threadGroup =3D new ThreadGroup(name) {
public void uncaughtException(Thread thread, Throwable throwable) {
@@ -119,6 +132,8 @@
}
}
=
+ deactivateDispatcher() ;
+ =
// return deactivated threads
return deactivatedThreads;
}
@@ -158,10 +173,6 @@
return threadGroup;
}
=
- BlockingQueue getQueue() {
- return queue;
- }
-
private String getThreadName(int index) {
return name + '@' + getHostAddress() + ":Executor-" + index;
}
@@ -418,5 +429,116 @@
this.nbrOfThreads =3D nbrOfThreads;
}
=
+ private boolean hasFreeExecutor() {
+ waitingExecutorLock.lock() ;
+ try {
+ return (waitingExecutorCount > dispatchedJobs.size()) ;
+ } finally {
+ waitingExecutorLock.unlock() ;
+ }
+ }
+ // return false when interrupted
+ boolean waitForFreeExecutorThread() {
+ waitingExecutorLock.lock() ;
+ try {
+ waitingDispatcher =3D true ;
+ if (dispatcherActive) {
+ if (hasFreeExecutor()) {
+ return true ;
+ } else {
+ waitingDispatcherCondition.await() ;
+ return hasFreeExecutor() ;
+ }
+ }
+ } catch (final InterruptedException ie) {
+ } finally {
+ waitingDispatcher =3D false ;
+ waitingExecutorLock.unlock() ;
+ }
+ return false ;
+ }
+ =
+ // return null when interrupted
+ Job getJob() {
+ waitingExecutorLock.lock() ;
+ try {
+ waitingExecutorCount++ ;
+ if (dispatcherActive) { =
+ if (waitingDispatcher && hasFreeExecutor()) {
+ waitingDispatcherCondition.signal() ;
+ }
+ if (dispatchedJobs.isEmpty()) {
+ waitingExecutorCondition.await() ;
+ }
+ if (dispatchedJobs.size() > 0) {
+ return (Job)dispatchedJobs.remove() ;
+ }
+ }
+ } catch (final InterruptedException ie) {
+ } finally {
+ waitingExecutorCount-- ;
+ waitingExecutorLock.unlock() ;
+ }
+ return null ;
+ }
+ =
+ boolean submitJob(final Job job) {
+ waitingExecutorLock.lock() ;
+ try {
+ if (hasFreeExecutor()) {
+ dispatchedJobs.add(job) ;
+ waitingExecutorCondition.signal() ;
+ return true ;
+ }
+ } finally {
+ waitingExecutorLock.unlock() ;
+ }
+ return false ;
+ }
+
+ private void activateDispatcher() {
+ waitingExecutorLock.lock() ;
+ try {
+ if (!dispatcherActive) {
+ unlockOurJobs() ;
+ dispatcherActive =3D true ;
+ }
+ } finally {
+ waitingExecutorLock.unlock() ;
+ }
+ }
+ =
+ private void unlockOurJobs() {
+ final JbpmContext jbpmContext =3D getJbpmConfiguration().createJbpmCon=
text();
+ try {
+ final String lockOwner =3D getName();
+ final JobSession jobSession =3D jbpmContext.getJobSession();
+ jobSession.releaseLockedJobs(lockOwner);
+ } catch (RuntimeException e) {
+ jbpmContext.setRollbackOnly();
+ if (log.isDebugEnabled()) log.debug("failed to release locked jobs",=
e);
+ } catch (Error e) {
+ jbpmContext.setRollbackOnly();
+ throw e;
+ } finally {
+ try {
+ jbpmContext.close();
+ } catch (RuntimeException e) {
+ if (log.isDebugEnabled()) log.debug("failed to release locked jobs=
", e);
+ }
+ }
+ }
+
+ private void deactivateDispatcher() {
+ waitingExecutorLock.lock() ;
+ try {
+ dispatcherActive =3D false ;
+ waitingDispatcherCondition.signal() ;
+ waitingExecutorCondition.signalAll() ;
+ } finally {
+ waitingExecutorLock.unlock() ;
+ }
+ }
+ =
private static Log log =3D LogFactory.getLog(JobExecutor.class);
}
Modified: jbpm3/branches/3.2.10.SP/core/src/main/java/org/jbpm/job/executor=
/JobExecutorThread.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/core/src/main/java/org/jbpm/job/executor/JobEx=
ecutorThread.java 2011-05-13 15:04:52 UTC (rev 6919)
+++ jbpm3/branches/3.2.10.SP/core/src/main/java/org/jbpm/job/executor/JobEx=
ecutorThread.java 2011-05-13 15:09:03 UTC (rev 6920)
@@ -7,6 +7,7 @@
import java.util.Date;
import java.util.Iterator;
import java.util.List;
+import java.util.Random;
=
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -23,6 +24,7 @@
=
private final JobExecutor jobExecutor;
private volatile boolean active =3D true;
+ private Random random =3D new Random() ;
=
public JobExecutorThread(String name, JobExecutor jobExecutor) {
super(jobExecutor.getThreadGroup(), name);
@@ -42,7 +44,7 @@
public void run() {
while (active) {
// take on next job
- Job job =3D acquireJob();
+ Job job =3D jobExecutor.getJob();
// if an exception occurs, acquireJob() returns null
if (job !=3D null) {
try {
@@ -126,16 +128,6 @@
return jobs;
}
=
- private Job acquireJob() {
- try {
- return (Job) jobExecutor.getQueue().take();
- }
- catch (InterruptedException e) {
- if (log.isDebugEnabled()) log.debug(getName() + " got interrupted");
- return null;
- }
- }
-
protected void executeJob(Job job) throws Exception {
JbpmContext jbpmContext =3D jobExecutor.getJbpmConfiguration().createJ=
bpmContext();
try {
@@ -192,10 +184,9 @@
// unlock job so it can be dispatched again
job.setLockOwner(null);
job.setLockTime(null);
- // notify job executor
- synchronized (jobExecutor) {
- jobExecutor.notify();
- }
+ int waitPeriod =3D jobExecutor.getRetryInterval() / 2;
+ waitPeriod +=3D random.nextInt(waitPeriod) ;
+ job.setDueDate(new Date(System.currentTimeMillis() + waitPeriod)) ;
}
catch (RuntimeException e) {
jbpmContext.setRollbackOnly();
@@ -213,6 +204,10 @@
log.warn("failed to save exception for " + job, e);
}
}
+ // notify job executor
+ synchronized (jobExecutor) {
+ jobExecutor.notify();
+ }
}
=
private void unlockJob(Job job) {
@@ -224,10 +219,6 @@
// unlock job
job.setLockOwner(null);
job.setLockTime(null);
- // notify job executor
- synchronized (jobExecutor) {
- jobExecutor.notify();
- }
}
catch (RuntimeException e) {
jbpmContext.setRollbackOnly();
@@ -246,6 +237,10 @@
log.warn("failed to unlock " + job, e);
}
}
+ // notify job executor
+ synchronized (jobExecutor) {
+ jobExecutor.notify();
+ }
}
=
/** @deprecated responsibility moved to DispatcherThread */
Modified: jbpm3/branches/3.2.10.SP/core/src/main/resources/org/jbpm/db/hibe=
rnate.queries.hbm.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/core/src/main/resources/org/jbpm/db/hibernate.=
queries.hbm.xml 2011-05-13 15:04:52 UTC (rev 6919)
+++ jbpm3/branches/3.2.10.SP/core/src/main/resources/org/jbpm/db/hibernate.=
queries.hbm.xml 2011-05-13 15:09:03 UTC (rev 6920)
@@ -401,6 +401,16 @@
]]>
=
+
+ 0
+ and job.isSuspended =3D false
+ ]]>
+
+
=
--===============2732008683442899206==--
From do-not-reply at jboss.org Fri May 13 11:11:54 2011
Content-Type: multipart/mixed; boundary="===============5327722472989807751=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: jbpm-commits at lists.jboss.org
Subject: [jbpm-commits] JBoss JBPM SVN: r6921 - jbpm3/tags.
Date: Fri, 13 May 2011 11:11:53 -0400
Message-ID: <201105131511.p4DFBr00028250@svn01.web.mwc.hst.phx2.redhat.com>
--===============5327722472989807751==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: jcoleman(a)redhat.com
Date: 2011-05-13 11:11:53 -0400 (Fri, 13 May 2011)
New Revision: 6921
Added:
jbpm3/tags/3.2.10.SP2/
Log:
Create 3.2.10.SP2 tag from 3.2.10.SP branch
--===============5327722472989807751==--
From do-not-reply at jboss.org Fri May 13 11:31:37 2011
Content-Type: multipart/mixed; boundary="===============3930087343302001648=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: jbpm-commits at lists.jboss.org
Subject: [jbpm-commits] JBoss JBPM SVN: r6922 - in jbpm3/branches/3.2.10.SP:
core and 12 other directories.
Date: Fri, 13 May 2011 11:31:37 -0400
Message-ID: <201105131531.p4DFVbAH030477@svn01.web.mwc.hst.phx2.redhat.com>
--===============3930087343302001648==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: jcoleman(a)redhat.com
Date: 2011-05-13 11:31:36 -0400 (Fri, 13 May 2011)
New Revision: 6922
Modified:
jbpm3/branches/3.2.10.SP/core/pom.xml
jbpm3/branches/3.2.10.SP/db/pom.xml
jbpm3/branches/3.2.10.SP/distribution/pom.xml
jbpm3/branches/3.2.10.SP/distribution/src/main/resources/examples/module=
/pom.xml
jbpm3/branches/3.2.10.SP/distribution/src/main/resources/examples/pom.xml
jbpm3/branches/3.2.10.SP/enterprise-jee5/pom.xml
jbpm3/branches/3.2.10.SP/enterprise/pom.xml
jbpm3/branches/3.2.10.SP/examples/pom.xml
jbpm3/branches/3.2.10.SP/identity/pom.xml
jbpm3/branches/3.2.10.SP/pom.xml
jbpm3/branches/3.2.10.SP/simulation/pom.xml
jbpm3/branches/3.2.10.SP/soa-distribution/pom.xml
jbpm3/branches/3.2.10.SP/tomcat/pom.xml
jbpm3/branches/3.2.10.SP/userguide/pom.xml
Log:
Update version to 3.2.10.SP2
Modified: jbpm3/branches/3.2.10.SP/core/pom.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/core/pom.xml 2011-05-13 15:11:53 UTC (rev 6921)
+++ jbpm3/branches/3.2.10.SP/core/pom.xml 2011-05-13 15:31:36 UTC (rev 6922)
@@ -18,7 +18,7 @@
org.jbpm.jbpm3
jbpm
- 3.2.10.SP1
+ 3.2.10.SP2
=
Modified: jbpm3/branches/3.2.10.SP/db/pom.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/db/pom.xml 2011-05-13 15:11:53 UTC (rev 6921)
+++ jbpm3/branches/3.2.10.SP/db/pom.xml 2011-05-13 15:31:36 UTC (rev 6922)
@@ -18,7 +18,7 @@
org.jbpm.jbpm3
jbpm
- 3.2.10.SP1
+ 3.2.10.SP2
../pom.xml
=
Modified: jbpm3/branches/3.2.10.SP/distribution/pom.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/distribution/pom.xml 2011-05-13 15:11:53 UTC (=
rev 6921)
+++ jbpm3/branches/3.2.10.SP/distribution/pom.xml 2011-05-13 15:31:36 UTC (=
rev 6922)
@@ -18,7 +18,7 @@
org.jbpm.jbpm3
jbpm
- 3.2.10.SP1
+ 3.2.10.SP2
=
Modified: jbpm3/branches/3.2.10.SP/distribution/src/main/resources/examples=
/module/pom.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/distribution/src/main/resources/examples/modul=
e/pom.xml 2011-05-13 15:11:53 UTC (rev 6921)
+++ jbpm3/branches/3.2.10.SP/distribution/src/main/resources/examples/modul=
e/pom.xml 2011-05-13 15:31:36 UTC (rev 6922)
@@ -18,7 +18,7 @@
jbpm-examples-dist
org.jbpm.jbpm3
- 3.2.10.SP1
+ 3.2.10.SP2
=
Modified: jbpm3/branches/3.2.10.SP/distribution/src/main/resources/examples=
/pom.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/distribution/src/main/resources/examples/pom.x=
ml 2011-05-13 15:11:53 UTC (rev 6921)
+++ jbpm3/branches/3.2.10.SP/distribution/src/main/resources/examples/pom.x=
ml 2011-05-13 15:31:36 UTC (rev 6922)
@@ -19,7 +19,7 @@
org.jbpm.jbpm3
jbpm
- 3.2.10.SP1
+ 3.2.10.SP2
=
Modified: jbpm3/branches/3.2.10.SP/enterprise/pom.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/enterprise/pom.xml 2011-05-13 15:11:53 UTC (re=
v 6921)
+++ jbpm3/branches/3.2.10.SP/enterprise/pom.xml 2011-05-13 15:31:36 UTC (re=
v 6922)
@@ -18,7 +18,7 @@
org.jbpm.jbpm3
jbpm
- 3.2.10.SP1
+ 3.2.10.SP2
=
Modified: jbpm3/branches/3.2.10.SP/enterprise-jee5/pom.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/enterprise-jee5/pom.xml 2011-05-13 15:11:53 UT=
C (rev 6921)
+++ jbpm3/branches/3.2.10.SP/enterprise-jee5/pom.xml 2011-05-13 15:31:36 UT=
C (rev 6922)
@@ -17,7 +17,7 @@
org.jbpm.jbpm3
jbpm
- 3.2.10.SP1
+ 3.2.10.SP2
=
Modified: jbpm3/branches/3.2.10.SP/examples/pom.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/examples/pom.xml 2011-05-13 15:11:53 UTC (rev =
6921)
+++ jbpm3/branches/3.2.10.SP/examples/pom.xml 2011-05-13 15:31:36 UTC (rev =
6922)
@@ -18,7 +18,7 @@
org.jbpm.jbpm3
jbpm
- 3.2.10.SP1
+ 3.2.10.SP2
=
Modified: jbpm3/branches/3.2.10.SP/identity/pom.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/identity/pom.xml 2011-05-13 15:11:53 UTC (rev =
6921)
+++ jbpm3/branches/3.2.10.SP/identity/pom.xml 2011-05-13 15:31:36 UTC (rev =
6922)
@@ -18,7 +18,7 @@
org.jbpm.jbpm3
jbpm
- 3.2.10.SP1
+ 3.2.10.SP2
=
Modified: jbpm3/branches/3.2.10.SP/pom.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/pom.xml 2011-05-13 15:11:53 UTC (rev 6921)
+++ jbpm3/branches/3.2.10.SP/pom.xml 2011-05-13 15:31:36 UTC (rev 6922)
@@ -13,7 +13,7 @@
org.jbpm.jbpm3
jbpm
pom
- 3.2.10.SP1
+ 3.2.10.SP2
=
Modified: jbpm3/branches/3.2.10.SP/simulation/pom.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/simulation/pom.xml 2011-05-13 15:11:53 UTC (re=
v 6921)
+++ jbpm3/branches/3.2.10.SP/simulation/pom.xml 2011-05-13 15:31:36 UTC (re=
v 6922)
@@ -18,7 +18,7 @@
org.jbpm.jbpm3
jbpm
- 3.2.10.SP1
+ 3.2.10.SP2
=
Modified: jbpm3/branches/3.2.10.SP/soa-distribution/pom.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/soa-distribution/pom.xml 2011-05-13 15:11:53 U=
TC (rev 6921)
+++ jbpm3/branches/3.2.10.SP/soa-distribution/pom.xml 2011-05-13 15:31:36 U=
TC (rev 6922)
@@ -19,7 +19,7 @@
org.jbpm.jbpm3
jbpm
- 3.2.10.SP1
+ 3.2.10.SP2
=
Modified: jbpm3/branches/3.2.10.SP/tomcat/pom.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/tomcat/pom.xml 2011-05-13 15:11:53 UTC (rev 69=
21)
+++ jbpm3/branches/3.2.10.SP/tomcat/pom.xml 2011-05-13 15:31:36 UTC (rev 69=
22)
@@ -7,7 +7,7 @@
jbpm
org.jbpm.jbpm3
- 3.2.10.SP1
+ 3.2.10.SP2
=
Modified: jbpm3/branches/3.2.10.SP/userguide/pom.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/userguide/pom.xml 2011-05-13 15:11:53 UTC (rev=
6921)
+++ jbpm3/branches/3.2.10.SP/userguide/pom.xml 2011-05-13 15:31:36 UTC (rev=
6922)
@@ -18,7 +18,7 @@
org.jbpm.jbpm3
jbpm
- 3.2.10.SP1
+ 3.2.10.SP2
=
--===============3930087343302001648==--
From do-not-reply at jboss.org Fri May 13 11:32:20 2011
Content-Type: multipart/mixed; boundary="===============8572439888988456899=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: jbpm-commits at lists.jboss.org
Subject: [jbpm-commits] JBoss JBPM SVN: r6923 - jbpm3/tags.
Date: Fri, 13 May 2011 11:32:19 -0400
Message-ID: <201105131532.p4DFWJGH030499@svn01.web.mwc.hst.phx2.redhat.com>
--===============8572439888988456899==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: jcoleman(a)redhat.com
Date: 2011-05-13 11:32:19 -0400 (Fri, 13 May 2011)
New Revision: 6923
Removed:
jbpm3/tags/3.2.10.SP2/
Log:
Delete incorrect 3.2.10.SP2 tag
--===============8572439888988456899==--
From do-not-reply at jboss.org Fri May 13 11:33:16 2011
Content-Type: multipart/mixed; boundary="===============6881387865951743350=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: jbpm-commits at lists.jboss.org
Subject: [jbpm-commits] JBoss JBPM SVN: r6924 - jbpm3/tags.
Date: Fri, 13 May 2011 11:33:15 -0400
Message-ID: <201105131533.p4DFXFI1030511@svn01.web.mwc.hst.phx2.redhat.com>
--===============6881387865951743350==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: jcoleman(a)redhat.com
Date: 2011-05-13 11:33:15 -0400 (Fri, 13 May 2011)
New Revision: 6924
Added:
jbpm3/tags/3.2.10.SP2/
Log:
Create 3.2.10.SP2 tag from 3.2.10.SP branch
--===============6881387865951743350==--
From do-not-reply at jboss.org Mon May 16 05:20:04 2011
Content-Type: multipart/mixed; boundary="===============1892418692055424430=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: jbpm-commits at lists.jboss.org
Subject: [jbpm-commits] JBoss JBPM SVN: r6925 -
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/ant.
Date: Mon, 16 May 2011 05:20:03 -0400
Message-ID: <201105160920.p4G9K3At024464@svn01.web.mwc.hst.phx2.redhat.com>
--===============1892418692055424430==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: mputz
Date: 2011-05-16 05:20:03 -0400 (Mon, 16 May 2011)
New Revision: 6925
Modified:
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/ant/DeployProces=
sTask.java
Log:
JBPM-3190: Initialize fileSets List to avoid NullPointerException
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/ant/Deplo=
yProcessTask.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/ant/DeployProce=
ssTask.java 2011-05-13 15:33:15 UTC (rev 6924)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/ant/DeployProce=
ssTask.java 2011-05-16 09:20:03 UTC (rev 6925)
@@ -46,7 +46,7 @@
=
private String jbpmCfg;
private File process;
- private List fileSets;
+ private List fileSets =3D new ArrayList();
private boolean failOnError =3D true;
=
public void execute() throws BuildException {
--===============1892418692055424430==--
From do-not-reply at jboss.org Mon May 16 09:56:34 2011
Content-Type: multipart/mixed; boundary="===============0002820990396964945=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: jbpm-commits at lists.jboss.org
Subject: [jbpm-commits] JBoss JBPM SVN: r6926 - in
jbpm3/branches/jbpm-3.2-soa/core/src/main: java/org/jbpm/job/executor and 1
other directories.
Date: Mon, 16 May 2011 09:56:34 -0400
Message-ID: <201105161356.p4GDuYGQ011635@svn01.web.mwc.hst.phx2.redhat.com>
--===============0002820990396964945==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: jcoleman(a)redhat.com
Date: 2011-05-16 09:56:34 -0400 (Mon, 16 May 2011)
New Revision: 6926
Modified:
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db/JobSession.ja=
va
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/Job=
Executor.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/Job=
ExecutorThread.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/db/hibernat=
e.queries.hbm.xml
Log:
Updates to the job executor fixes (revision 6918):
o increase the retry count when we unlock a job if an error has occurred.
Otherwise, we would decrease the value when we shouldn't
o remove the additional unlocking code, as the lock-monitor thread will
handle this for us
>From kconner@
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db/JobSes=
sion.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db/JobSession.j=
ava 2011-05-16 09:20:03 UTC (rev 6925)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db/JobSession.j=
ava 2011-05-16 13:56:34 UTC (rev 6926)
@@ -275,14 +275,4 @@
}
return session.createCriteria(Job.class).add(Restrictions.in("id", job=
s)).list();
}
-
- public void releaseLockedJobs(final String lockOwner) {
- try {
- session.getNamedQuery("JobSession.releaseLockedJobs")
- .setString("lockOwner", lockOwner)
- .executeUpdate();
- } catch (HibernateException e) {
- throw new JbpmPersistenceException("could not release locked jobs by=
owner '" + lockOwner + "'", e);
- }
- }
}
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/execu=
tor/JobExecutor.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/Jo=
bExecutor.java 2011-05-16 09:20:03 UTC (rev 6925)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/Jo=
bExecutor.java 2011-05-16 13:56:34 UTC (rev 6926)
@@ -17,8 +17,6 @@
import org.apache.commons.logging.LogFactory;
=
import org.jbpm.JbpmConfiguration;
-import org.jbpm.JbpmContext;
-import org.jbpm.db.JobSession;
import org.jbpm.job.Job;
=
import edu.emory.mathcs.backport.java.util.concurrent.locks.Condition;
@@ -498,37 +496,10 @@
=
private void activateDispatcher() {
waitingExecutorLock.lock() ;
- try {
- if (!dispatcherActive) {
- unlockOurJobs() ;
- dispatcherActive =3D true ;
- }
- } finally {
- waitingExecutorLock.unlock() ;
- }
+ dispatcherActive =3D true ;
+ waitingExecutorLock.unlock() ;
}
=
- private void unlockOurJobs() {
- final JbpmContext jbpmContext =3D getJbpmConfiguration().createJbpmCon=
text();
- try {
- final String lockOwner =3D getName();
- final JobSession jobSession =3D jbpmContext.getJobSession();
- jobSession.releaseLockedJobs(lockOwner);
- } catch (RuntimeException e) {
- jbpmContext.setRollbackOnly();
- if (log.isDebugEnabled()) log.debug("failed to release locked jobs",=
e);
- } catch (Error e) {
- jbpmContext.setRollbackOnly();
- throw e;
- } finally {
- try {
- jbpmContext.close();
- } catch (RuntimeException e) {
- if (log.isDebugEnabled()) log.debug("failed to release locked jobs=
", e);
- }
- }
- }
-
private void deactivateDispatcher() {
waitingExecutorLock.lock() ;
try {
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/execu=
tor/JobExecutorThread.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/Jo=
bExecutorThread.java 2011-05-16 09:20:03 UTC (rev 6925)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/Jo=
bExecutorThread.java 2011-05-16 13:56:34 UTC (rev 6926)
@@ -219,6 +219,10 @@
// unlock job
job.setLockOwner(null);
job.setLockTime(null);
+ if (job.getException() !=3D null)
+ {
+ job.setRetries(job.getRetries()+1) ;
+ }
}
catch (RuntimeException e) {
jbpmContext.setRollbackOnly();
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/db/h=
ibernate.queries.hbm.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/db/hiberna=
te.queries.hbm.xml 2011-05-16 09:20:03 UTC (rev 6925)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/db/hiberna=
te.queries.hbm.xml 2011-05-16 13:56:34 UTC (rev 6926)
@@ -401,16 +401,6 @@
]]>
=
-
- 0
- and job.isSuspended =3D false
- ]]>
-
-
=
--===============0002820990396964945==--
From do-not-reply at jboss.org Mon May 16 09:58:12 2011
Content-Type: multipart/mixed; boundary="===============5602746325649267139=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: jbpm-commits at lists.jboss.org
Subject: [jbpm-commits] JBoss JBPM SVN: r6927 -
jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm.
Date: Mon, 16 May 2011 09:58:12 -0400
Message-ID: <201105161358.p4GDwCdU011653@svn01.web.mwc.hst.phx2.redhat.com>
--===============5602746325649267139==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: jcoleman(a)redhat.com
Date: 2011-05-16 09:58:11 -0400 (Mon, 16 May 2011)
New Revision: 6927
Modified:
jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/default.jbp=
m.cfg.xml
Log:
Set the default RetryInterval to 4000ms, to go with the altered retry
behaviour.
>From kconner(a).
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/defa=
ult.jbpm.cfg.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/default.jb=
pm.cfg.xml 2011-05-16 13:56:34 UTC (rev 6926)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/default.jb=
pm.cfg.xml 2011-05-16 13:58:11 UTC (rev 6927)
@@ -109,8 +109,8 @@
-
-
+
+
--===============5602746325649267139==--
From do-not-reply at jboss.org Mon May 16 10:00:02 2011
Content-Type: multipart/mixed; boundary="===============0164904944624148376=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: jbpm-commits at lists.jboss.org
Subject: [jbpm-commits] JBoss JBPM SVN: r6928 - in
jbpm3/branches/jbpm-3.2-soa/userguide/src/main/docbook/en-US: extras and 1
other directory.
Date: Mon, 16 May 2011 10:00:01 -0400
Message-ID: <201105161400.p4GE01UZ011704@svn01.web.mwc.hst.phx2.redhat.com>
--===============0164904944624148376==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: jcoleman(a)redhat.com
Date: 2011-05-16 10:00:01 -0400 (Mon, 16 May 2011)
New Revision: 6928
Modified:
jbpm3/branches/jbpm-3.2-soa/userguide/src/main/docbook/en-US/async.xml
jbpm3/branches/jbpm-3.2-soa/userguide/src/main/docbook/en-US/extras/conf=
iguration_1.xmlt
Log:
Update documentation to match job executor changes. Add a section describi=
ng
job executor configuration variables.
Modified: jbpm3/branches/jbpm-3.2-soa/userguide/src/main/docbook/en-US/asyn=
c.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/userguide/src/main/docbook/en-US/async.xml =
2011-05-16 13:58:11 UTC (rev 6927)
+++ jbpm3/branches/jbpm-3.2-soa/userguide/src/main/docbook/en-US/async.xml =
2011-05-16 14:00:01 UTC (rev 6928)
@@ -186,26 +186,23 @@
executor must execute the jobs. This is done in two phases.
- A job executor thread must acquire a job
+ The dispatcher thread must acquire a job
- The thread that acquired the job must execute it
+ An executor thread must execute the job
=
- Acquiring a job and executing the job are done in 2 separate tra=
nsactions. A thread =
- acquires a job by putting its name into the owner field of the job. E=
ach thread has a unique =
- name based on IP address and sequence number. Hibernate's optimistic =
locking is enabled on =
- Job-objects. So if 2 threads try to acquire a job =
concurrently, one of =
- them will get a StaleObjectException and rollback. Only the first one=
will succeed. The =
- thread that succeeds in acquiring a job is now responsible for executi=
ng it in a separate =
- transaction.
+ Acquiring a job and executing the job are done in 2 separate tra=
nsactions. The
+ dispatcher thread acquires jobs from the database on behalf of all the=
executor threads
+ on this node. When the executor thread takes the job, it adds its nam=
e into the owner
+ field of the job. Each thread has a unique name based on IP address a=
nd sequence number. =
=
A thread could die between acquisition and execution of a job. =
To clean-up after =
those situations, there is one lock-monitor thread per job executor th=
at checks the lock times. =
- The lock monitor thread will unlock any jobs that have been locked for=
more than 30 minutes,
+ The lock monitor thread will unlock any jobs that have been locked for=
more than 10 minutes,
so that they can be executed by another job executor thread.
=
@@ -230,6 +227,126 @@
READ_COMMITTED is not enough because it allows for =
Non-Repeatable reads to occur. =
So REPEATABLE_READ is required if you configure mor=
e than one job executor thread.
+
+
+ Configuration properties related to the job executor are:
+
+
+
+
+
+ jbpmConfiguration
+
+
+ The bean from which configuration is retrieved.
+
+
+
+
+
+ name
+
+
+ The name of this executor.
+
+
+
+ This name should be unique for each node in a clus=
ter.
+
+
+
+
+
+
+ nbrOfThreads
+
+
+ The number of executor threads that are started.
+
+
+
+
+
+ idleInterval
+
+
+ The interval that the dispatcher thread will wait befo=
re
+ checking the job queue, if there are no jobs pending.
+
+
+
+ The dispatcher thread is automatically notifed whe=
n jobs
+ are added to the queue.
+
+
+
+
+
+
+ retryInterval
+
+
+ The interval that a job will wait between retries, if =
it
+ fails during execution.
+
+
+
+ The maximum number of retries is configured by
+ jbpm.job.retries.
+
+
+
+
+
+
+ maxIdleInterval
+
+
+ The maximum period for idleInterval.
+
+
+
+
+
+ historyMaxSize
+
+
+ This property is deprecated, and has no affect.
+
+
+
+
+
+ maxLockTime
+
+
+ The macimum time that a job can be locked, before the
+ lock-monitor thread will unlock it.
+
+
+
+
+
+ lockMonitorInterval
+
+
+ The period for which the lock-monitor thread will sleep
+ between checking for locked jobs.
+
+
+
+
+
+ lockBufferTime
+
+
+ This property is deprecated, and has no affect.
+
+
+
+
+
+
=
Modified: jbpm3/branches/jbpm-3.2-soa/userguide/src/main/docbook/en-US/extr=
as/configuration_1.xmlt
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/userguide/src/main/docbook/en-US/extras/con=
figuration_1.xmlt 2011-05-16 13:58:11 UTC (rev 6927)
+++ jbpm3/branches/jbpm-3.2-soa/userguide/src/main/docbook/en-US/extras/con=
figuration_1.xmlt 2011-05-16 14:00:01 UTC (rev 6928)
@@ -59,7 +59,8 @@
-
+
+
=
@@ -70,4 +71,4 @@
-
\ No newline at end of file
+
--===============0164904944624148376==--
From do-not-reply at jboss.org Mon May 16 11:20:59 2011
Content-Type: multipart/mixed; boundary="===============4126855778153178608=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: jbpm-commits at lists.jboss.org
Subject: [jbpm-commits] JBoss JBPM SVN: r6929 -
jbpm3/branches/jbpm-3.2-soa/userguide/src/main/docbook/en-US.
Date: Mon, 16 May 2011 11:20:58 -0400
Message-ID: <201105161520.p4GFKw4q032440@svn01.web.mwc.hst.phx2.redhat.com>
--===============4126855778153178608==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: jcoleman(a)redhat.com
Date: 2011-05-16 11:20:58 -0400 (Mon, 16 May 2011)
New Revision: 6929
Modified:
jbpm3/branches/jbpm-3.2-soa/userguide/src/main/docbook/en-US/async.xml
Log:
JBPM-3192
Clarify need for unique job executor name.
Modified: jbpm3/branches/jbpm-3.2-soa/userguide/src/main/docbook/en-US/asyn=
c.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/userguide/src/main/docbook/en-US/async.xml =
2011-05-16 14:00:01 UTC (rev 6928)
+++ jbpm3/branches/jbpm-3.2-soa/userguide/src/main/docbook/en-US/async.xml =
2011-05-16 15:20:58 UTC (rev 6929)
@@ -251,7 +251,8 @@
- This name should be unique for each node in a clus=
ter.
+ This name should be unique for each node, when more
+ than one jBPM instance is started on a single mach=
ine.
--===============4126855778153178608==--
From do-not-reply at jboss.org Mon May 16 11:27:58 2011
Content-Type: multipart/mixed; boundary="===============3497621025966213147=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: jbpm-commits at lists.jboss.org
Subject: [jbpm-commits] JBoss JBPM SVN: r6930 - in jbpm3/branches/3.2.10.SP:
core and 12 other directories.
Date: Mon, 16 May 2011 11:27:57 -0400
Message-ID: <201105161527.p4GFRvp1000377@svn01.web.mwc.hst.phx2.redhat.com>
--===============3497621025966213147==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: jcoleman(a)redhat.com
Date: 2011-05-16 11:27:57 -0400 (Mon, 16 May 2011)
New Revision: 6930
Modified:
jbpm3/branches/3.2.10.SP/core/pom.xml
jbpm3/branches/3.2.10.SP/db/pom.xml
jbpm3/branches/3.2.10.SP/distribution/pom.xml
jbpm3/branches/3.2.10.SP/distribution/src/main/resources/examples/module=
/pom.xml
jbpm3/branches/3.2.10.SP/distribution/src/main/resources/examples/pom.xml
jbpm3/branches/3.2.10.SP/enterprise-jee5/pom.xml
jbpm3/branches/3.2.10.SP/enterprise/pom.xml
jbpm3/branches/3.2.10.SP/examples/pom.xml
jbpm3/branches/3.2.10.SP/identity/pom.xml
jbpm3/branches/3.2.10.SP/pom.xml
jbpm3/branches/3.2.10.SP/simulation/pom.xml
jbpm3/branches/3.2.10.SP/soa-distribution/pom.xml
jbpm3/branches/3.2.10.SP/tomcat/pom.xml
jbpm3/branches/3.2.10.SP/userguide/pom.xml
Log:
Update version to 3.2.10.SP3.
Modified: jbpm3/branches/3.2.10.SP/core/pom.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/core/pom.xml 2011-05-16 15:20:58 UTC (rev 6929)
+++ jbpm3/branches/3.2.10.SP/core/pom.xml 2011-05-16 15:27:57 UTC (rev 6930)
@@ -18,7 +18,7 @@
org.jbpm.jbpm3
jbpm
- 3.2.10.SP2
+ 3.2.10.SP3
=
Modified: jbpm3/branches/3.2.10.SP/db/pom.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/db/pom.xml 2011-05-16 15:20:58 UTC (rev 6929)
+++ jbpm3/branches/3.2.10.SP/db/pom.xml 2011-05-16 15:27:57 UTC (rev 6930)
@@ -18,7 +18,7 @@
org.jbpm.jbpm3
jbpm
- 3.2.10.SP2
+ 3.2.10.SP3
../pom.xml
=
Modified: jbpm3/branches/3.2.10.SP/distribution/pom.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/distribution/pom.xml 2011-05-16 15:20:58 UTC (=
rev 6929)
+++ jbpm3/branches/3.2.10.SP/distribution/pom.xml 2011-05-16 15:27:57 UTC (=
rev 6930)
@@ -18,7 +18,7 @@
org.jbpm.jbpm3
jbpm
- 3.2.10.SP2
+ 3.2.10.SP3
=
Modified: jbpm3/branches/3.2.10.SP/distribution/src/main/resources/examples=
/module/pom.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/distribution/src/main/resources/examples/modul=
e/pom.xml 2011-05-16 15:20:58 UTC (rev 6929)
+++ jbpm3/branches/3.2.10.SP/distribution/src/main/resources/examples/modul=
e/pom.xml 2011-05-16 15:27:57 UTC (rev 6930)
@@ -18,7 +18,7 @@
jbpm-examples-dist
org.jbpm.jbpm3
- 3.2.10.SP2
+ 3.2.10.SP3
=
Modified: jbpm3/branches/3.2.10.SP/distribution/src/main/resources/examples=
/pom.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/distribution/src/main/resources/examples/pom.x=
ml 2011-05-16 15:20:58 UTC (rev 6929)
+++ jbpm3/branches/3.2.10.SP/distribution/src/main/resources/examples/pom.x=
ml 2011-05-16 15:27:57 UTC (rev 6930)
@@ -19,7 +19,7 @@
org.jbpm.jbpm3
jbpm
- 3.2.10.SP2
+ 3.2.10.SP3
=
Modified: jbpm3/branches/3.2.10.SP/enterprise/pom.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/enterprise/pom.xml 2011-05-16 15:20:58 UTC (re=
v 6929)
+++ jbpm3/branches/3.2.10.SP/enterprise/pom.xml 2011-05-16 15:27:57 UTC (re=
v 6930)
@@ -18,7 +18,7 @@
org.jbpm.jbpm3
jbpm
- 3.2.10.SP2
+ 3.2.10.SP3
=
Modified: jbpm3/branches/3.2.10.SP/enterprise-jee5/pom.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/enterprise-jee5/pom.xml 2011-05-16 15:20:58 UT=
C (rev 6929)
+++ jbpm3/branches/3.2.10.SP/enterprise-jee5/pom.xml 2011-05-16 15:27:57 UT=
C (rev 6930)
@@ -17,7 +17,7 @@
org.jbpm.jbpm3
jbpm
- 3.2.10.SP2
+ 3.2.10.SP3
=
Modified: jbpm3/branches/3.2.10.SP/examples/pom.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/examples/pom.xml 2011-05-16 15:20:58 UTC (rev =
6929)
+++ jbpm3/branches/3.2.10.SP/examples/pom.xml 2011-05-16 15:27:57 UTC (rev =
6930)
@@ -18,7 +18,7 @@
org.jbpm.jbpm3
jbpm
- 3.2.10.SP2
+ 3.2.10.SP3
=
Modified: jbpm3/branches/3.2.10.SP/identity/pom.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/identity/pom.xml 2011-05-16 15:20:58 UTC (rev =
6929)
+++ jbpm3/branches/3.2.10.SP/identity/pom.xml 2011-05-16 15:27:57 UTC (rev =
6930)
@@ -18,7 +18,7 @@
org.jbpm.jbpm3
jbpm
- 3.2.10.SP2
+ 3.2.10.SP3
=
Modified: jbpm3/branches/3.2.10.SP/pom.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/pom.xml 2011-05-16 15:20:58 UTC (rev 6929)
+++ jbpm3/branches/3.2.10.SP/pom.xml 2011-05-16 15:27:57 UTC (rev 6930)
@@ -13,7 +13,7 @@
org.jbpm.jbpm3
jbpm
pom
- 3.2.10.SP2
+ 3.2.10.SP3
=
Modified: jbpm3/branches/3.2.10.SP/simulation/pom.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/simulation/pom.xml 2011-05-16 15:20:58 UTC (re=
v 6929)
+++ jbpm3/branches/3.2.10.SP/simulation/pom.xml 2011-05-16 15:27:57 UTC (re=
v 6930)
@@ -18,7 +18,7 @@
org.jbpm.jbpm3
jbpm
- 3.2.10.SP2
+ 3.2.10.SP3
=
Modified: jbpm3/branches/3.2.10.SP/soa-distribution/pom.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/soa-distribution/pom.xml 2011-05-16 15:20:58 U=
TC (rev 6929)
+++ jbpm3/branches/3.2.10.SP/soa-distribution/pom.xml 2011-05-16 15:27:57 U=
TC (rev 6930)
@@ -19,7 +19,7 @@
org.jbpm.jbpm3
jbpm
- 3.2.10.SP2
+ 3.2.10.SP3
=
Modified: jbpm3/branches/3.2.10.SP/tomcat/pom.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/tomcat/pom.xml 2011-05-16 15:20:58 UTC (rev 69=
29)
+++ jbpm3/branches/3.2.10.SP/tomcat/pom.xml 2011-05-16 15:27:57 UTC (rev 69=
30)
@@ -7,7 +7,7 @@
jbpm
org.jbpm.jbpm3
- 3.2.10.SP2
+ 3.2.10.SP3
=
Modified: jbpm3/branches/3.2.10.SP/userguide/pom.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/userguide/pom.xml 2011-05-16 15:20:58 UTC (rev=
6929)
+++ jbpm3/branches/3.2.10.SP/userguide/pom.xml 2011-05-16 15:27:57 UTC (rev=
6930)
@@ -18,7 +18,7 @@
org.jbpm.jbpm3
jbpm
- 3.2.10.SP2
+ 3.2.10.SP3
=
--===============3497621025966213147==--
From do-not-reply at jboss.org Mon May 16 11:34:38 2011
Content-Type: multipart/mixed; boundary="===============3799056776867617035=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: jbpm-commits at lists.jboss.org
Subject: [jbpm-commits] JBoss JBPM SVN: r6931 - in jbpm3/branches/3.2.10.SP:
core/src/main/java/org/jbpm/job/executor and 4 other directories.
Date: Mon, 16 May 2011 11:34:38 -0400
Message-ID: <201105161534.p4GFYcOS000888@svn01.web.mwc.hst.phx2.redhat.com>
--===============3799056776867617035==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: jcoleman(a)redhat.com
Date: 2011-05-16 11:34:38 -0400 (Mon, 16 May 2011)
New Revision: 6931
Modified:
jbpm3/branches/3.2.10.SP/core/src/main/java/org/jbpm/db/JobSession.java
jbpm3/branches/3.2.10.SP/core/src/main/java/org/jbpm/job/executor/JobExe=
cutor.java
jbpm3/branches/3.2.10.SP/core/src/main/java/org/jbpm/job/executor/JobExe=
cutorThread.java
jbpm3/branches/3.2.10.SP/core/src/main/resources/org/jbpm/db/hibernate.q=
ueries.hbm.xml
jbpm3/branches/3.2.10.SP/core/src/main/resources/org/jbpm/default.jbpm.c=
fg.xml
jbpm3/branches/3.2.10.SP/userguide/src/main/docbook/en-US/async.xml
jbpm3/branches/3.2.10.SP/userguide/src/main/docbook/en-US/extras/configu=
ration_1.xmlt
Log:
Pull across revisions 6926, 6927, 6928, 6929 from the jbpm-3.2-soa branch:
Updates to the job executor fixes (revision 6918):
o increase the retry count when we unlock a job if an error has occurred.
Otherwise, we would decrease the value when we shouldn't
o remove the additional unlocking code, as the lock-monitor thread will
handle this for us
>From kconner@
Set the default RetryInterval to 4000ms, to go with the altered retry
behaviour.
>From kconner(a).
Update documentation to match job executor changes. Add a section describi=
ng
job executor configuration variables.
JBPM-3192
Clarify need for unique job executor name.
Modified: jbpm3/branches/3.2.10.SP/core/src/main/java/org/jbpm/db/JobSessio=
n.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/core/src/main/java/org/jbpm/db/JobSession.java=
2011-05-16 15:27:57 UTC (rev 6930)
+++ jbpm3/branches/3.2.10.SP/core/src/main/java/org/jbpm/db/JobSession.java=
2011-05-16 15:34:38 UTC (rev 6931)
@@ -275,14 +275,4 @@
}
return session.createCriteria(Job.class).add(Restrictions.in("id", job=
s)).list();
}
-
- public void releaseLockedJobs(final String lockOwner) {
- try {
- session.getNamedQuery("JobSession.releaseLockedJobs")
- .setString("lockOwner", lockOwner)
- .executeUpdate();
- } catch (HibernateException e) {
- throw new JbpmPersistenceException("could not release locked jobs by=
owner '" + lockOwner + "'", e);
- }
- }
}
Modified: jbpm3/branches/3.2.10.SP/core/src/main/java/org/jbpm/job/executor=
/JobExecutor.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/core/src/main/java/org/jbpm/job/executor/JobEx=
ecutor.java 2011-05-16 15:27:57 UTC (rev 6930)
+++ jbpm3/branches/3.2.10.SP/core/src/main/java/org/jbpm/job/executor/JobEx=
ecutor.java 2011-05-16 15:34:38 UTC (rev 6931)
@@ -17,8 +17,6 @@
import org.apache.commons.logging.LogFactory;
=
import org.jbpm.JbpmConfiguration;
-import org.jbpm.JbpmContext;
-import org.jbpm.db.JobSession;
import org.jbpm.job.Job;
=
import edu.emory.mathcs.backport.java.util.concurrent.locks.Condition;
@@ -498,37 +496,10 @@
=
private void activateDispatcher() {
waitingExecutorLock.lock() ;
- try {
- if (!dispatcherActive) {
- unlockOurJobs() ;
- dispatcherActive =3D true ;
- }
- } finally {
- waitingExecutorLock.unlock() ;
- }
+ dispatcherActive =3D true ;
+ waitingExecutorLock.unlock() ;
}
=
- private void unlockOurJobs() {
- final JbpmContext jbpmContext =3D getJbpmConfiguration().createJbpmCon=
text();
- try {
- final String lockOwner =3D getName();
- final JobSession jobSession =3D jbpmContext.getJobSession();
- jobSession.releaseLockedJobs(lockOwner);
- } catch (RuntimeException e) {
- jbpmContext.setRollbackOnly();
- if (log.isDebugEnabled()) log.debug("failed to release locked jobs",=
e);
- } catch (Error e) {
- jbpmContext.setRollbackOnly();
- throw e;
- } finally {
- try {
- jbpmContext.close();
- } catch (RuntimeException e) {
- if (log.isDebugEnabled()) log.debug("failed to release locked jobs=
", e);
- }
- }
- }
-
private void deactivateDispatcher() {
waitingExecutorLock.lock() ;
try {
Modified: jbpm3/branches/3.2.10.SP/core/src/main/java/org/jbpm/job/executor=
/JobExecutorThread.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/core/src/main/java/org/jbpm/job/executor/JobEx=
ecutorThread.java 2011-05-16 15:27:57 UTC (rev 6930)
+++ jbpm3/branches/3.2.10.SP/core/src/main/java/org/jbpm/job/executor/JobEx=
ecutorThread.java 2011-05-16 15:34:38 UTC (rev 6931)
@@ -219,6 +219,10 @@
// unlock job
job.setLockOwner(null);
job.setLockTime(null);
+ if (job.getException() !=3D null)
+ {
+ job.setRetries(job.getRetries()+1) ;
+ }
}
catch (RuntimeException e) {
jbpmContext.setRollbackOnly();
Modified: jbpm3/branches/3.2.10.SP/core/src/main/resources/org/jbpm/db/hibe=
rnate.queries.hbm.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/core/src/main/resources/org/jbpm/db/hibernate.=
queries.hbm.xml 2011-05-16 15:27:57 UTC (rev 6930)
+++ jbpm3/branches/3.2.10.SP/core/src/main/resources/org/jbpm/db/hibernate.=
queries.hbm.xml 2011-05-16 15:34:38 UTC (rev 6931)
@@ -401,16 +401,6 @@
]]>
=
-
- 0
- and job.isSuspended =3D false
- ]]>
-
-
=
Modified: jbpm3/branches/3.2.10.SP/core/src/main/resources/org/jbpm/default=
.jbpm.cfg.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/core/src/main/resources/org/jbpm/default.jbpm.=
cfg.xml 2011-05-16 15:27:57 UTC (rev 6930)
+++ jbpm3/branches/3.2.10.SP/core/src/main/resources/org/jbpm/default.jbpm.=
cfg.xml 2011-05-16 15:34:38 UTC (rev 6931)
@@ -109,8 +109,8 @@
-
-
+
+
Modified: jbpm3/branches/3.2.10.SP/userguide/src/main/docbook/en-US/async.x=
ml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/userguide/src/main/docbook/en-US/async.xml 201=
1-05-16 15:27:57 UTC (rev 6930)
+++ jbpm3/branches/3.2.10.SP/userguide/src/main/docbook/en-US/async.xml 201=
1-05-16 15:34:38 UTC (rev 6931)
@@ -186,26 +186,23 @@
executor must execute the jobs. This is done in two phases.
- A job executor thread must acquire a job
+ The dispatcher thread must acquire a job
- The thread that acquired the job must execute it
+ An executor thread must execute the job
=
- Acquiring a job and executing the job are done in 2 separate tra=
nsactions. A thread =
- acquires a job by putting its name into the owner field of the job. E=
ach thread has a unique =
- name based on IP address and sequence number. Hibernate's optimistic =
locking is enabled on =
- Job-objects. So if 2 threads try to acquire a job =
concurrently, one of =
- them will get a StaleObjectException and rollback. Only the first one=
will succeed. The =
- thread that succeeds in acquiring a job is now responsible for executi=
ng it in a separate =
- transaction.
+ Acquiring a job and executing the job are done in 2 separate tra=
nsactions. The
+ dispatcher thread acquires jobs from the database on behalf of all the=
executor threads
+ on this node. When the executor thread takes the job, it adds its nam=
e into the owner
+ field of the job. Each thread has a unique name based on IP address a=
nd sequence number. =
=
A thread could die between acquisition and execution of a job. =
To clean-up after =
those situations, there is one lock-monitor thread per job executor th=
at checks the lock times. =
- The lock monitor thread will unlock any jobs that have been locked for=
more than 30 minutes,
+ The lock monitor thread will unlock any jobs that have been locked for=
more than 10 minutes,
so that they can be executed by another job executor thread.
=
@@ -230,6 +227,127 @@
READ_COMMITTED is not enough because it allows for =
Non-Repeatable reads to occur. =
So REPEATABLE_READ is required if you configure mor=
e than one job executor thread.
+
+
+ Configuration properties related to the job executor are:
+
+
+
+
+
+ jbpmConfiguration
+
+
+ The bean from which configuration is retrieved.
+
+
+
+
+
+ name
+
+
+ The name of this executor.
+
+
+
+ This name should be unique for each node, when more
+ than one jBPM instance is started on a single mach=
ine.
+
+
+
+
+
+
+ nbrOfThreads
+
+
+ The number of executor threads that are started.
+
+
+
+
+
+ idleInterval
+
+
+ The interval that the dispatcher thread will wait befo=
re
+ checking the job queue, if there are no jobs pending.
+
+
+
+ The dispatcher thread is automatically notifed whe=
n jobs
+ are added to the queue.
+
+
+
+
+
+
+ retryInterval
+
+
+ The interval that a job will wait between retries, if =
it
+ fails during execution.
+
+
+
+ The maximum number of retries is configured by
+ jbpm.job.retries.
+
+
+
+
+
+
+ maxIdleInterval
+
+
+ The maximum period for idleInterval.
+
+
+
+
+
+ historyMaxSize
+
+
+ This property is deprecated, and has no affect.
+
+
+
+
+
+ maxLockTime
+
+
+ The macimum time that a job can be locked, before the
+ lock-monitor thread will unlock it.
+
+
+
+
+
+ lockMonitorInterval
+
+
+ The period for which the lock-monitor thread will sleep
+ between checking for locked jobs.
+
+
+
+
+
+ lockBufferTime
+
+
+ This property is deprecated, and has no affect.
+
+
+
+
+
+
=
Modified: jbpm3/branches/3.2.10.SP/userguide/src/main/docbook/en-US/extras/=
configuration_1.xmlt
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/3.2.10.SP/userguide/src/main/docbook/en-US/extras/config=
uration_1.xmlt 2011-05-16 15:27:57 UTC (rev 6930)
+++ jbpm3/branches/3.2.10.SP/userguide/src/main/docbook/en-US/extras/config=
uration_1.xmlt 2011-05-16 15:34:38 UTC (rev 6931)
@@ -59,7 +59,8 @@
-
+
+
=
@@ -70,4 +71,4 @@
-
\ No newline at end of file
+
--===============3799056776867617035==--
From do-not-reply at jboss.org Mon May 16 11:51:59 2011
Content-Type: multipart/mixed; boundary="===============5076038870800792126=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: jbpm-commits at lists.jboss.org
Subject: [jbpm-commits] JBoss JBPM SVN: r6932 - jbpm3/tags.
Date: Mon, 16 May 2011 11:51:59 -0400
Message-ID: <201105161551.p4GFpxxJ003210@svn01.web.mwc.hst.phx2.redhat.com>
--===============5076038870800792126==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: jcoleman(a)redhat.com
Date: 2011-05-16 11:51:59 -0400 (Mon, 16 May 2011)
New Revision: 6932
Added:
jbpm3/tags/3.2.10.SP3/
Log:
Create 3.2.10.SP3 tag from 3.2.10.SP branch
--===============5076038870800792126==--
From do-not-reply at jboss.org Tue May 17 10:39:44 2011
Content-Type: multipart/mixed; boundary="===============4935244453677240596=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: jbpm-commits at lists.jboss.org
Subject: [jbpm-commits] JBoss JBPM SVN: r6933 -
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/jpdl/xml.
Date: Tue, 17 May 2011 10:39:43 -0400
Message-ID: <201105171439.p4HEdh53019712@svn01.web.mwc.hst.phx2.redhat.com>
--===============4935244453677240596==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: marco.rietveld
Date: 2011-05-17 10:39:43 -0400 (Tue, 17 May 2011)
New Revision: 6933
Modified:
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/jpdl/xml/JpdlXml=
Reader.java
Log:
SOA-2010: conditions are only valid on transitions leaving decisions
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/jpdl/xml/=
JpdlXmlReader.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/jpdl/xml/JpdlXm=
lReader.java 2011-05-16 15:51:59 UTC (rev 6932)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/jpdl/xml/JpdlXm=
lReader.java 2011-05-17 14:39:43 UTC (rev 6933)
@@ -52,6 +52,7 @@
import org.jbpm.graph.def.NodeCollection;
import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.graph.def.Transition;
+import org.jbpm.graph.node.Decision;
import org.jbpm.graph.node.NodeTypes;
import org.jbpm.graph.node.StartState;
import org.jbpm.graph.node.TaskNode;
@@ -712,11 +713,16 @@
transition.setName(transitionName);
transition.setDescription(transitionElement.elementTextTrim("descripti=
on"));
=
+ // SOA-2010: conditions only valid on transitions leaving decisions
+ boolean conditionPresentOnTransition =3D true;
+ =
// read transition condition
String condition =3D transitionElement.attributeValue("condition");
if (condition =3D=3D null) {
+ conditionPresentOnTransition =3D false;
Element conditionElement =3D transitionElement.element("condition");
if (conditionElement !=3D null) {
+ conditionPresentOnTransition =3D true;
condition =3D conditionElement.getTextTrim();
// for backwards compatibility
if (condition =3D=3D null || condition.length() =3D=3D 0) {
@@ -724,8 +730,22 @@
}
}
}
+ =
transition.setCondition(condition);
=
+ // SOA-2010: conditions only valid on transitions leaving decisions
+ if(conditionPresentOnTransition && ! (node instanceof Decision)) {
+ =
+ Class nodeClass =3D node.getClass().getDeclaringClass();
+ if( nodeClass =3D=3D null) {
+ nodeClass =3D node.getClass();
+ }
+ String simpleClassName =3D nodeClass.getSimpleName().toLowerCase();
+ =
+ addError("conditions on transitions used leaving a " + simpleClassNa=
me
+ + ", conditions on transitions only usable leaving decisions." );
+ }
+ =
// register transition in origin
node.addLeavingTransition(transition);
=
--===============4935244453677240596==--
From do-not-reply at jboss.org Tue May 17 10:41:32 2011
Content-Type: multipart/mixed; boundary="===============7381661330257752459=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: jbpm-commits at lists.jboss.org
Subject: [jbpm-commits] JBoss JBPM SVN: r6934 - in
jbpm3/branches/jbpm-3.2-soa/core/src/test: resources/org/jbpm/soa2010 and 1
other directory.
Date: Tue, 17 May 2011 10:41:32 -0400
Message-ID: <201105171441.p4HEfWiZ020164@svn01.web.mwc.hst.phx2.redhat.com>
--===============7381661330257752459==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: marco.rietveld
Date: 2011-05-17 10:41:32 -0400 (Tue, 17 May 2011)
New Revision: 6934
Added:
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.gp=
d.procdef_cond_false.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.gp=
d.procdef_cond_true.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.gp=
d.procdef_parse_bad_complex.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.gp=
d.procdef_parse_bad_simple.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.gp=
d.procdef_parse_good_complex.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.gp=
d.procdef_parse_good_simple.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pro=
cdef_cond_false.jpg
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pro=
cdef_cond_false.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pro=
cdef_cond_true.jpg
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pro=
cdef_cond_true.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pro=
cdef_parse_bad_complex.jpg
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pro=
cdef_parse_bad_complex.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pro=
cdef_parse_bad_simple.jpg
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pro=
cdef_parse_bad_simple.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pro=
cdef_parse_good_complex.jpg
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pro=
cdef_parse_good_complex.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pro=
cdef_parse_good_simple.jpg
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pro=
cdef_parse_good_simple.xml
Removed:
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.gp=
d.processdefinition1.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.gp=
d.processdefinition2.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.gp=
d.processdefinitiona.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.gp=
d.processdefinitionb.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pro=
cessdefinitiona.jpg
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pro=
cessdefinitiona.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pro=
cessdefinitionb.jpg
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pro=
cessdefinitionb.xml
Modified:
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/soa2010/SOA2010T=
est.java
Log:
SOA-2010: tests: conditions are only valid on transitions leaving decisions
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/soa2010/S=
OA2010Test.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/soa2010/SOA2010=
Test.java 2011-05-17 14:39:43 UTC (rev 6933)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/soa2010/SOA2010=
Test.java 2011-05-17 14:41:32 UTC (rev 6934)
@@ -21,14 +21,21 @@
*/
package org.jbpm.soa2010;
=
+import java.util.List;
+
import org.jbpm.JbpmException;
import org.jbpm.db.AbstractDbTestCase;
import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.jpdl.JpdlException;
+import org.jbpm.jpdl.xml.Problem;
=
/**
- * Conditional transition cannot be considered as a default one (for a Nod=
e). =
+ * SOA-2010: Conditional transition cannot be considered as a default one. =
* =
+ * Solution was
+ * - Parser restricts conditional transitions to only those transitions le=
aving decisions. =
+ * =
* @see SOA-2010
* @author Marco Rietveld
*/
@@ -38,7 +45,93 @@
super.setUp();
}
=
+ // =
+ // The following tests parse different jpdl docs to test for different s=
ituations
+ // =
+ =
/**
+ * Simple flow in which there are: =
+ * - normal transitions between a couple different types (just state, no=
de, task-node)
+ * - various conditional transitions from a decision node to an end node
+ */
+ public void testResolveTransitionDestinationGoodSimple() {
+ try{
+ ProcessDefinition.parseXmlResource("org/jbpm/soa2010/procdef_parse_g=
ood_simple.xml");
+ }
+ catch( Exception e) {
+ fail("unexpected exception thrown: " + e.getClass().getSimpleName() =
+ ": " + e.getMessage());
+ }
+ }
+ =
+ /**
+ * Complexer flow in which there are: =
+ * - normal transitions between a couple different types (just state, no=
de, task-node)
+ * - various conditional transitions from a decision node to an end node
+ */
+ public void testResolveTransitionDestinationGoodComplex() {
+ try{
+ ProcessDefinition.parseXmlResource("org/jbpm/soa2010/procdef_parse_g=
ood_complex.xml");
+ }
+ catch( Exception e) {
+ fail("unexpected exception thrown: " + e.getClass().getSimpleName() =
+ ": " + e.getMessage());
+ }
+ }
+ =
+ public void testResolveTransitionDestinationBadSimple() {
+ try {
+ ProcessDefinition.parseXmlResource("org/jbpm/soa2010/procdef_parse_b=
ad_simple.xml");
+ }
+ catch( JpdlException je) {
+ checkJpdlException(je, 3);
+ }
+ catch( Exception e) {
+ fail("unexpected exception thrown: " + e.getClass().getSimpleName() =
+ ": " + e.getMessage());
+ }
+ }
+ =
+ public void testResolveTransitionDestinationBadComplex() {
+ try {
+ ProcessDefinition.parseXmlResource("org/jbpm/soa2010/procdef_parse_b=
ad_complex.xml");
+ }
+ catch( JpdlException je) {
+ // 7 types x (7 + 2) connections + 1 start x 7 conn + 1 x 3 conn =3D=
73
+ checkJpdlException(je, 73);
+ }
+ catch( Exception e) {
+ fail("unexpected exception thrown: " + e.getClass().getSimpleName() =
+ ": " + e.getMessage());
+ }
+ }
+
+
+ /**
+ * Check that the given {@link JpdlException} only contains the given nu=
mber of problems
+ * and that all problems
+ */
+ private void checkJpdlException(JpdlException jpdlException, int expecte=
dNumCondTransProblems ) {
+ List problems =3D jpdlException.getProblems();
+ int conditionOnTransitionProblems =3D 0;
+ for( Problem problem : problems ) {
+ String problemMessage =3D problem.getDescription();
+ if( problemMessage.contains("conditions on transitions only usable=
leaving decisions") ) {
+ ++conditionOnTransitionProblems;
+ }
+ else {
+ fail("problem that was not conditions/transitions found: " + pro=
blemMessage );
+ }
+ }
+ assertTrue("only " + expectedNumCondTransProblems + " problems expec=
ted, not " + conditionOnTransitionProblems, conditionOnTransitionProblems =
=3D=3D expectedNumCondTransProblems);
+ =
+ }
+ =
+ // =
+ // The following tests illustrated the behaviour of Transition.take() on=
non-Decision nodes =
+ // **BEFORE SOA-2010 was implemented!**
+ // =
+ // These tests will currently fail (because the process will no longer b=
e accepted), =
+ // but have been left in as a form of documentation. =
+ //
+ =
+ /**
* Illustrate the following:
* - node with no unconditional transitions
* - transition with a condition that evaluates to false, as first trans=
ition (in jpdl doc) =
@@ -46,11 +139,11 @@
* =
* will throw an exception because the first/default transition is condi=
tional evaluating to false. =
*/
- public void testNodeWithFalseDefaultConditionalTransition() {
- ProcessDefinition processDefinition =3D ProcessDefinition.parseXmlReso=
urce("org/jbpm/soa2010/processdefinitiona.xml");
+ public void ignoreTestNodeWithFalseDefaultConditionalTransition() {
+ ProcessDefinition processDefinition =3D ProcessDefinition.parseXmlReso=
urce("org/jbpm/soa2010/procdef_cond_false.xml");
deployProcessDefinition(processDefinition);
=
- ProcessInstance processInstance =3D jbpmContext.newProcessInstance("so=
a2010a");
+ ProcessInstance processInstance =3D jbpmContext.newProcessInstance("so=
a2010cf");
boolean exceptionThrown =3D false;
try {
processInstance.signal();
@@ -72,11 +165,11 @@
* =
* (otherwise EXACTLY the same jpdl/graph as previous test)
*/
- public void testNodeWithTrueDefaultConditionalTransition() {
- ProcessDefinition processDefinition =3D ProcessDefinition.parseXmlReso=
urce("org/jbpm/soa2010/processdefinitionb.xml");
+ public void ignoreTestNodeWithTrueDefaultConditionalTransition() {
+ ProcessDefinition processDefinition =3D ProcessDefinition.parseXmlReso=
urce("org/jbpm/soa2010/procdef_cond_true.xml");
deployProcessDefinition(processDefinition);
=
- ProcessInstance processInstance =3D jbpmContext.newProcessInstance("so=
a2010b");
+ ProcessInstance processInstance =3D jbpmContext.newProcessInstance("so=
a2010ct");
try {
processInstance.signal();
}
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010=
/.gpd.procdef_cond_false.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.g=
pd.procdef_cond_false.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.g=
pd.procdef_cond_false.xml 2011-05-17 14:41:32 UTC (rev 6934)
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/or=
g/jbpm/soa2010/.gpd.procdef_cond_false.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ native
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010=
/.gpd.procdef_cond_true.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.g=
pd.procdef_cond_true.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.g=
pd.procdef_cond_true.xml 2011-05-17 14:41:32 UTC (rev 6934)
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/or=
g/jbpm/soa2010/.gpd.procdef_cond_true.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ native
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010=
/.gpd.procdef_parse_bad_complex.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.g=
pd.procdef_parse_bad_complex.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.g=
pd.procdef_parse_bad_complex.xml 2011-05-17 14:41:32 UTC (rev 6934)
@@ -0,0 +1,243 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/or=
g/jbpm/soa2010/.gpd.procdef_parse_bad_complex.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ native
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010=
/.gpd.procdef_parse_bad_simple.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.g=
pd.procdef_parse_bad_simple.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.g=
pd.procdef_parse_bad_simple.xml 2011-05-17 14:41:32 UTC (rev 6934)
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/or=
g/jbpm/soa2010/.gpd.procdef_parse_bad_simple.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ native
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010=
/.gpd.procdef_parse_good_complex.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.g=
pd.procdef_parse_good_complex.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.g=
pd.procdef_parse_good_complex.xml 2011-05-17 14:41:32 UTC (rev 6934)
@@ -0,0 +1,290 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/or=
g/jbpm/soa2010/.gpd.procdef_parse_good_complex.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ native
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010=
/.gpd.procdef_parse_good_simple.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.g=
pd.procdef_parse_good_simple.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.g=
pd.procdef_parse_good_simple.xml 2011-05-17 14:41:32 UTC (rev 6934)
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/or=
g/jbpm/soa2010/.gpd.procdef_parse_good_simple.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ native
Deleted: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa20=
10/.gpd.processdefinition1.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.g=
pd.processdefinition1.xml 2011-05-17 14:39:43 UTC (rev 6933)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.g=
pd.processdefinition1.xml 2011-05-17 14:41:32 UTC (rev 6934)
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Deleted: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa20=
10/.gpd.processdefinition2.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.g=
pd.processdefinition2.xml 2011-05-17 14:39:43 UTC (rev 6933)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.g=
pd.processdefinition2.xml 2011-05-17 14:41:32 UTC (rev 6934)
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Deleted: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa20=
10/.gpd.processdefinitiona.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.g=
pd.processdefinitiona.xml 2011-05-17 14:39:43 UTC (rev 6933)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.g=
pd.processdefinitiona.xml 2011-05-17 14:41:32 UTC (rev 6934)
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Deleted: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa20=
10/.gpd.processdefinitionb.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.g=
pd.processdefinitionb.xml 2011-05-17 14:39:43 UTC (rev 6933)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/.g=
pd.processdefinitionb.xml 2011-05-17 14:41:32 UTC (rev 6934)
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010=
/procdef_cond_false.jpg
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/or=
g/jbpm/soa2010/procdef_cond_false.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Copied: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa201=
0/procdef_cond_false.xml (from rev 6917, jbpm3/branches/jbpm-3.2-soa/core/s=
rc/test/resources/org/jbpm/soa2010/processdefinitiona.xml)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pr=
ocdef_cond_false.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pr=
ocdef_cond_false.xml 2011-05-17 14:41:32 UTC (rev 6934)
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/or=
g/jbpm/soa2010/procdef_cond_false.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010=
/procdef_cond_true.jpg
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/or=
g/jbpm/soa2010/procdef_cond_true.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Copied: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa201=
0/procdef_cond_true.xml (from rev 6917, jbpm3/branches/jbpm-3.2-soa/core/sr=
c/test/resources/org/jbpm/soa2010/processdefinitionb.xml)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pr=
ocdef_cond_true.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pr=
ocdef_cond_true.xml 2011-05-17 14:41:32 UTC (rev 6934)
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/or=
g/jbpm/soa2010/procdef_cond_true.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010=
/procdef_parse_bad_complex.jpg
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/or=
g/jbpm/soa2010/procdef_parse_bad_complex.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010=
/procdef_parse_bad_complex.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pr=
ocdef_parse_bad_complex.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pr=
ocdef_parse_bad_complex.xml 2011-05-17 14:41:32 UTC (rev 6934)
@@ -0,0 +1,178 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {AAA !=3D null}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {AAA !=3D null}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {AAA !=3D null}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {AAA !=3D null}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {AAA !=3D null}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {AAA !=3D null}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {AAA !=3D null}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {AAA !=3D null}
+
+
+
+
+
+
+
+
+
+
+
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/or=
g/jbpm/soa2010/procdef_parse_bad_complex.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ native
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010=
/procdef_parse_bad_simple.jpg
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/or=
g/jbpm/soa2010/procdef_parse_bad_simple.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010=
/procdef_parse_bad_simple.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pr=
ocdef_parse_bad_simple.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pr=
ocdef_parse_bad_simple.xml 2011-05-17 14:41:32 UTC (rev 6934)
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ #{BBB !=3D null}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/or=
g/jbpm/soa2010/procdef_parse_bad_simple.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ native
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010=
/procdef_parse_good_complex.jpg
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/or=
g/jbpm/soa2010/procdef_parse_good_complex.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010=
/procdef_parse_good_complex.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pr=
ocdef_parse_good_complex.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pr=
ocdef_parse_good_complex.xml 2011-05-17 14:41:32 UTC (rev 6934)
@@ -0,0 +1,181 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {AAA !=3D null}
+
+
+
+
+
+
+
+
+
+
+ {AAA !=3D null}
+
+
+
+
+
+
+
+
+
+
+ {AAA !=3D null}
+
+
+
+
+
+
+
+
+
+
+ {AAA !=3D null}
+
+
+
+
+
+
+
+
+
+
+ {AAA !=3D null}
+
+
+
+
+
+
+
+
+
+
+ {AAA !=3D null}
+
+
+
+
+
+
+
+
+
+
+ {AAA !=3D null}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =
+
+
+
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/or=
g/jbpm/soa2010/procdef_parse_good_complex.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ native
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010=
/procdef_parse_good_simple.jpg
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/or=
g/jbpm/soa2010/procdef_parse_good_simple.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010=
/procdef_parse_good_simple.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pr=
ocdef_parse_good_simple.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pr=
ocdef_parse_good_simple.xml 2011-05-17 14:41:32 UTC (rev 6934)
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
+ =
+
+
+
+
+
+ {AAA !=3D null}
+
+
+
+
+
+
+
+
+
+
+
+ =
+
+
+
+ =
+
+
+
+ =
+
+
+
+
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/or=
g/jbpm/soa2010/procdef_parse_good_simple.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ native
Deleted: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa20=
10/processdefinitiona.jpg
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)
Deleted: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa20=
10/processdefinitiona.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pr=
ocessdefinitiona.xml 2011-05-17 14:39:43 UTC (rev 6933)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pr=
ocessdefinitiona.xml 2011-05-17 14:41:32 UTC (rev 6934)
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
Deleted: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa20=
10/processdefinitionb.jpg
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)
Deleted: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa20=
10/processdefinitionb.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pr=
ocessdefinitionb.xml 2011-05-17 14:39:43 UTC (rev 6933)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/soa2010/pr=
ocessdefinitionb.xml 2011-05-17 14:41:32 UTC (rev 6934)
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
--===============7381661330257752459==--
From do-not-reply at jboss.org Wed May 18 04:03:08 2011
Content-Type: multipart/mixed; boundary="===============5217006732621694022=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: jbpm-commits at lists.jboss.org
Subject: [jbpm-commits] JBoss JBPM SVN: r6935 - in
jbpm3/branches/jbpm-3.2-soa/core/src: test/java/org/jbpm/soa2010 and 1 other
directory.
Date: Wed, 18 May 2011 04:03:07 -0400
Message-ID: <201105180803.p4I837WL005321@svn01.web.mwc.hst.phx2.redhat.com>
--===============5217006732621694022==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: marco.rietveld
Date: 2011-05-18 04:03:05 -0400 (Wed, 18 May 2011)
New Revision: 6935
Modified:
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/jpdl/xml/JpdlXml=
Reader.java
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/soa2010/SOA2010T=
est.java
Log:
SOA-2010: first commit wasn't compliant with java 1.4. =
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/jpdl/xml/=
JpdlXmlReader.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/jpdl/xml/JpdlXm=
lReader.java 2011-05-17 14:41:32 UTC (rev 6934)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/jpdl/xml/JpdlXm=
lReader.java 2011-05-18 08:03:05 UTC (rev 6935)
@@ -740,7 +740,8 @@
if( nodeClass =3D=3D null) {
nodeClass =3D node.getClass();
}
- String simpleClassName =3D nodeClass.getSimpleName().toLowerCase();
+ String simpleClassName =3D nodeClass.getName();
+ simpleClassName =3D simpleClassName.substring(simpleClassName.lastIn=
dexOf('.'));
=
addError("conditions on transitions used leaving a " + simpleClassNa=
me
+ ", conditions on transitions only usable leaving decisions." );
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/soa2010/S=
OA2010Test.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/soa2010/SOA2010=
Test.java 2011-05-17 14:41:32 UTC (rev 6934)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/soa2010/SOA2010=
Test.java 2011-05-18 08:03:05 UTC (rev 6935)
@@ -21,6 +21,7 @@
*/
package org.jbpm.soa2010;
=
+import java.util.Iterator;
import java.util.List;
=
import org.jbpm.JbpmException;
@@ -59,9 +60,14 @@
ProcessDefinition.parseXmlResource("org/jbpm/soa2010/procdef_parse_g=
ood_simple.xml");
}
catch( Exception e) {
- fail("unexpected exception thrown: " + e.getClass().getSimpleName() =
+ ": " + e.getMessage());
+ fail("unexpected exception thrown: " + getExceptionClassName(e) + ":=
" + e.getMessage());
}
}
+ =
+ private String getExceptionClassName(Exception e) {
+ String className =3D e.getClass().getName();
+ return className.substring(className.lastIndexOf('.'));
+ }
=
/**
* Complexer flow in which there are: =
@@ -73,7 +79,7 @@
ProcessDefinition.parseXmlResource("org/jbpm/soa2010/procdef_parse_g=
ood_complex.xml");
}
catch( Exception e) {
- fail("unexpected exception thrown: " + e.getClass().getSimpleName() =
+ ": " + e.getMessage());
+ fail("unexpected exception thrown: " + getExceptionClassName(e) + ":=
" + e.getMessage());
}
}
=
@@ -85,7 +91,7 @@
checkJpdlException(je, 3);
}
catch( Exception e) {
- fail("unexpected exception thrown: " + e.getClass().getSimpleName() =
+ ": " + e.getMessage());
+ fail("unexpected exception thrown: " + getExceptionClassName(e) + ":=
" + e.getMessage());
}
}
=
@@ -98,7 +104,7 @@
checkJpdlException(je, 73);
}
catch( Exception e) {
- fail("unexpected exception thrown: " + e.getClass().getSimpleName() =
+ ": " + e.getMessage());
+ fail("unexpected exception thrown: " + getExceptionClassName(e) + ":=
" + e.getMessage());
}
}
=
@@ -108,11 +114,12 @@
* and that all problems
*/
private void checkJpdlException(JpdlException jpdlException, int expecte=
dNumCondTransProblems ) {
- List problems =3D jpdlException.getProblems();
+ List problems =3D jpdlException.getProblems();
int conditionOnTransitionProblems =3D 0;
- for( Problem problem : problems ) {
+ Iterator iter =3D problems.iterator();
+ for( Problem problem =3D (Problem) iter.next(); iter.hasNext(); prob=
lem =3D (Problem) iter.next() ) {
String problemMessage =3D problem.getDescription();
- if( problemMessage.contains("conditions on transitions only usable=
leaving decisions") ) {
+ if( problemMessage.indexOf("conditions on transitions only usable =
leaving decisions") > -1) {
++conditionOnTransitionProblems;
}
else {
@@ -149,7 +156,7 @@
processInstance.signal();
}
catch(JbpmException je) {
- assertTrue("expected exception on condition", je.getMessage().contai=
ns("guarding Transition(to false) not met"));
+ assertTrue("expected exception on condition", je.getMessage().indexO=
f("guarding Transition(to false) not met") > -1);
exceptionThrown =3D true;
}
assertTrue("expected exception on condition", exceptionThrown);
--===============5217006732621694022==--
From do-not-reply at jboss.org Wed May 18 07:09:53 2011
Content-Type: multipart/mixed; boundary="===============0913171670161318426=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: jbpm-commits at lists.jboss.org
Subject: [jbpm-commits] JBoss JBPM SVN: r6936 -
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/soa2010.
Date: Wed, 18 May 2011 07:09:53 -0400
Message-ID: <201105181109.p4IB9rpS009872@svn01.web.mwc.hst.phx2.redhat.com>
--===============0913171670161318426==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: marco.rietveld
Date: 2011-05-18 07:09:49 -0400 (Wed, 18 May 2011)
New Revision: 6936
Modified:
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/soa2010/SOA2010T=
est.java
Log:
SOA-2010: forgot how iterators work.. :( =
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/soa2010/S=
OA2010Test.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/soa2010/SOA2010=
Test.java 2011-05-18 08:03:05 UTC (rev 6935)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/soa2010/SOA2010=
Test.java 2011-05-18 11:09:49 UTC (rev 6936)
@@ -117,7 +117,8 @@
List problems =3D jpdlException.getProblems();
int conditionOnTransitionProblems =3D 0;
Iterator iter =3D problems.iterator();
- for( Problem problem =3D (Problem) iter.next(); iter.hasNext(); prob=
lem =3D (Problem) iter.next() ) {
+ while( iter.hasNext() ) {
+ Problem problem =3D (Problem) iter.next();
String problemMessage =3D problem.getDescription();
if( problemMessage.indexOf("conditions on transitions only usable =
leaving decisions") > -1) {
++conditionOnTransitionProblems;
@@ -126,7 +127,7 @@
fail("problem that was not conditions/transitions found: " + pro=
blemMessage );
}
}
- assertTrue("only " + expectedNumCondTransProblems + " problems expec=
ted, not " + conditionOnTransitionProblems, conditionOnTransitionProblems =
=3D=3D expectedNumCondTransProblems);
+ assertTrue(expectedNumCondTransProblems + " problems expected, not "=
+ conditionOnTransitionProblems, conditionOnTransitionProblems =3D=3D expe=
ctedNumCondTransProblems);
=
}
=
--===============0913171670161318426==--
From do-not-reply at jboss.org Thu May 19 02:14:14 2011
Content-Type: multipart/mixed; boundary="===============3026347046509512744=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: jbpm-commits at lists.jboss.org
Subject: [jbpm-commits] JBoss JBPM SVN: r6937 - in
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm: jpdl/exe and 1 other
directory.
Date: Thu, 19 May 2011 02:14:14 -0400
Message-ID: <201105190614.p4J6EEwl013550@svn01.web.mwc.hst.phx2.redhat.com>
--===============3026347046509512744==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: marco.rietveld
Date: 2011-05-19 02:14:13 -0400 (Thu, 19 May 2011)
New Revision: 6937
Modified:
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/graph/exe/TokenD=
bTest.java
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jpdl/exe/Availab=
leTransitionsDbTest.java
Log:
SOA-2010: these tests contained invalid processes. The processes in the tes=
ts have been modified so that the tests still work, but use valid processes=
. =
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/graph/exe=
/TokenDbTest.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/graph/exe/Token=
DbTest.java 2011-05-18 11:09:49 UTC (rev 6936)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/graph/exe/Token=
DbTest.java 2011-05-19 06:14:13 UTC (rev 6937)
@@ -128,11 +128,14 @@
public void testAvailableTransitions() {
ProcessDefinition processDefinition =3D ProcessDefinition.parseXmlStri=
ng(""
+ " "
+ + " "
+ + " "
+ + " "
+ " "
+ " "
+ " "
+ " "
- + " "
+ + " "
+ " "
+ " "
+ " "
@@ -142,6 +145,8 @@
=
ProcessInstance processInstance =3D jbpmContext.newProcessInstance("co=
nditionsprocess");
processInstance.getContextInstance().setVariable("a", new Integer(5));
+ Node decisionNode =3D processDefinition.findNode("decision");
+ processInstance.getRootToken().setNode(decisionNode);
processInstance =3D saveAndReload(processInstance);
=
Set availableTransitions =3D processInstance.getRootToken().getAvailab=
leTransitions();
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jpdl/exe/=
AvailableTransitionsDbTest.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jpdl/exe/Availa=
bleTransitionsDbTest.java 2011-05-18 11:09:49 UTC (rev 6936)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jpdl/exe/Availa=
bleTransitionsDbTest.java 2011-05-19 06:14:13 UTC (rev 6937)
@@ -6,7 +6,9 @@
=
import org.jbpm.context.exe.ContextInstance;
import org.jbpm.db.AbstractDbTestCase;
+import org.jbpm.graph.def.Node;
import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.graph.def.SuperState;
import org.jbpm.graph.def.Transition;
import org.jbpm.graph.exe.ProcessInstance;
=
@@ -15,6 +17,9 @@
public void testSimpleAvailableTransitions() {
ProcessDefinition processDefinition =3D ProcessDefinition.parseXmlStri=
ng(""
+ " "
+ + " "
+ + " " =
+ + " "
+ " "
+ " "
+ " "
@@ -25,13 +30,14 @@
+ " "
+ " "
+ " "
- + " "
+ + " "
+ " "
+ " "
+ "");
deployProcessDefinition(processDefinition);
=
ProcessInstance processInstance =3D jbpmContext.newProcessInstance("co=
nditionalavailability");
+ processInstance.getRootToken().setNode(processDefinition.findNode("dec=
ision"));
processInstance =3D saveAndReload(processInstance);
=
Set availableTransitions =3D processInstance.getRootToken().getAvailab=
leTransitions();
@@ -85,22 +91,27 @@
}
=
public void testSuperStateAvailableTransitions() {
+ // Conditions are no longer valid on transitions from SuperStates! =
+ =
ProcessDefinition processDefinition =3D ProcessDefinition.parseXmlStri=
ng(""
+ " "
+ " "
+ + " "
+ + " "
+ + " "
+ " "
+ " "
+ " "
+ " "
- + " "
+ + " "
+ " "
- + " "
+// + " "
+ " "
+ " "
- + " "
+// + " "
+ " "
+ " "
- + " "
+// + " "
+ " "
+ " "
+ " "
@@ -110,8 +121,13 @@
deployProcessDefinition(processDefinition);
=
ProcessInstance processInstance =3D jbpmContext.newProcessInstance("co=
nditionalavailability");
+ SuperState superState =3D (SuperState) processDefinition.findNode("sta=
rt");
+ Node decisionNode =3D (Node) superState.getNodesMap().get("decn");
+ processInstance.getRootToken().setNode(decisionNode);
Set availableTransitions =3D processInstance.getRootToken().getAvailab=
leTransitions();
- assertEquals(2, availableTransitions.size());
+ // 2 from decision + 3 from superstate: see Token.addAvailableTransiti=
onsOfNode =
+ // which is called by getAvailableTransitions();
+ assertEquals(5, availableTransitions.size());
=
ContextInstance contextInstance =3D processInstance.getContextInstance=
();
contextInstance.setVariable("a", new Integer(5));
@@ -123,6 +139,8 @@
expectedTransitionNames.add("inneralwaysavailable");
expectedTransitionNames.add("outeralwaysavailable");
expectedTransitionNames.add("high");
+ expectedTransitionNames.add("medium");
+ expectedTransitionNames.add("low");
=
availableTransitions =3D processInstance.getRootToken().getAvailableTr=
ansitions();
assertEquals(expectedTransitionNames, getTransitionNames(availableTran=
sitions));
--===============3026347046509512744==--
From do-not-reply at jboss.org Thu May 19 02:15:14 2011
Content-Type: multipart/mixed; boundary="===============7299568915563750373=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: jbpm-commits at lists.jboss.org
Subject: [jbpm-commits] JBoss JBPM SVN: r6938 -
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm2834.
Date: Thu, 19 May 2011 02:15:13 -0400
Message-ID: <201105190615.p4J6FDmF013906@svn01.web.mwc.hst.phx2.redhat.com>
--===============7299568915563750373==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: marco.rietveld
Date: 2011-05-19 02:15:13 -0400 (Thu, 19 May 2011)
New Revision: 6938
Modified:
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm2834/JBPM283=
4Test.java
Log:
SOA-2010: JBPM-2834 is no longer a valid issue. The test has been modified =
so that it no longer runs, but has been left in the source in order to docu=
ment the history. =
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm2834/=
JBPM2834Test.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm2834/JBPM28=
34Test.java 2011-05-19 06:14:13 UTC (rev 6937)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm2834/JBPM28=
34Test.java 2011-05-19 06:15:13 UTC (rev 6938)
@@ -31,13 +31,21 @@
/**
* {@link Node#getDefaultLeavingTransition()} returns null
wh=
en
* there is no unconditional transition.
+ *
+ * This test is no longer valid because transitions on conditions are only=
valid =
+ * on transitions leaving Decisions. Comments explaining this were added =
to the =
+ * jira issue (Marco Rietveld, May 18, 2011) =
* =
* @see JBPM-2834=
* @author Alejandro Guizar
*/
public class JBPM2834Test extends AbstractJbpmTestCase {
=
- public void testConditionalDefaultLeavingTransition() {
+ public void testDummyTest() {
+ assertTrue(true);
+ }
+ =
+ public void ignoreTestConditionalDefaultLeavingTransition() {
// parse definition
ProcessDefinition processDefinition =3D ProcessDefinition.parseXmlReso=
urce("org/jbpm/jbpm2834/processdefinition.xml");
// start instance
--===============7299568915563750373==--
From do-not-reply at jboss.org Thu May 19 02:17:06 2011
Content-Type: multipart/mixed; boundary="===============9203615735589700244=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: jbpm-commits at lists.jboss.org
Subject: [jbpm-commits] JBoss JBPM SVN: r6939 -
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor.
Date: Thu, 19 May 2011 02:17:05 -0400
Message-ID: <201105190617.p4J6H5ui013923@svn01.web.mwc.hst.phx2.redhat.com>
--===============9203615735589700244==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: marco.rietveld
Date: 2011-05-19 02:17:05 -0400 (Thu, 19 May 2011)
New Revision: 6939
Modified:
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/Job=
Executor.java
Log:
Changed dispatchedJobs.remove() to dispatchedJobs.remove(0): jBPM must be =
Java 4 compatible, and LinkedList.remove() is introduced in Java 5. =
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/execu=
tor/JobExecutor.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/Jo=
bExecutor.java 2011-05-19 06:15:13 UTC (rev 6938)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/Jo=
bExecutor.java 2011-05-19 06:17:05 UTC (rev 6939)
@@ -469,7 +469,7 @@
waitingExecutorCondition.await() ;
}
if (dispatchedJobs.size() > 0) {
- return (Job)dispatchedJobs.remove() ;
+ return (Job)dispatchedJobs.remove(0) ;
}
}
} catch (final InterruptedException ie) {
--===============9203615735589700244==--
From do-not-reply at jboss.org Thu May 19 03:49:29 2011
Content-Type: multipart/mixed; boundary="===============5995465034855109374=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: jbpm-commits at lists.jboss.org
Subject: [jbpm-commits] JBoss JBPM SVN: r6940 -
jbpm3/branches/jbpm-3.2-soa/userguide/src/main/docbook/en-US.
Date: Thu, 19 May 2011 03:49:29 -0400
Message-ID: <201105190749.p4J7nT6g028993@svn01.web.mwc.hst.phx2.redhat.com>
--===============5995465034855109374==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: marco.rietveld
Date: 2011-05-19 03:49:29 -0400 (Thu, 19 May 2011)
New Revision: 6940
Modified:
jbpm3/branches/jbpm-3.2-soa/userguide/src/main/docbook/en-US/jpdl.xml
Log:
SOA-2010: ensure that documentation is explicit about conditions only being=
used on transitions leaving decisions. =
Modified: jbpm3/branches/jbpm-3.2-soa/userguide/src/main/docbook/en-US/jpdl=
.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/userguide/src/main/docbook/en-US/jpdl.xml 2=
011-05-19 06:17:05 UTC (rev 6939)
+++ jbpm3/branches/jbpm-3.2-soa/userguide/src/main/docbook/en-US/jpdl.xml 2=
011-05-19 07:49:29 UTC (rev 6940)
@@ -1292,7 +1292,8 @@
optional
This is a guard condition expr=
ession. Use these condition =
attributes (or child elements) in decision nodes, or to calc=
ulate the =
- available transitions on a token at run-time.
+ available transitions on a token at run-time. Conditions are=
only allowed on transitions
+ leaving decision nodes. =
@@ -2142,7 +2143,8 @@
which the expression resolves to true
. If
none of the conditions resolve to true
,
the default leaving transition (the first one) will be
- taken.
+ taken. Conditions are only allowed on transitions lea=
ving
+ decision nodes. =
--===============5995465034855109374==--
From do-not-reply at jboss.org Thu May 19 09:03:08 2011
Content-Type: multipart/mixed; boundary="===============8104616491007209986=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: jbpm-commits at lists.jboss.org
Subject: [jbpm-commits] JBoss JBPM SVN: r6941 -
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/job/executor.
Date: Thu, 19 May 2011 09:03:08 -0400
Message-ID: <201105191303.p4JD38fI032067@svn01.web.mwc.hst.phx2.redhat.com>
--===============8104616491007209986==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: marco.rietveld
Date: 2011-05-19 09:03:08 -0400 (Thu, 19 May 2011)
New Revision: 6941
Added:
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/job/executor/Job=
ExecutorTest.java
Log:
Trying to find a way to measure user time in tests, instead of system time =
(because of sometimes overloaded test systems). =
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/job/executor=
/JobExecutorTest.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/job/executor/Jo=
bExecutorTest.java (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/job/executor/Jo=
bExecutorTest.java 2011-05-19 13:03:08 UTC (rev 6941)
@@ -0,0 +1,13 @@
+package org.jbpm.job.executor;
+
+import java.lang.management.ManagementFactory;
+import java.lang.management.ThreadMXBean;
+
+public class JobExecutorTest {
+
+ public long getUserTime() {
+ ThreadMXBean bean =3D ManagementFactory.getThreadMXBean();
+ return bean.isCurrentThreadCpuTimeSupported() ? bean.getCurrentThreadU=
serTime() : 0L;
+ }
+
+}
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbp=
m/job/executor/JobExecutorTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ native
--===============8104616491007209986==--
From do-not-reply at jboss.org Thu May 19 11:34:47 2011
Content-Type: multipart/mixed; boundary="===============1102393782802146380=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: jbpm-commits at lists.jboss.org
Subject: [jbpm-commits] JBoss JBPM SVN: r6942 -
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db.
Date: Thu, 19 May 2011 11:34:47 -0400
Message-ID: <201105191534.p4JFYltv027105@svn01.web.mwc.hst.phx2.redhat.com>
--===============1102393782802146380==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: marco.rietveld
Date: 2011-05-19 11:34:47 -0400 (Thu, 19 May 2011)
New Revision: 6942
Modified:
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db/AbstractDbTes=
tCase.java
Log:
Experiment with ThreadMXBean in order to see if this helps to run JobExecut=
or tests.
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db/Abstra=
ctDbTestCase.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db/AbstractDbTe=
stCase.java 2011-05-19 13:03:08 UTC (rev 6941)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db/AbstractDbTe=
stCase.java 2011-05-19 15:34:47 UTC (rev 6942)
@@ -21,7 +21,11 @@
*/
package org.jbpm.db;
=
+import java.lang.management.ManagementFactory;
+import java.lang.management.ThreadMXBean;
import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -31,7 +35,6 @@
import org.hibernate.cfg.Environment;
import org.hibernate.criterion.Projections;
import org.hibernate.criterion.Restrictions;
-
import org.jbpm.AbstractJbpmTestCase;
import org.jbpm.JbpmConfiguration;
import org.jbpm.JbpmContext;
@@ -205,9 +208,10 @@
}
}
=
- protected void startJobExecutor() {
+ protected JobExecutor startJobExecutor() {
jobExecutor =3D getJbpmConfiguration().getJobExecutor();
jobExecutor.start();
+ return jobExecutor;
}
=
/**
@@ -260,6 +264,72 @@
}
}
=
+ private long getUserTimeInMilliseconds( HashSet threadIdSet ) {
+ ThreadMXBean bean =3D ManagementFactory.getThreadMXBean( );
+ if ( ! bean.isThreadCpuTimeSupported( ) ) {
+ return 0L;
+ } =
+
+ long totalThreadTimeInNanoSeconds =3D 0;
+ Long [] threadId =3D new Long[0];
+ threadId =3D threadIdSet.toArray(threadId);
+
+ for ( int i =3D 0; i < threadId.length; ++i ) {
+ long threadTime =3D bean.getThreadUserTime( threadId[i] );
+ if ( threadTime !=3D -1 ) {
+ totalThreadTimeInNanoSeconds +=3D threadTime;
+ }
+ }
+ =
+ return totalThreadTimeInNanoSeconds/1000000;
+ }
+
+ protected void newWaitForJobs(final long timeout, Map threadMap) {
+
+ // Gather thread Id's
+ Iterator threadMapIter =3D threadMap.values().iterator();
+ HashSet threadIdSet =3D new HashSet();
+ while(threadMapIter.hasNext()) {
+ threadIdSet.add(threadMapIter.next().getId());
+ }
+ =
+ long waitPeriod =3D 500;
+ for (int currentCount, previousCount =3D 0; (currentCount =3D getNbrOf=
JobsAvailable()) > 0;) {
+
+ long elapsedTime =3D getUserTimeInMilliseconds(threadIdSet);
+ =
+ if (elapsedTime > timeout) {
+ fail("test execution exceeded threshold of " + timeout + " ms");
+ }
+
+ if (currentCount < previousCount) {
+ long elapsedTimePerJob =3D (elapsedTime) / (previousCount - curren=
tCount);
+ waitPeriod =3D currentCount * elapsedTimePerJob;
+ if (waitPeriod < 500) waitPeriod =3D 500;
+ }
+
+ if (waitPeriod > 5000) {
+ waitPeriod =3D 5000;
+ }
+ else {
+ long remainingTime =3D timeout - elapsedTime;
+ waitPeriod =3D (waitPeriod > remainingTime) ? remainingTime : wait=
Period;
+ }
+ =
+ if (log.isDebugEnabled()) {
+ log.debug("waiting " + waitPeriod + " ms for " + currentCount + " =
jobs");
+ }
+ try {
+ Thread.sleep(waitPeriod);
+ }
+ catch (InterruptedException e) {
+ fail("wait for jobs got interrupted");
+ }
+
+ previousCount =3D currentCount;
+ }
+ }
+ =
protected int getNbrOfJobsAvailable() {
if (session !=3D null) {
return getJobCount(session);
@@ -305,7 +375,7 @@
* time has elapsed. The current jBPM context is closed before waiting a=
nd a new one is opened
* after processing the jobs.
*/
- protected void processJobs(long timeout) {
+ protected void oldProcessJobs(long timeout) {
closeJbpmContext();
try {
startJobExecutor();
@@ -317,6 +387,18 @@
}
}
=
+ protected void processJobs(long timeout) {
+ closeJbpmContext();
+ try {
+ JobExecutor jobExecutor =3D startJobExecutor();
+ newWaitForJobs(timeout, jobExecutor.getThreads());
+ }
+ finally {
+ stopJobExecutor();
+ createJbpmContext();
+ }
+ }
+
protected void stopJobExecutor() {
if (jobExecutor !=3D null) {
try {
--===============1102393782802146380==--
From do-not-reply at jboss.org Thu May 19 11:41:52 2011
Content-Type: multipart/mixed; boundary="===============2572946339506079366=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: jbpm-commits at lists.jboss.org
Subject: [jbpm-commits] JBoss JBPM SVN: r6943 -
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db.
Date: Thu, 19 May 2011 11:41:52 -0400
Message-ID: <201105191541.p4JFfqwe027918@svn01.web.mwc.hst.phx2.redhat.com>
--===============2572946339506079366==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: marco.rietveld
Date: 2011-05-19 11:41:52 -0400 (Thu, 19 May 2011)
New Revision: 6943
Modified:
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db/AbstractDbTes=
tCase.java
Log:
Experiment failed, unable to use ThreadMXBean because jBPM is, of course, j=
ava 1.4 compliant. =
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db/Abstra=
ctDbTestCase.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db/AbstractDbTe=
stCase.java 2011-05-19 15:34:47 UTC (rev 6942)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db/AbstractDbTe=
stCase.java 2011-05-19 15:41:52 UTC (rev 6943)
@@ -21,11 +21,7 @@
*/
package org.jbpm.db;
=
-import java.lang.management.ManagementFactory;
-import java.lang.management.ThreadMXBean;
import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -35,6 +31,7 @@
import org.hibernate.cfg.Environment;
import org.hibernate.criterion.Projections;
import org.hibernate.criterion.Restrictions;
+
import org.jbpm.AbstractJbpmTestCase;
import org.jbpm.JbpmConfiguration;
import org.jbpm.JbpmContext;
@@ -208,10 +205,9 @@
}
}
=
- protected JobExecutor startJobExecutor() {
+ protected void startJobExecutor() {
jobExecutor =3D getJbpmConfiguration().getJobExecutor();
jobExecutor.start();
- return jobExecutor;
}
=
/**
@@ -264,72 +260,6 @@
}
}
=
- private long getUserTimeInMilliseconds( HashSet threadIdSet ) {
- ThreadMXBean bean =3D ManagementFactory.getThreadMXBean( );
- if ( ! bean.isThreadCpuTimeSupported( ) ) {
- return 0L;
- } =
-
- long totalThreadTimeInNanoSeconds =3D 0;
- Long [] threadId =3D new Long[0];
- threadId =3D threadIdSet.toArray(threadId);
-
- for ( int i =3D 0; i < threadId.length; ++i ) {
- long threadTime =3D bean.getThreadUserTime( threadId[i] );
- if ( threadTime !=3D -1 ) {
- totalThreadTimeInNanoSeconds +=3D threadTime;
- }
- }
- =
- return totalThreadTimeInNanoSeconds/1000000;
- }
-
- protected void newWaitForJobs(final long timeout, Map threadMap) {
-
- // Gather thread Id's
- Iterator threadMapIter =3D threadMap.values().iterator();
- HashSet threadIdSet =3D new HashSet();
- while(threadMapIter.hasNext()) {
- threadIdSet.add(threadMapIter.next().getId());
- }
- =
- long waitPeriod =3D 500;
- for (int currentCount, previousCount =3D 0; (currentCount =3D getNbrOf=
JobsAvailable()) > 0;) {
-
- long elapsedTime =3D getUserTimeInMilliseconds(threadIdSet);
- =
- if (elapsedTime > timeout) {
- fail("test execution exceeded threshold of " + timeout + " ms");
- }
-
- if (currentCount < previousCount) {
- long elapsedTimePerJob =3D (elapsedTime) / (previousCount - curren=
tCount);
- waitPeriod =3D currentCount * elapsedTimePerJob;
- if (waitPeriod < 500) waitPeriod =3D 500;
- }
-
- if (waitPeriod > 5000) {
- waitPeriod =3D 5000;
- }
- else {
- long remainingTime =3D timeout - elapsedTime;
- waitPeriod =3D (waitPeriod > remainingTime) ? remainingTime : wait=
Period;
- }
- =
- if (log.isDebugEnabled()) {
- log.debug("waiting " + waitPeriod + " ms for " + currentCount + " =
jobs");
- }
- try {
- Thread.sleep(waitPeriod);
- }
- catch (InterruptedException e) {
- fail("wait for jobs got interrupted");
- }
-
- previousCount =3D currentCount;
- }
- }
- =
protected int getNbrOfJobsAvailable() {
if (session !=3D null) {
return getJobCount(session);
@@ -375,7 +305,7 @@
* time has elapsed. The current jBPM context is closed before waiting a=
nd a new one is opened
* after processing the jobs.
*/
- protected void oldProcessJobs(long timeout) {
+ protected void processJobs(long timeout) {
closeJbpmContext();
try {
startJobExecutor();
@@ -387,18 +317,6 @@
}
}
=
- protected void processJobs(long timeout) {
- closeJbpmContext();
- try {
- JobExecutor jobExecutor =3D startJobExecutor();
- newWaitForJobs(timeout, jobExecutor.getThreads());
- }
- finally {
- stopJobExecutor();
- createJbpmContext();
- }
- }
-
protected void stopJobExecutor() {
if (jobExecutor !=3D null) {
try {
--===============2572946339506079366==--
From do-not-reply at jboss.org Thu May 19 11:43:14 2011
Content-Type: multipart/mixed; boundary="===============1040589276093502856=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: jbpm-commits at lists.jboss.org
Subject: [jbpm-commits] JBoss JBPM SVN: r6944 -
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/job/executor.
Date: Thu, 19 May 2011 11:43:14 -0400
Message-ID: <201105191543.p4JFhExo027933@svn01.web.mwc.hst.phx2.redhat.com>
--===============1040589276093502856==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: marco.rietveld
Date: 2011-05-19 11:43:13 -0400 (Thu, 19 May 2011)
New Revision: 6944
Removed:
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/job/executor/Job=
ExecutorTest.java
Log:
Experiment failed, unable to use ThreadMXBean because jBPM is, of course, j=
ava 1.4 compliant. =
Deleted: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/job/execut=
or/JobExecutorTest.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/job/executor/Jo=
bExecutorTest.java 2011-05-19 15:41:52 UTC (rev 6943)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/job/executor/Jo=
bExecutorTest.java 2011-05-19 15:43:13 UTC (rev 6944)
@@ -1,13 +0,0 @@
-package org.jbpm.job.executor;
-
-import java.lang.management.ManagementFactory;
-import java.lang.management.ThreadMXBean;
-
-public class JobExecutorTest {
-
- public long getUserTime() {
- ThreadMXBean bean =3D ManagementFactory.getThreadMXBean();
- return bean.isCurrentThreadCpuTimeSupported() ? bean.getCurrentThreadU=
serTime() : 0L;
- }
-
-}
--===============1040589276093502856==--
From do-not-reply at jboss.org Thu May 19 11:46:56 2011
Content-Type: multipart/mixed; boundary="===============8498185943495167797=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: jbpm-commits at lists.jboss.org
Subject: [jbpm-commits] JBoss JBPM SVN: r6945 -
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db.
Date: Thu, 19 May 2011 11:46:55 -0400
Message-ID: <201105191546.p4JFktUY028301@svn01.web.mwc.hst.phx2.redhat.com>
--===============8498185943495167797==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: marco.rietveld
Date: 2011-05-19 11:46:55 -0400 (Thu, 19 May 2011)
New Revision: 6945
Modified:
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db/AbstractDbTes=
tCase.java
Log:
Experiment with ThreadMXBean: second attempt. =
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db/Abstra=
ctDbTestCase.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db/AbstractDbTe=
stCase.java 2011-05-19 15:43:13 UTC (rev 6944)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db/AbstractDbTe=
stCase.java 2011-05-19 15:46:55 UTC (rev 6945)
@@ -21,7 +21,11 @@
*/
package org.jbpm.db;
=
+import java.lang.management.ManagementFactory;
+import java.lang.management.ThreadMXBean;
import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -31,7 +35,6 @@
import org.hibernate.cfg.Environment;
import org.hibernate.criterion.Projections;
import org.hibernate.criterion.Restrictions;
-
import org.jbpm.AbstractJbpmTestCase;
import org.jbpm.JbpmConfiguration;
import org.jbpm.JbpmContext;
@@ -205,9 +208,10 @@
}
}
=
- protected void startJobExecutor() {
+ protected JobExecutor startJobExecutor() {
jobExecutor =3D getJbpmConfiguration().getJobExecutor();
jobExecutor.start();
+ return jobExecutor;
}
=
/**
@@ -260,6 +264,73 @@
}
}
=
+ private long getUserTimeInMilliseconds( HashSet threadIdSet ) {
+ ThreadMXBean bean =3D ManagementFactory.getThreadMXBean( );
+ if ( ! bean.isThreadCpuTimeSupported( ) ) {
+ return 0L;
+ } =
+
+ long totalThreadTimeInNanoSeconds =3D 0;
+ Object [] threadId =3D new Long[0];
+ threadId =3D threadIdSet.toArray(threadId);
+
+ for ( int i =3D 0; i < threadId.length; ++i ) {
+ long threadTime =3D bean.getThreadUserTime( (Long) threadId[i] );
+ if ( threadTime !=3D -1 ) {
+ totalThreadTimeInNanoSeconds +=3D threadTime;
+ }
+ }
+ =
+ return totalThreadTimeInNanoSeconds/1000000;
+ }
+
+ protected void newWaitForJobs(final long timeout, Map threadMap) {
+
+ // Gather thread Id's
+ Iterator threadMapIter =3D threadMap.values().iterator();
+ HashSet threadIdSet =3D new HashSet();
+ while(threadMapIter.hasNext()) {
+ Thread thisThread =3D (Thread) threadMapIter.next();
+ threadIdSet.add(thisThread.getId());
+ }
+ =
+ long waitPeriod =3D 500;
+ for (int currentCount, previousCount =3D 0; (currentCount =3D getNbrOf=
JobsAvailable()) > 0;) {
+
+ long elapsedTime =3D getUserTimeInMilliseconds(threadIdSet);
+ =
+ if (elapsedTime > timeout) {
+ fail("test execution exceeded threshold of " + timeout + " ms");
+ }
+
+ if (currentCount < previousCount) {
+ long elapsedTimePerJob =3D (elapsedTime) / (previousCount - curren=
tCount);
+ waitPeriod =3D currentCount * elapsedTimePerJob;
+ if (waitPeriod < 500) waitPeriod =3D 500;
+ }
+
+ if (waitPeriod > 5000) {
+ waitPeriod =3D 5000;
+ }
+ else {
+ long remainingTime =3D timeout - elapsedTime;
+ waitPeriod =3D (waitPeriod > remainingTime) ? remainingTime : wait=
Period;
+ }
+ =
+ if (log.isDebugEnabled()) {
+ log.debug("waiting " + waitPeriod + " ms for " + currentCount + " =
jobs");
+ }
+ try {
+ Thread.sleep(waitPeriod);
+ }
+ catch (InterruptedException e) {
+ fail("wait for jobs got interrupted");
+ }
+
+ previousCount =3D currentCount;
+ }
+ }
+ =
protected int getNbrOfJobsAvailable() {
if (session !=3D null) {
return getJobCount(session);
@@ -305,7 +376,7 @@
* time has elapsed. The current jBPM context is closed before waiting a=
nd a new one is opened
* after processing the jobs.
*/
- protected void processJobs(long timeout) {
+ protected void oldProcessJobs(long timeout) {
closeJbpmContext();
try {
startJobExecutor();
@@ -317,6 +388,18 @@
}
}
=
+ protected void processJobs(long timeout) {
+ closeJbpmContext();
+ try {
+ JobExecutor jobExecutor =3D startJobExecutor();
+ newWaitForJobs(timeout, jobExecutor.getThreads());
+ }
+ finally {
+ stopJobExecutor();
+ createJbpmContext();
+ }
+ }
+
protected void stopJobExecutor() {
if (jobExecutor !=3D null) {
try {
--===============8498185943495167797==--
From do-not-reply at jboss.org Thu May 19 11:52:12 2011
Content-Type: multipart/mixed; boundary="===============8570156839281883889=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: jbpm-commits at lists.jboss.org
Subject: [jbpm-commits] JBoss JBPM SVN: r6946 -
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db.
Date: Thu, 19 May 2011 11:52:12 -0400
Message-ID: <201105191552.p4JFqCbi028770@svn01.web.mwc.hst.phx2.redhat.com>
--===============8570156839281883889==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: marco.rietveld
Date: 2011-05-19 11:52:12 -0400 (Thu, 19 May 2011)
New Revision: 6946
Modified:
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db/AbstractDbTes=
tCase.java
Log:
Second attempt at experiment failed, reverting to 6859. =
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db/Abstra=
ctDbTestCase.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db/AbstractDbTe=
stCase.java 2011-05-19 15:46:55 UTC (rev 6945)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db/AbstractDbTe=
stCase.java 2011-05-19 15:52:12 UTC (rev 6946)
@@ -21,11 +21,7 @@
*/
package org.jbpm.db;
=
-import java.lang.management.ManagementFactory;
-import java.lang.management.ThreadMXBean;
import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -35,6 +31,7 @@
import org.hibernate.cfg.Environment;
import org.hibernate.criterion.Projections;
import org.hibernate.criterion.Restrictions;
+
import org.jbpm.AbstractJbpmTestCase;
import org.jbpm.JbpmConfiguration;
import org.jbpm.JbpmContext;
@@ -208,10 +205,9 @@
}
}
=
- protected JobExecutor startJobExecutor() {
+ protected void startJobExecutor() {
jobExecutor =3D getJbpmConfiguration().getJobExecutor();
jobExecutor.start();
- return jobExecutor;
}
=
/**
@@ -264,73 +260,6 @@
}
}
=
- private long getUserTimeInMilliseconds( HashSet threadIdSet ) {
- ThreadMXBean bean =3D ManagementFactory.getThreadMXBean( );
- if ( ! bean.isThreadCpuTimeSupported( ) ) {
- return 0L;
- } =
-
- long totalThreadTimeInNanoSeconds =3D 0;
- Object [] threadId =3D new Long[0];
- threadId =3D threadIdSet.toArray(threadId);
-
- for ( int i =3D 0; i < threadId.length; ++i ) {
- long threadTime =3D bean.getThreadUserTime( (Long) threadId[i] );
- if ( threadTime !=3D -1 ) {
- totalThreadTimeInNanoSeconds +=3D threadTime;
- }
- }
- =
- return totalThreadTimeInNanoSeconds/1000000;
- }
-
- protected void newWaitForJobs(final long timeout, Map threadMap) {
-
- // Gather thread Id's
- Iterator threadMapIter =3D threadMap.values().iterator();
- HashSet threadIdSet =3D new HashSet();
- while(threadMapIter.hasNext()) {
- Thread thisThread =3D (Thread) threadMapIter.next();
- threadIdSet.add(thisThread.getId());
- }
- =
- long waitPeriod =3D 500;
- for (int currentCount, previousCount =3D 0; (currentCount =3D getNbrOf=
JobsAvailable()) > 0;) {
-
- long elapsedTime =3D getUserTimeInMilliseconds(threadIdSet);
- =
- if (elapsedTime > timeout) {
- fail("test execution exceeded threshold of " + timeout + " ms");
- }
-
- if (currentCount < previousCount) {
- long elapsedTimePerJob =3D (elapsedTime) / (previousCount - curren=
tCount);
- waitPeriod =3D currentCount * elapsedTimePerJob;
- if (waitPeriod < 500) waitPeriod =3D 500;
- }
-
- if (waitPeriod > 5000) {
- waitPeriod =3D 5000;
- }
- else {
- long remainingTime =3D timeout - elapsedTime;
- waitPeriod =3D (waitPeriod > remainingTime) ? remainingTime : wait=
Period;
- }
- =
- if (log.isDebugEnabled()) {
- log.debug("waiting " + waitPeriod + " ms for " + currentCount + " =
jobs");
- }
- try {
- Thread.sleep(waitPeriod);
- }
- catch (InterruptedException e) {
- fail("wait for jobs got interrupted");
- }
-
- previousCount =3D currentCount;
- }
- }
- =
protected int getNbrOfJobsAvailable() {
if (session !=3D null) {
return getJobCount(session);
@@ -376,7 +305,7 @@
* time has elapsed. The current jBPM context is closed before waiting a=
nd a new one is opened
* after processing the jobs.
*/
- protected void oldProcessJobs(long timeout) {
+ protected void processJobs(long timeout) {
closeJbpmContext();
try {
startJobExecutor();
@@ -388,18 +317,6 @@
}
}
=
- protected void processJobs(long timeout) {
- closeJbpmContext();
- try {
- JobExecutor jobExecutor =3D startJobExecutor();
- newWaitForJobs(timeout, jobExecutor.getThreads());
- }
- finally {
- stopJobExecutor();
- createJbpmContext();
- }
- }
-
protected void stopJobExecutor() {
if (jobExecutor !=3D null) {
try {
--===============8570156839281883889==--
From do-not-reply at jboss.org Mon May 23 11:08:30 2011
Content-Type: multipart/mixed; boundary="===============4945456131344340244=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: jbpm-commits at lists.jboss.org
Subject: [jbpm-commits] JBoss JBPM SVN: r6949 -
jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm.
Date: Mon, 23 May 2011 11:08:29 -0400
Message-ID: <201105231508.p4NF8Tx6009609@svn01.web.mwc.hst.phx2.redhat.com>
--===============4945456131344340244==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: marco.rietveld
Date: 2011-05-23 11:08:29 -0400 (Mon, 23 May 2011)
New Revision: 6949
Modified:
jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/default.jbp=
m.cfg.xml
Log:
SOA-3076: changed jbpm.jobs.retries to 3.
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/defa=
ult.jbpm.cfg.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/default.jb=
pm.cfg.xml 2011-05-20 11:37:37 UTC (rev 6948)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/default.jb=
pm.cfg.xml 2011-05-23 15:08:29 UTC (rev 6949)
@@ -127,5 +127,5 @@
=
-
+
--===============4945456131344340244==--
From do-not-reply at jboss.org Mon May 23 11:29:27 2011
Content-Type: multipart/mixed; boundary="===============2819729348371481059=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: jbpm-commits at lists.jboss.org
Subject: [jbpm-commits] JBoss JBPM SVN: r6950 -
jbpm3/branches/jbpm-3.2-soa/userguide/src/main/docbook/en-US.
Date: Mon, 23 May 2011 11:29:26 -0400
Message-ID: <201105231529.p4NFTQWc011852@svn01.web.mwc.hst.phx2.redhat.com>
--===============2819729348371481059==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: marco.rietveld
Date: 2011-05-23 11:29:26 -0400 (Mon, 23 May 2011)
New Revision: 6950
Modified:
jbpm3/branches/jbpm-3.2-soa/userguide/src/main/docbook/en-US/async.xml
Log:
JBPM-3216: added doc that default number retries is 3. =
Modified: jbpm3/branches/jbpm-3.2-soa/userguide/src/main/docbook/en-US/asyn=
c.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/userguide/src/main/docbook/en-US/async.xml =
2011-05-23 15:08:29 UTC (rev 6949)
+++ jbpm3/branches/jbpm-3.2-soa/userguide/src/main/docbook/en-US/async.xml =
2011-05-23 15:29:26 UTC (rev 6950)
@@ -288,12 +288,13 @@
The interval that a job will wait between retries, if =
it
- fails during execution.
+ fails during execution. The default value for this =
+ is 3 times. =
The maximum number of retries is configured by
- jbpm.job.retries.
+ jbpm.job.retries. =
--===============2819729348371481059==--
From do-not-reply at jboss.org Mon May 30 07:45:00 2011
Content-Type: multipart/mixed; boundary="===============0624822596650649707=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: jbpm-commits at lists.jboss.org
Subject: [jbpm-commits] JBoss JBPM SVN: r6951 - in
jbpm3/branches/jbpm-3.2-soa/core/src: test/java/org/jbpm and 1 other
directories.
Date: Mon, 30 May 2011 07:44:59 -0400
Message-ID: <201105301144.p4UBixZb007650@svn01.web.mwc.hst.phx2.redhat.com>
--===============0624822596650649707==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: marco.rietveld
Date: 2011-05-30 07:44:59 -0400 (Mon, 30 May 2011)
New Revision: 6951
Added:
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm3218/
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm3218/JBPM321=
8Test.java
Modified:
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/command/ExecuteJ=
obsCommand.java
Log:
JBPM-3218: ExecuteJobsCommand uses a hardcoded number of retries (instead o=
f injected value/configuration value)
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/command/E=
xecuteJobsCommand.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/command/Execute=
JobsCommand.java 2011-05-23 15:29:26 UTC (rev 6950)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/command/Execute=
JobsCommand.java 2011-05-30 11:44:59 UTC (rev 6951)
@@ -78,11 +78,7 @@
job.setLockOwner(lockOwner);
job.setLockTime(lockTime);
// has job failed previously?
- if (job.getException() =3D=3D null) {
- // initialize retry count
- job.setRetries(3);
- }
- else {
+ if (job.getException() !=3D null) {
// decrease retry count
int retries =3D job.getRetries() - 1;
job.setRetries(retries);
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm3218/JBP=
M3218Test.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm3218/JBPM32=
18Test.java (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm3218/JBPM32=
18Test.java 2011-05-30 11:44:59 UTC (rev 6951)
@@ -0,0 +1,90 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.jbpm3218;
+
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+
+import org.jbpm.JbpmConfiguration.Configs;
+import org.jbpm.JbpmContext;
+import org.jbpm.command.CommandService;
+import org.jbpm.command.ExecuteJobsCommand;
+import org.jbpm.command.impl.CommandServiceImpl;
+import org.jbpm.db.AbstractDbTestCase;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.job.Timer;
+
+/**
+ * ExecuteJobsCommand uses a hardcoded number of retries (instead of injec=
ted jbpm.job.retries value) =
+ * =
+ * @see JBPM-3218=
+ */
+public class JBPM3218Test extends AbstractDbTestCase {
+
+ private SimpleDateFormat dateFormat =3D new SimpleDateFormat("dd-MM-yy_H=
H:mm:ss");
+ private CommandService commandService =3D new CommandServiceImpl(getJbpm=
Configuration());
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ =
+ ProcessDefinition processDefinition =3D new ProcessDefinition(getName(=
));
+ deployProcessDefinition(processDefinition);
+ }
+
+ public void testStartDate() {
+ ProcessInstance processInstance =3D jbpmContext.newProcessInstanceForU=
pdate(getName());
+
+ // Create and persist timer.. =
+ Timer timer =3D new Timer(processInstance.getRootToken());
+ timer.setName("jbpm3218test:" + dateFormat.format(new Date()));
+ timer.setDueDate(getOneHourAgo());
+ // Force retry handling
+ timer.setException("simulated Exception");
+ // Withouth repeat, the job is not available to retrieve after executi=
on
+ timer.setRepeat("1 week");
+ jbpmContext.getServices().getSchedulerService().createTimer(timer);
+ newTransaction(); =
+ =
+ ExecuteJobsCommand overdueJobsCommand =3D new ExecuteJobsCommand();
+ commandService.execute(overdueJobsCommand);
+ =
+ timer =3D jobSession.loadTimer(timer.getId());
+ int retries =3D timer.getRetries();
+ =
+ String retriesProperty =3D "jbpm.job.retries";
+ Integer configRetries =3D Configs.getInt(retriesProperty);
+ assertNotNull(retriesProperty + " could not be retrieved.", configRetr=
ies);
+ assertTrue("expected " + (configRetries-1) + " retries, not " + retrie=
s, retries =3D=3D (configRetries-1));
+ }
+
+ private Date getOneHourAgo() { =
+ Calendar calendar =3D Calendar.getInstance();
+ calendar.add(Calendar.HOUR, -1);
+ // databases such as mysql do not have millisecond precision
+ calendar.set(Calendar.MILLISECOND, 0);
+ Date oneHourAgo =3D calendar.getTime();
+ return oneHourAgo;
+ }
+
+}
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbp=
m/jbpm3218/JBPM3218Test.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ native
--===============0624822596650649707==--