JBoss JBPM SVN: r2122 - jbpm3/trunk/modules/enterprise.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-09-04 18:13:17 -0400 (Thu, 04 Sep 2008)
New Revision: 2122
Modified:
jbpm3/trunk/modules/enterprise/pom.xml
Log:
Enable JtaDbPersistenceTest
Modified: jbpm3/trunk/modules/enterprise/pom.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/pom.xml 2008-09-04 22:11:21 UTC (rev 2121)
+++ jbpm3/trunk/modules/enterprise/pom.xml 2008-09-04 22:13:17 UTC (rev 2122)
@@ -182,7 +182,6 @@
<!-- https://jira.jboss.org/jira/browse/JBPM-1708 -->
<exclude>org/jbpm/scheduler/ejbtimer/EjbSchedulerTest.java</exclude>
<!-- https://jira.jboss.org/jira/browse/JBPM-1709 -->
- <exclude>org/jbpm/persistence/jta/JtaDbPersistenceService.java</exclude>
<exclude>org/jbpm/msg/jms/AsyncProcessingTest.java</exclude>
</excludes>
</configuration>
17 years, 7 months
JBoss JBPM SVN: r2121 - jbpm3/trunk/modules/enterprise.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-09-04 18:11:21 -0400 (Thu, 04 Sep 2008)
New Revision: 2121
Modified:
jbpm3/trunk/modules/enterprise/pom.xml
Log:
[JBPM-1709] excluse test util it passes
Modified: jbpm3/trunk/modules/enterprise/pom.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/pom.xml 2008-09-04 21:46:21 UTC (rev 2120)
+++ jbpm3/trunk/modules/enterprise/pom.xml 2008-09-04 22:11:21 UTC (rev 2121)
@@ -180,7 +180,9 @@
<configuration>
<excludes>
<!-- https://jira.jboss.org/jira/browse/JBPM-1708 -->
- <!--exclude>org/jbpm/scheduler/ejbtimer/EjbSchedulerTest.java</exclude-->
+ <exclude>org/jbpm/scheduler/ejbtimer/EjbSchedulerTest.java</exclude>
+ <!-- https://jira.jboss.org/jira/browse/JBPM-1709 -->
+ <exclude>org/jbpm/persistence/jta/JtaDbPersistenceService.java</exclude>
<exclude>org/jbpm/msg/jms/AsyncProcessingTest.java</exclude>
</excludes>
</configuration>
17 years, 7 months
JBoss JBPM SVN: r2120 - in jbpm3/trunk/modules/jpdl/core/src/test: resources/org/jbpm/job/executor and 1 other directory.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2008-09-04 17:46:21 -0400 (Thu, 04 Sep 2008)
New Revision: 2120
Added:
jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/EventCallback.java
Removed:
jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/TestCallback.java
Modified:
jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/MultiJobExecutorDbTest.java
jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/TimerOnTimerDbTest.java
jbpm3/trunk/modules/jpdl/core/src/test/resources/org/jbpm/job/executor/timerprocess.xml
Log:
renamed TestCallback because surefire mistook it for a TestCase
Copied: jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/EventCallback.java (from rev 2119, jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/TestCallback.java)
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/EventCallback.java (rev 0)
+++ jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/EventCallback.java 2008-09-04 21:46:21 UTC (rev 2120)
@@ -0,0 +1,105 @@
+/*
+ * 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.job.executor;
+
+import java.io.Serializable;
+
+import javax.transaction.Status;
+import javax.transaction.Synchronization;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jbpm.JbpmContext;
+import org.jbpm.graph.def.Event;
+
+public class EventCallback implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+ private static final Log log = LogFactory.getLog(EventCallback.class);
+
+ public void processStart() {
+ registerNotification(Event.EVENTTYPE_PROCESS_START);
+ }
+
+ public void processEnd() {
+ registerNotification(Event.EVENTTYPE_PROCESS_END);
+ }
+
+ public void nodeEnter() {
+ registerNotification(Event.EVENTTYPE_NODE_ENTER);
+ }
+
+ public void nodeLeave() {
+ registerNotification(Event.EVENTTYPE_NODE_LEAVE);
+ }
+
+ public void taskCreate() {
+ registerNotification(Event.EVENTTYPE_TASK_CREATE);
+ }
+
+ public void taskEnd() {
+ registerNotification(Event.EVENTTYPE_TASK_END);
+ }
+
+ public void timerCreate() {
+ registerNotification(Event.EVENTTYPE_TIMER_CREATE);
+ }
+
+ public void timer() {
+ registerNotification(Event.EVENTTYPE_TIMER);
+ }
+
+ private static void registerNotification(final String event) {
+ Synchronization notification = new Synchronization() {
+
+ public void beforeCompletion() {
+ // nothing to do here
+ }
+
+ public void afterCompletion(int status) {
+ if (status == Status.STATUS_COMMITTED) {
+ log.info("delivering " + event + " notification");
+ synchronized (event) {
+ event.notify();
+ }
+ }
+ }
+
+ };
+ JbpmContext.getCurrentJbpmContext()
+ .getSession()
+ .getTransaction()
+ .registerSynchronization(notification);
+ }
+
+ public static void waitForEvent(String event) {
+ synchronized (event) {
+ try {
+ event.wait(30000);
+ }
+ catch (InterruptedException e) {
+ // reassert interruption
+ Thread.currentThread().interrupt();
+ }
+ }
+ }
+}
\ No newline at end of file
Property changes on: jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/EventCallback.java
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/MultiJobExecutorDbTest.java
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/MultiJobExecutorDbTest.java 2008-09-04 21:15:04 UTC (rev 2119)
+++ jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/MultiJobExecutorDbTest.java 2008-09-04 21:46:21 UTC (rev 2120)
@@ -29,7 +29,7 @@
public static final String PROCESS_DEFINITION = "<?xml version='1.0' encoding='UTF-8'?>"
+ "<process-definition name='" + PROCESS_NAME + "'>"
+ "<event type='process-end'>"
- + "<action expression='#{testCallback.processEnd}' />"
+ + "<action expression='#{eventCallback.processEnd}' />"
+ "</event>"
+ "<start-state name='start-state1'>"
+ "<transition to='Service 1'></transition>"
@@ -75,7 +75,7 @@
JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
try {
ProcessInstance processInstance = jbpmContext.newProcessInstanceForUpdate(PROCESS_NAME);
- processInstance.getContextInstance().setVariable("testCallback", new TestCallback());
+ processInstance.getContextInstance().setVariable("eventCallback", new EventCallback());
processInstance.signal();
}
finally {
@@ -83,7 +83,7 @@
}
// wait for process end
- TestCallback.waitForEvent(Event.EVENTTYPE_PROCESS_END);
+ EventCallback.waitForEvent(Event.EVENTTYPE_PROCESS_END);
// stop job executors
for (int i = executors.length - 1; i >= 0; i--) {
Deleted: jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/TestCallback.java
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/TestCallback.java 2008-09-04 21:15:04 UTC (rev 2119)
+++ jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/TestCallback.java 2008-09-04 21:46:21 UTC (rev 2120)
@@ -1,105 +0,0 @@
-/*
- * 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.job.executor;
-
-import java.io.Serializable;
-
-import javax.transaction.Status;
-import javax.transaction.Synchronization;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jbpm.JbpmContext;
-import org.jbpm.graph.def.Event;
-
-public class TestCallback implements Serializable {
-
- private static final long serialVersionUID = 1L;
- private static final Log log = LogFactory.getLog(TestCallback.class);
-
- public void processStart() {
- registerNotification(Event.EVENTTYPE_PROCESS_START);
- }
-
- public void processEnd() {
- registerNotification(Event.EVENTTYPE_PROCESS_END);
- }
-
- public void nodeEnter() {
- registerNotification(Event.EVENTTYPE_NODE_ENTER);
- }
-
- public void nodeLeave() {
- registerNotification(Event.EVENTTYPE_NODE_LEAVE);
- }
-
- public void taskCreate() {
- registerNotification(Event.EVENTTYPE_TASK_CREATE);
- }
-
- public void taskEnd() {
- registerNotification(Event.EVENTTYPE_TASK_END);
- }
-
- public void timerCreate() {
- registerNotification(Event.EVENTTYPE_TIMER_CREATE);
- }
-
- public void timer() {
- registerNotification(Event.EVENTTYPE_TIMER);
- }
-
- private static void registerNotification(final String event) {
- Synchronization notification = new Synchronization() {
-
- public void beforeCompletion() {
- // nothing to do here
- }
-
- public void afterCompletion(int status) {
- if (status == Status.STATUS_COMMITTED) {
- log.info("delivering " + event + " notification");
- synchronized (event) {
- event.notify();
- }
- }
- }
-
- };
- JbpmContext.getCurrentJbpmContext()
- .getSession()
- .getTransaction()
- .registerSynchronization(notification);
- }
-
- public static void waitForEvent(String event) {
- synchronized (event) {
- try {
- event.wait(30000);
- }
- catch (InterruptedException e) {
- // reassert interruption
- Thread.currentThread().interrupt();
- }
- }
- }
-}
\ No newline at end of file
Modified: jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/TimerOnTimerDbTest.java
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/TimerOnTimerDbTest.java 2008-09-04 21:15:04 UTC (rev 2119)
+++ jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/TimerOnTimerDbTest.java 2008-09-04 21:46:21 UTC (rev 2120)
@@ -37,14 +37,14 @@
jbpmContext.deployProcessDefinition(processDefinition);
ProcessInstance processInstance = jbpmContext.newProcessInstanceForUpdate("timerProcess");
- processInstance.getContextInstance().setVariable("testCallback", new TestCallback());
+ processInstance.getContextInstance().setVariable("eventCallback", new EventCallback());
processInstance.signal();
assertEquals("firstNode", processInstance.getRootToken().getNode().getName());
commitAndCloseSession();
startJobExecutor();
try {
- TestCallback.waitForEvent(Event.EVENTTYPE_NODE_ENTER);
+ EventCallback.waitForEvent(Event.EVENTTYPE_NODE_ENTER);
beginSessionTransaction();
long processInstanceId = processInstance.getId();
assertEquals("secondNode", jbpmContext.loadProcessInstance(processInstanceId)
@@ -53,7 +53,7 @@
.getName());
commitAndCloseSession();
- TestCallback.waitForEvent(Event.EVENTTYPE_PROCESS_END);
+ EventCallback.waitForEvent(Event.EVENTTYPE_PROCESS_END);
beginSessionTransaction();
assertTrue(jbpmContext.loadProcessInstance(processInstanceId).hasEnded());
}
Modified: jbpm3/trunk/modules/jpdl/core/src/test/resources/org/jbpm/job/executor/timerprocess.xml
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/test/resources/org/jbpm/job/executor/timerprocess.xml 2008-09-04 21:15:04 UTC (rev 2119)
+++ jbpm3/trunk/modules/jpdl/core/src/test/resources/org/jbpm/job/executor/timerprocess.xml 2008-09-04 21:46:21 UTC (rev 2120)
@@ -4,16 +4,16 @@
xsi:schemaLocation="urn:jbpm.org:jpdl-3.2 http://jbpm.org/xsd/jpdl-3.2.xsd">
<event type="process-start">
- <action expression="#{testCallback.processStart}"/>
+ <action expression="#{eventCallback.processStart}"/>
</event>
<event type="process-end">
- <action expression="#{testCallback.processEnd}"/>
+ <action expression="#{eventCallback.processEnd}"/>
</event>
<event type="node-enter">
- <action expression="#{testCallback.nodeEnter}" />
+ <action expression="#{eventCallback.nodeEnter}" />
</event>
<event type="node-leave">
- <action expression="#{testCallback.nodeLeave}" />
+ <action expression="#{eventCallback.nodeLeave}" />
</event>
<start-state name="start">
17 years, 7 months
JBoss JBPM SVN: r2119 - in jbpm3/trunk/modules/jpdl/core: src/test/java/org/jbpm/job/executor and 1 other directory.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2008-09-04 17:15:04 -0400 (Thu, 04 Sep 2008)
New Revision: 2119
Added:
jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/JobConcurrencyDbTest.java
jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/MultiJobExecutorDbTest.java
jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/TestCallback.java
Removed:
jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/ConcurrencyTest.java
jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/MultiJobExecutorTest.java
Modified:
jbpm3/trunk/modules/jpdl/core/pom.xml
jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/JobExecutorDbTest.java
jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/JobLoadJoinTest.java
jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/JobLoadSubProcessTest.java
jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/NoJobExecutorDbTest.java
jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/TimerOnTimerDbTest.java
Log:
JBPM-1704: merged revision 2004 and 2005 - brought back job executor tests
Modified: jbpm3/trunk/modules/jpdl/core/pom.xml
===================================================================
--- jbpm3/trunk/modules/jpdl/core/pom.xml 2008-09-04 20:04:22 UTC (rev 2118)
+++ jbpm3/trunk/modules/jpdl/core/pom.xml 2008-09-04 21:15:04 UTC (rev 2119)
@@ -190,8 +190,6 @@
<exclude>org/jbpm/instantiation/UserCodeInterceptorTest.java</exclude>
<exclude>org/jbpm/JbpmDefaultConfigTest.java</exclude>
<exclude>org/jbpm/jcr/JcrDbTest.java</exclude>
- <exclude>org/jbpm/job/executor/ConcurrencyTest.java</exclude>
- <exclude>org/jbpm/job/executor/JobExecutorDbTest.java</exclude>
<exclude>org/jbpm/job/executor/JobLoadJoinTest.java</exclude>
<exclude>org/jbpm/job/executor/JobLoadSubProcessTest.java</exclude>
<exclude>org/jbpm/jpdl/convert/ConversionTestCase.java</exclude>
@@ -250,8 +248,6 @@
<exclude>org/jbpm/instantiation/UserCodeInterceptorTest.java</exclude>
<exclude>org/jbpm/JbpmDefaultConfigTest.java</exclude>
<exclude>org/jbpm/jcr/JcrDbTest.java</exclude>
- <exclude>org/jbpm/job/executor/ConcurrencyTest.java</exclude>
- <exclude>org/jbpm/job/executor/JobExecutorDbTest.java</exclude>
<exclude>org/jbpm/job/executor/JobLoadJoinTest.java</exclude>
<exclude>org/jbpm/job/executor/JobLoadSubProcessTest.java</exclude>
<exclude>org/jbpm/jpdl/convert/ConversionTestCase.java</exclude>
@@ -310,8 +306,6 @@
<exclude>org/jbpm/instantiation/UserCodeInterceptorTest.java</exclude>
<exclude>org/jbpm/JbpmDefaultConfigTest.java</exclude>
<exclude>org/jbpm/jcr/JcrDbTest.java</exclude>
- <exclude>org/jbpm/job/executor/ConcurrencyTest.java</exclude>
- <exclude>org/jbpm/job/executor/JobExecutorDbTest.java</exclude>
<exclude>org/jbpm/job/executor/JobLoadJoinTest.java</exclude>
<exclude>org/jbpm/job/executor/JobLoadSubProcessTest.java</exclude>
<exclude>org/jbpm/jpdl/convert/ConversionTestCase.java</exclude>
@@ -376,8 +370,6 @@
<exclude>org/jbpm/instantiation/UserCodeInterceptorTest.java</exclude>
<exclude>org/jbpm/JbpmDefaultConfigTest.java</exclude>
<exclude>org/jbpm/jcr/JcrDbTest.java</exclude>
- <exclude>org/jbpm/job/executor/ConcurrencyTest.java</exclude>
- <exclude>org/jbpm/job/executor/JobExecutorDbTest.java</exclude>
<exclude>org/jbpm/job/executor/JobLoadJoinTest.java</exclude>
<exclude>org/jbpm/job/executor/JobLoadSubProcessTest.java</exclude>
<exclude>org/jbpm/jpdl/convert/ConversionTestCase.java</exclude>
@@ -436,8 +428,6 @@
<exclude>org/jbpm/instantiation/UserCodeInterceptorTest.java</exclude>
<exclude>org/jbpm/JbpmDefaultConfigTest.java</exclude>
<exclude>org/jbpm/jcr/JcrDbTest.java</exclude>
- <exclude>org/jbpm/job/executor/ConcurrencyTest.java</exclude>
- <exclude>org/jbpm/job/executor/JobExecutorDbTest.java</exclude>
<exclude>org/jbpm/job/executor/JobLoadJoinTest.java</exclude>
<exclude>org/jbpm/job/executor/JobLoadSubProcessTest.java</exclude>
<exclude>org/jbpm/jpdl/convert/ConversionTestCase.java</exclude>
Deleted: jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/ConcurrencyTest.java
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/ConcurrencyTest.java 2008-09-04 20:04:22 UTC (rev 2118)
+++ jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/ConcurrencyTest.java 2008-09-04 21:15:04 UTC (rev 2119)
@@ -1,238 +0,0 @@
-package org.jbpm.job.executor;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import junit.framework.TestCase;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jbpm.JbpmConfiguration;
-import org.jbpm.JbpmContext;
-import org.jbpm.graph.def.ActionHandler;
-import org.jbpm.graph.def.ProcessDefinition;
-import org.jbpm.graph.exe.ExecutionContext;
-import org.jbpm.graph.exe.ProcessInstance;
-
-/**
- * test case for http://jira.jboss.com/jira/browse/JBPM-983
- */
-public class ConcurrencyTest extends TestCase {
-
- private static Log log = LogFactory.getLog(ConcurrencyTest.class);
-
- protected static JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance("org/jbpm/jbpm.test.cfg.xml");
-
- protected void setUp() throws Exception {
- jbpmConfiguration.createSchema();
-
- JobExecutor jobExecutor = jbpmConfiguration.getJobExecutor();
- jobExecutor.setNbrOfThreads(5);
- jobExecutor.start();
-
- log.debug("");
- log.debug("### starting " + getName() + " ####################################################");
- }
-
- protected void tearDown() throws Exception {
- log.debug("### " + getName() + " done ####################################################");
- log.debug("");
-
- jbpmConfiguration.getJobExecutor().stop();
-
- jbpmConfiguration.dropSchema();
- }
-
- static String SUBPROCESS_XML = "<?xml version='1.0' encoding='UTF-8'?>"
- + "<process-definition xmlns='urn:jbpm.org:jpdl-3.2' name='simplesubtest'>"
- + "<start-state name='start-state1'>"
- + " <description>start of the process</description>"
- + " <transition name='start-to-check' to='fileCheck' />"
- + "</start-state>"
- + ""
- + "<node name='fileCheck' async='exclusive'>"
- + " <action name='action_filecheck' class='"
- + TestAction.class.getName()
- + "'>"
- + " </action>"
- + " <transition name='check-to-do' to='doWhatever'></transition>"
- + "</node>"
- + ""
- + "<node name='doWhatever' async='exclusive'>"
- + " <action name='action_do' class='"
- + TestAction.class.getName()
- + "'>"
- + " </action>"
- + " <transition name='check-to-end' to='end-state-success'></transition>"
- + "</node>"
- + ""
- + "<end-state name='end-state-success'>"
- + " <description>process finished normally</description>"
- + "</end-state>"
- + "</process-definition>";
-
- static String PROCESS_XML = "<?xml version='1.0' encoding='UTF-8'?>"
- + "<process-definition xmlns='urn:jbpm.org:jpdl-3.2' name='simpletest'>"
- + "<start-state name='start-state1'>"
- + " <description>start of the process</description>"
- + " <transition name='start-to-check' to='fileCheck' />"
- + "</start-state>"
- + ""
- + "<node name='fileCheck' async='true'>"
- + " <action name='action_check' class='"
- + TestAction.class.getName()
- + "'>"
- + " </action>"
- + " <transition name='check-to-fork' to='fork1'></transition>"
- + "</node>"
- + ""
- + "<fork name='fork1'>"
- + " <transition name='toNode1' to='node1'></transition>"
- + " <transition name='toNode2' to='node2'></transition>"
- + "</fork>"
- + ""
- + "<process-state name='node1' async='exclusive'>"
- + " <sub-process name='simplesubtest' />"
- + " <transition name='node1toJoin1' to='join1'></transition>"
- + "</process-state>"
- + ""
- + "<process-state name='node2' async='exclusive'>"
- + " <sub-process name='simplesubtest' />"
- + " <transition name='node2toJoin1' to='join1'></transition>"
- + "</process-state>"
- + ""
- + "<join name='join1'>"
- + " <transition name='joinToEnd' to='end-state-success'></transition>"
- + "</join>"
- + ""
- + "<end-state name='end-state-success'>"
- + " <description>process finished normally</description>"
- + "</end-state>"
- + "</process-definition>";
-
- public void testSimple() throws Exception {
- assertTrue(jbpmConfiguration.getJobExecutor().getNbrOfThreads() > 1);
-
- log.info("### TEST: deploy + start processes ###");
-
- JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
- try {
- jbpmContext.deployProcessDefinition(ProcessDefinition.parseXmlString(SUBPROCESS_XML));
- jbpmContext.deployProcessDefinition(ProcessDefinition.parseXmlString(PROCESS_XML));
-
- }
- finally {
- jbpmContext.close();
- }
-
- // create test properties
- Map testVariables = new HashMap();
- testVariables.put("test", "true");
-
- for (int i = 0; i < 10; i++) {
- log.info("#################### TEST: starting process " + i + " ####################");
-
- ProcessInstance pi = null;
-
- jbpmContext = jbpmConfiguration.createJbpmContext();
- try {
- pi = jbpmContext.newProcessInstance("simpletest");
- pi.getContextInstance().addVariables(testVariables);
- jbpmContext.save(pi);
- pi.signal();
-
- }
- finally {
- jbpmContext.close();
- }
- log.info("### TEST: wait for process completion ###");
-
- waitFor(pi.getId());
-
- jbpmContext = jbpmConfiguration.createJbpmContext();
- try {
- ProcessInstance pi2 = jbpmContext.getProcessInstance(pi.getId());
- assertEquals("end-state-success", pi2.getRootToken().getNode().getName());
- }
- finally {
- jbpmContext.close();
- }
-
- log.info("#################### TEST: finished ####################");
- }
- }
-
- protected void waitFor(final long piId) throws Exception {
- long startTime = System.currentTimeMillis();
- int SECONDS = 30;
-
- while (true) {
- if (System.currentTimeMillis() - startTime > SECONDS * 1000) {
- fail("Aborting after " + SECONDS + " seconds.");
- return;
- }
-
- log.info("waiting for workflow completion...."); // + pi.getRootToken().getNode().getName()
- // );
- try {
- Thread.sleep(5000);
- }
- catch (InterruptedException e) {
- log.error("wait for workflow was interruputed", e);
- fail();
- }
-
- JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
- try {
- if (jbpmContext.getProcessInstance(piId).hasEnded())
- break;
- }
- finally {
- jbpmContext.close();
- }
- }
- }
-
- public static class TestAction implements ActionHandler {
-
- private static final long serialVersionUID = 1L;
-
- public void execute(ExecutionContext executionContext) throws Exception {
- String processName = executionContext.getProcessDefinition().getName()
- + ":"
- + executionContext.getProcessInstance().getId();
- String nodeName = executionContext.getToken().getNode().getName();
- String tokenName = executionContext.getToken().toString();
-
- log.info("ACTION (process="
- + processName
- + ",node="
- + nodeName
- + ",token="
- + tokenName
- + "): begin");
-
- for (int i = 0; i < 5; i++) {
- Thread.sleep(500);
- log.info("ACTION (process="
- + processName
- + ",node="
- + nodeName
- + ",token="
- + tokenName
- + "): working...");
- Thread.sleep(500);
- }
-
- log.info("ACTION (process="
- + processName
- + ",node="
- + nodeName
- + ",token="
- + tokenName
- + "): end");
-
- executionContext.leaveNode();
- }
- }
-}
Added: jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/JobConcurrencyDbTest.java
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/JobConcurrencyDbTest.java (rev 0)
+++ jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/JobConcurrencyDbTest.java 2008-09-04 21:15:04 UTC (rev 2119)
@@ -0,0 +1,238 @@
+package org.jbpm.job.executor;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import junit.framework.TestCase;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmContext;
+import org.jbpm.graph.def.ActionHandler;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.graph.exe.ExecutionContext;
+import org.jbpm.graph.exe.ProcessInstance;
+
+/**
+ * test case for http://jira.jboss.com/jira/browse/JBPM-983
+ */
+public class JobConcurrencyDbTest extends TestCase {
+
+ private static Log log = LogFactory.getLog(JobConcurrencyDbTest.class);
+
+ protected static JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance("org/jbpm/jbpm.test.cfg.xml");
+
+ protected void setUp() throws Exception {
+ jbpmConfiguration.createSchema();
+
+ JobExecutor jobExecutor = jbpmConfiguration.getJobExecutor();
+ jobExecutor.setNbrOfThreads(5);
+ jobExecutor.start();
+
+ log.debug("");
+ log.debug("### starting " + getName() + " ####################################################");
+ }
+
+ protected void tearDown() throws Exception {
+ log.debug("### " + getName() + " done ####################################################");
+ log.debug("");
+
+ jbpmConfiguration.getJobExecutor().stop();
+
+ jbpmConfiguration.dropSchema();
+ }
+
+ static String SUBPROCESS_XML = "<?xml version='1.0' encoding='UTF-8'?>"
+ + "<process-definition xmlns='urn:jbpm.org:jpdl-3.2' name='subprocess'>"
+ + "<start-state name='start-state1'>"
+ + " <description>start of the process</description>"
+ + " <transition name='start-to-check' to='fileCheck' />"
+ + "</start-state>"
+ + ""
+ + "<node name='fileCheck' async='exclusive'>"
+ + " <action name='action_filecheck' class='"
+ + TestAction.class.getName()
+ + "'>"
+ + " </action>"
+ + " <transition name='check-to-do' to='doWhatever'></transition>"
+ + "</node>"
+ + ""
+ + "<node name='doWhatever' async='exclusive'>"
+ + " <action name='action_do' class='"
+ + TestAction.class.getName()
+ + "'>"
+ + " </action>"
+ + " <transition name='check-to-end' to='end-state-success'></transition>"
+ + "</node>"
+ + ""
+ + "<end-state name='end-state-success'>"
+ + " <description>process finished normally</description>"
+ + "</end-state>"
+ + "</process-definition>";
+
+ static String PROCESS_XML = "<?xml version='1.0' encoding='UTF-8'?>"
+ + "<process-definition xmlns='urn:jbpm.org:jpdl-3.2' name='superprocess'>"
+ + "<start-state name='start-state1'>"
+ + " <description>start of the process</description>"
+ + " <transition name='start-to-check' to='fileCheck' />"
+ + "</start-state>"
+ + ""
+ + "<node name='fileCheck' async='true'>"
+ + " <action name='action_check' class='"
+ + TestAction.class.getName()
+ + "'>"
+ + " </action>"
+ + " <transition name='check-to-fork' to='fork1'></transition>"
+ + "</node>"
+ + ""
+ + "<fork name='fork1'>"
+ + " <transition name='toNode1' to='node1'></transition>"
+ + " <transition name='toNode2' to='node2'></transition>"
+ + "</fork>"
+ + ""
+ + "<process-state name='node1' async='exclusive'>"
+ + " <sub-process name='subprocess' />"
+ + " <transition name='node1toJoin1' to='join1'></transition>"
+ + "</process-state>"
+ + ""
+ + "<process-state name='node2' async='exclusive'>"
+ + " <sub-process name='subprocess' />"
+ + " <transition name='node2toJoin1' to='join1'></transition>"
+ + "</process-state>"
+ + ""
+ + "<join name='join1'>"
+ + " <transition name='joinToEnd' to='end-state-success'></transition>"
+ + "</join>"
+ + ""
+ + "<end-state name='end-state-success'>"
+ + " <description>process finished normally</description>"
+ + "</end-state>"
+ + "</process-definition>";
+
+ public void testConcurrentJobs() throws Exception {
+ assertTrue(jbpmConfiguration.getJobExecutor().getNbrOfThreads() > 1);
+
+ log.info("### TEST: deploy + start processes ###");
+
+ JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
+ try {
+ jbpmContext.deployProcessDefinition(ProcessDefinition.parseXmlString(SUBPROCESS_XML));
+ jbpmContext.deployProcessDefinition(ProcessDefinition.parseXmlString(PROCESS_XML));
+ }
+ finally {
+ jbpmContext.close();
+ }
+
+ // create test properties
+ Map testVariables = new HashMap();
+ testVariables.put("test", "true");
+
+ final int processCount = 10;
+ long[] piIds = new long[processCount];
+ for (int i = 0; i < processCount; i++) {
+ log.info("#################### TEST: starting process " + i + " ####################");
+
+ jbpmContext = jbpmConfiguration.createJbpmContext();
+ try {
+ ProcessInstance pi = jbpmContext.newProcessInstanceForUpdate("superprocess");
+ pi.getContextInstance().addVariables(testVariables);
+ pi.signal();
+ piIds[i] = pi.getId();
+ }
+ finally {
+ jbpmContext.close();
+ }
+ }
+
+ for (int i = 0; i < processCount; i++) {
+ log.info("### TEST: wait for process completion ###");
+
+ long piId = piIds[i];
+ waitFor(piId);
+
+ jbpmContext = jbpmConfiguration.createJbpmContext();
+ try {
+ ProcessInstance pi = jbpmContext.loadProcessInstance(piId);
+ assertEquals("end-state-success", pi.getRootToken().getNode().getName());
+ }
+ finally {
+ jbpmContext.close();
+ }
+
+ log.info("#################### TEST: finished ####################");
+ }
+ }
+
+ protected void waitFor(long piId) throws Exception {
+ final int endTimeout = 30;
+ long startTime = System.currentTimeMillis();
+
+ while (true) {
+ if (System.currentTimeMillis() - startTime > endTimeout * 1000) {
+ fail("Aborting after " + endTimeout + " seconds.");
+ return;
+ }
+
+ log.info("waiting for workflow completion....");
+ try {
+ Thread.sleep(1000);
+ }
+ catch (InterruptedException e) {
+ log.error("wait for workflow was interruputed", e);
+ fail();
+ }
+
+ JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
+ try {
+ if (jbpmContext.loadProcessInstance(piId).hasEnded())
+ break;
+ }
+ finally {
+ jbpmContext.close();
+ }
+ }
+ }
+
+ public static class TestAction implements ActionHandler {
+
+ private static final long serialVersionUID = 1L;
+
+ public void execute(ExecutionContext executionContext) throws Exception {
+ String processName = executionContext.getProcessDefinition().getName()
+ + ":"
+ + executionContext.getProcessInstance().getId();
+ String nodeName = executionContext.getToken().getNode().getName();
+ String tokenName = executionContext.getToken().toString();
+
+ log.info("ACTION (process="
+ + processName
+ + ",node="
+ + nodeName
+ + ",token="
+ + tokenName
+ + "): begin");
+
+ for (int i = 0; i < 5; i++) {
+ log.info("ACTION (process="
+ + processName
+ + ",node="
+ + nodeName
+ + ",token="
+ + tokenName
+ + "): working...");
+ Thread.sleep(100);
+ }
+
+ log.info("ACTION (process="
+ + processName
+ + ",node="
+ + nodeName
+ + ",token="
+ + tokenName
+ + "): end");
+
+ executionContext.leaveNode();
+ }
+ }
+}
Modified: jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/JobExecutorDbTest.java
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/JobExecutorDbTest.java 2008-09-04 20:04:22 UTC (rev 2118)
+++ jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/JobExecutorDbTest.java 2008-09-04 21:15:04 UTC (rev 2119)
@@ -22,7 +22,7 @@
public class JobExecutorDbTest extends TestCase {
static int nbrOfConcurrentProcessExecutions = 20;
- static int maxWaitTime = 20000;
+ static int maxWaitTime = 60000;
static Set collectedResults = Collections.synchronizedSet(new TreeSet());
protected static JbpmConfiguration jbpmConfiguration =
@@ -37,7 +37,7 @@
public static class AutomaticActivity implements ActionHandler {
private static final long serialVersionUID = 1L;
public void execute(ExecutionContext executionContext) throws Exception {
- String id = (String) Long.toString(executionContext.getProcessInstance().getId());
+ long id = executionContext.getProcessInstance().getId();
String nodeName = executionContext.getNode().getName();
collectedResults.add(id+nodeName);
executionContext.leaveNode();
@@ -47,14 +47,14 @@
public static class AsyncAction implements ActionHandler {
private static final long serialVersionUID = 1L;
public void execute(ExecutionContext executionContext) throws Exception {
- String id = (String) Long.toString(executionContext.getProcessInstance().getId());
+ long id = executionContext.getProcessInstance().getId();
Action action = executionContext.getAction();
String actionName = action.getName();
collectedResults.add(id+actionName);
}
}
- public void testBulkJobs() {
+ public void testJobExecutor() {
jbpmConfiguration.createSchema();
deployProcess();
launchProcesses();
Modified: jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/JobLoadJoinTest.java
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/JobLoadJoinTest.java 2008-09-04 20:04:22 UTC (rev 2118)
+++ jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/JobLoadJoinTest.java 2008-09-04 21:15:04 UTC (rev 2119)
@@ -24,16 +24,16 @@
static Set finishedProcesses = Collections.synchronizedSet(new HashSet());
long start;
-
- static {
- jbpmConfiguration.createSchema();
- }
protected void setUp() throws Exception {
- super.setUp();
+ jbpmConfiguration.createSchema();
start = System.currentTimeMillis();
}
-
+
+ protected void tearDown() throws Exception {
+ jbpmConfiguration.dropSchema();
+ }
+
private boolean timeIsUp(int maxWait) {
return System.currentTimeMillis() - start > maxWait;
}
Modified: jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/JobLoadSubProcessTest.java
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/JobLoadSubProcessTest.java 2008-09-04 20:04:22 UTC (rev 2118)
+++ jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/JobLoadSubProcessTest.java 2008-09-04 21:15:04 UTC (rev 2119)
@@ -18,7 +18,7 @@
public class JobLoadSubProcessTest extends TestCase {
// TODO see JobLoadJoinTest, but instead of the joins, use a process with a sub process
- private static Log log = LogFactory.getLog(JobLoadJoinTest.class);
+ private static Log log = LogFactory.getLog(JobLoadSubProcessTest.class);
static Set finishedProcesses = Collections.synchronizedSet(new HashSet());
long start;
@@ -26,15 +26,15 @@
private static JbpmConfiguration jbpmConfiguration =
JbpmConfiguration.getInstance("org/jbpm/job/executor/loadtests.jbpm.cfg.xml");
- static {
- jbpmConfiguration.createSchema();
- }
-
protected void setUp() throws Exception {
- super.setUp();
+ jbpmConfiguration.createSchema();
start = System.currentTimeMillis();
}
-
+
+ protected void tearDown() throws Exception {
+ jbpmConfiguration.dropSchema();
+ }
+
private boolean timeIsUp(int maxWait) {
return System.currentTimeMillis() - start > maxWait;
}
Added: jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/MultiJobExecutorDbTest.java
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/MultiJobExecutorDbTest.java (rev 0)
+++ jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/MultiJobExecutorDbTest.java 2008-09-04 21:15:04 UTC (rev 2119)
@@ -0,0 +1,135 @@
+package org.jbpm.job.executor;
+
+import java.sql.SQLException;
+
+import junit.framework.TestCase;
+
+import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmContext;
+import org.jbpm.graph.def.ActionHandler;
+import org.jbpm.graph.def.Event;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.graph.exe.ExecutionContext;
+import org.jbpm.graph.exe.ProcessInstance;
+
+/**
+ * Test case for JBPM-1072.
+ * @author Jiri Pechanec
+ * @author Alejandro Guizar
+ */
+public class MultiJobExecutorDbTest extends TestCase {
+
+ private static final int EXECUTOR_COUNT = 20;
+ public static final String PROCESS_NAME = "TestProcess";
+
+ private JobExecutor[] executors = new JobExecutor[EXECUTOR_COUNT];
+
+ private static JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
+
+ public static final String PROCESS_DEFINITION = "<?xml version='1.0' encoding='UTF-8'?>"
+ + "<process-definition name='" + PROCESS_NAME + "'>"
+ + "<event type='process-end'>"
+ + "<action expression='#{testCallback.processEnd}' />"
+ + "</event>"
+ + "<start-state name='start-state1'>"
+ + "<transition to='Service 1'></transition>"
+ + "</start-state>"
+ + "<node name='Service 1'>"
+ + "<action class='"
+ + SimpleAction.class.getName()
+ + "' />"
+ + "<transition to='Service 2' />"
+ + "</node>"
+ + "<node name='Service 2' async='true'>"
+ + "<action class='"
+ + SimpleAction2.class.getName()
+ + "' />"
+ + "<transition to='end-state1' />"
+ + "</node>"
+ + "<end-state name='end-state1' />"
+ + "</process-definition>";
+
+ protected void setUp() throws SQLException {
+ jbpmConfiguration.createSchema();
+
+ // deploy process definition
+ JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
+ try {
+ jbpmContext.deployProcessDefinition(ProcessDefinition.parseXmlString(PROCESS_DEFINITION));
+ }
+ finally {
+ jbpmContext.close();
+ }
+ }
+
+ public void testMultipleJobExecutors() {
+ // start job executors
+ for (int i = 0; i < executors.length; i++) {
+ executors[i] = (JobExecutor) JbpmConfiguration.Configs.getObjectFactory().createObject(
+ "jbpm.job.executor");
+ executors[i].setName("JbpmJobExecutor/" + (i + 1));
+ executors[i].start();
+ }
+
+ // kick off process instance
+ JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
+ try {
+ ProcessInstance processInstance = jbpmContext.newProcessInstanceForUpdate(PROCESS_NAME);
+ processInstance.getContextInstance().setVariable("testCallback", new TestCallback());
+ processInstance.signal();
+ }
+ finally {
+ jbpmContext.close();
+ }
+
+ // wait for process end
+ TestCallback.waitForEvent(Event.EVENTTYPE_PROCESS_END);
+
+ // stop job executors
+ for (int i = executors.length - 1; i >= 0; i--) {
+ try {
+ executors[i].stopAndJoin();
+ }
+ catch (InterruptedException e) {
+ // continue to next executor
+ }
+ }
+
+ assertEquals(1, SimpleAction2.getExecutionCount());
+ }
+
+ protected void tearDown() {
+ jbpmConfiguration.dropSchema();
+ }
+
+ public static class SimpleAction implements ActionHandler {
+
+ private static final long serialVersionUID = 1L;
+
+ public void execute(ExecutionContext exeContext) throws Exception {
+ System.out.println("Action 1");
+ exeContext.leaveNode();
+ }
+
+ }
+
+ public static class SimpleAction2 implements ActionHandler {
+
+ private static int executionCount = 0;
+
+ private static final long serialVersionUID = 1L;
+
+ public void execute(ExecutionContext exeContext) throws Exception {
+ System.out.println("Action 2: " + incrementCount());
+ exeContext.leaveNode();
+ }
+
+ private static synchronized int incrementCount() {
+ return ++executionCount;
+ }
+
+ public static synchronized int getExecutionCount() {
+ return executionCount;
+ }
+ }
+}
Deleted: jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/MultiJobExecutorTest.java
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/MultiJobExecutorTest.java 2008-09-04 20:04:22 UTC (rev 2118)
+++ jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/MultiJobExecutorTest.java 2008-09-04 21:15:04 UTC (rev 2119)
@@ -1,209 +0,0 @@
-package org.jbpm.job.executor;
-
-import java.sql.SQLException;
-
-import junit.framework.TestCase;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jbpm.JbpmConfiguration;
-import org.jbpm.JbpmContext;
-import org.jbpm.command.Command;
-import org.jbpm.command.CommandService;
-import org.jbpm.command.DeployProcessCommand;
-import org.jbpm.command.StartProcessInstanceCommand;
-import org.jbpm.command.impl.CommandServiceImpl;
-import org.jbpm.configuration.ObjectFactory;
-import org.jbpm.graph.def.ActionHandler;
-import org.jbpm.graph.exe.ExecutionContext;
-import org.jbpm.graph.exe.Token;
-
-/**
- * Test case for JBPM-1072.
- * @author Jiri Pechanec
- * @author Alejandro Guizar
- */
-public class MultiJobExecutorTest extends TestCase {
-
- private static final int EXECUTOR_COUNT = 16;
- private static final int JOB_COUNT = 1;
- private static final int IDLE_INTERVAL = 1000;
- private static final String PROCESS_NAME = "TestProcess";
-
- private static JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
- private static CommandService commandService = new CommandRetryService(new CommandServiceImpl(jbpmConfiguration), 3);
-
- private static final Log log = LogFactory.getLog(MultiJobExecutorTest.class);
-
- private static final String PROCESS_DEFINITION = "<process-definition name='"
- + PROCESS_NAME
- + "'>"
- + "<event type='process-end'>"
- + "<action name='endAction' class='"
- + EndAction.class.getName()
- + "'/>"
- + "</event>"
- + "<start-state name='start'>"
- + "<transition to='fork'/>"
- + "</start-state>"
- + "<node name='fork'>"
- + "<action class='"
- + MultiFork.class.getName()
- + "'/>"
- + "<transition to='async'/>"
- + "</node>"
- + "<node name='async' async='true'>"
- + "<action class='"
- + AsyncAction.class.getName()
- + "'/>"
- + "<transition to='join'/>"
- + "</node>"
- + "<join name='join'>"
- + "<transition to='end'/>"
- + "</join>"
- + "<end-state name='end'/>"
- + "</process-definition>";
-
- protected void setUp() throws SQLException {
- jbpmConfiguration.createSchema();
- commandService.execute(new DeployProcessCommand(PROCESS_DEFINITION));
- }
-
- public void testMultipleExecutors() {
- // create job executors
- JobExecutor[] jobExecutors = new JobExecutor[EXECUTOR_COUNT];
- // jobExecutors[0] = jbpmConfiguration.getJobExecutor();
-
- JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
- try {
- ObjectFactory objectFactory = jbpmContext.getObjectFactory();
- for (int i = 0; i < jobExecutors.length; i++) {
- JobExecutor jobExecutor = (JobExecutor) objectFactory.createObject("jbpm.job.executor");
- jobExecutor.setName(jobExecutor.getName() + '-' + i);
- jobExecutor.setIdleInterval(IDLE_INTERVAL);
- jobExecutors[i] = jobExecutor;
- }
- }
- finally {
- jbpmContext.close();
- }
-
- // start job executors
- for (int i = 0; i < jobExecutors.length; i++) {
- jobExecutors[i].start();
- }
-
- // kick off process instance
- StartProcessInstanceCommand startCommand = new StartProcessInstanceCommand();
- startCommand.setProcessName(PROCESS_NAME);
- commandService.execute(startCommand);
-
- // wait till process instance ends
- EndAction.waitFor(IDLE_INTERVAL);
-
- // stop job executors
- for (int i = jobExecutors.length - 1; i >= 0; i--) {
- try {
- jobExecutors[i].stopAndJoin();
- }
- catch (InterruptedException e) {
- // continue to next executor
- }
- }
-
- assertEquals(JOB_COUNT, AsyncAction.getCount());
- }
-
- protected void tearDown() {
- jbpmConfiguration.dropSchema();
- }
-
- static class CommandRetryService implements CommandService {
-
- private final CommandService commandService;
- private final int retryCount;
-
- CommandRetryService(CommandService commandService, int retryCount) {
- this.commandService = commandService;
- this.retryCount = retryCount;
- }
-
- public Object execute(Command command) {
- for (int i = 1;; i++) {
- try {
- return commandService.execute(command);
- }
- catch (RuntimeException e) {
- log.error("attempt " + i + " to execute command failed", e);
- if (i == retryCount)
- throw e;
- }
- }
- }
- }
-
- public static class MultiFork implements ActionHandler {
-
- private static final long serialVersionUID = 1L;
-
- public void execute(ExecutionContext ctx) throws Exception {
- Token parentToken = ctx.getToken();
- for (int i = 0; i < JOB_COUNT; i++) {
- Token childToken = new Token(parentToken, Integer.toString(i));
- new ExecutionContext(childToken).leaveNode();
- }
- }
- }
-
- public static class AsyncAction implements ActionHandler {
-
- private static volatile int count = 0;
-
- private static final long serialVersionUID = 1L;
-
- public void execute(ExecutionContext exeContext) throws Exception {
- log.info("execution count: " + incrementCount());
- exeContext.leaveNode();
- }
-
- private static synchronized int incrementCount() {
- return ++count;
- }
-
- public static int getCount() {
- return count;
- }
- }
-
- public static class EndAction implements ActionHandler {
-
- private static final Object lock = new Object();
- private static volatile boolean ended;
-
- private static final long serialVersionUID = 1L;
-
- public void execute(ExecutionContext exeContext) throws Exception {
- ended = true;
- log.debug("process-end event fired, notifying");
- synchronized (lock) {
- lock.notify();
- }
- }
-
- public static void waitFor(long timeout) {
- while (!ended) {
- log.debug("process not ended, waiting");
- try {
- synchronized (lock) {
- lock.wait(timeout);
- }
- }
- catch (InterruptedException e) {
- // check condition again
- }
- log.debug("checking whether process has ended");
- }
- log.debug("process ended, proceeding");
- }
- }
-}
Modified: jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/NoJobExecutorDbTest.java
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/NoJobExecutorDbTest.java 2008-09-04 20:04:22 UTC (rev 2118)
+++ jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/NoJobExecutorDbTest.java 2008-09-04 21:15:04 UTC (rev 2119)
@@ -25,6 +25,7 @@
import org.jbpm.JbpmConfiguration;
import org.jbpm.JbpmContext;
+import org.jbpm.configuration.ObjectFactory;
import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.graph.exe.ProcessInstance;
@@ -51,10 +52,13 @@
jbpmConfiguration.dropSchema();
}
- public void testJobExecutorDoesNotExist() {
+ public void testNoJobExecutor() {
// check the job executor is properly nullified
- assertNull(jbpmContext.getObjectFactory().createObject("jbpm.job.executor"));
- // start and end a process instance, confirm no exception gets thrown
+ ObjectFactory objectFactory = jbpmContext.getObjectFactory();
+ assertTrue("expected object factory to have object jbpm.job.executor",
+ objectFactory.hasObject("jbpm.job.executor"));
+ assertNull(objectFactory.createObject("jbpm.job.executor"));
+ // start and end a process instance, no exception should be thrown
jbpmContext.deployProcessDefinition(new ProcessDefinition("Audit"));
ProcessInstance processInstance = jbpmContext.newProcessInstanceForUpdate("Audit");
processInstance.end();
Added: jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/TestCallback.java
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/TestCallback.java (rev 0)
+++ jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/TestCallback.java 2008-09-04 21:15:04 UTC (rev 2119)
@@ -0,0 +1,105 @@
+/*
+ * 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.job.executor;
+
+import java.io.Serializable;
+
+import javax.transaction.Status;
+import javax.transaction.Synchronization;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jbpm.JbpmContext;
+import org.jbpm.graph.def.Event;
+
+public class TestCallback implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+ private static final Log log = LogFactory.getLog(TestCallback.class);
+
+ public void processStart() {
+ registerNotification(Event.EVENTTYPE_PROCESS_START);
+ }
+
+ public void processEnd() {
+ registerNotification(Event.EVENTTYPE_PROCESS_END);
+ }
+
+ public void nodeEnter() {
+ registerNotification(Event.EVENTTYPE_NODE_ENTER);
+ }
+
+ public void nodeLeave() {
+ registerNotification(Event.EVENTTYPE_NODE_LEAVE);
+ }
+
+ public void taskCreate() {
+ registerNotification(Event.EVENTTYPE_TASK_CREATE);
+ }
+
+ public void taskEnd() {
+ registerNotification(Event.EVENTTYPE_TASK_END);
+ }
+
+ public void timerCreate() {
+ registerNotification(Event.EVENTTYPE_TIMER_CREATE);
+ }
+
+ public void timer() {
+ registerNotification(Event.EVENTTYPE_TIMER);
+ }
+
+ private static void registerNotification(final String event) {
+ Synchronization notification = new Synchronization() {
+
+ public void beforeCompletion() {
+ // nothing to do here
+ }
+
+ public void afterCompletion(int status) {
+ if (status == Status.STATUS_COMMITTED) {
+ log.info("delivering " + event + " notification");
+ synchronized (event) {
+ event.notify();
+ }
+ }
+ }
+
+ };
+ JbpmContext.getCurrentJbpmContext()
+ .getSession()
+ .getTransaction()
+ .registerSynchronization(notification);
+ }
+
+ public static void waitForEvent(String event) {
+ synchronized (event) {
+ try {
+ event.wait(30000);
+ }
+ catch (InterruptedException e) {
+ // reassert interruption
+ Thread.currentThread().interrupt();
+ }
+ }
+ }
+}
\ No newline at end of file
Modified: jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/TimerOnTimerDbTest.java
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/TimerOnTimerDbTest.java 2008-09-04 20:04:22 UTC (rev 2118)
+++ jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/TimerOnTimerDbTest.java 2008-09-04 21:15:04 UTC (rev 2119)
@@ -21,13 +21,6 @@
*/
package org.jbpm.job.executor;
-import java.io.Serializable;
-
-import javax.transaction.Status;
-import javax.transaction.Synchronization;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.jbpm.db.AbstractDbTestCase;
import org.jbpm.graph.def.Event;
import org.jbpm.graph.def.ProcessDefinition;
@@ -68,77 +61,4 @@
stopJobExecutor();
}
}
-
- public static class TestCallback implements Serializable {
-
- private static final long serialVersionUID = 1L;
- private static final Log log = LogFactory.getLog(TestCallback.class);
-
- public void processStart() {
- registerNotification(Event.EVENTTYPE_PROCESS_START);
- }
-
- public void processEnd() {
- registerNotification(Event.EVENTTYPE_PROCESS_END);
- }
-
- public void nodeEnter() {
- registerNotification(Event.EVENTTYPE_NODE_ENTER);
- }
-
- public void nodeLeave() {
- registerNotification(Event.EVENTTYPE_NODE_LEAVE);
- }
-
- public void taskCreate() {
- registerNotification(Event.EVENTTYPE_TASK_CREATE);
- }
-
- public void taskEnd() {
- registerNotification(Event.EVENTTYPE_TASK_END);
- }
-
- public void timerCreate() {
- registerNotification(Event.EVENTTYPE_TIMER_CREATE);
- }
-
- public void timer() {
- registerNotification(Event.EVENTTYPE_TIMER);
- }
-
- private static void registerNotification(final String event) {
- Synchronization notification = new Synchronization() {
-
- public void beforeCompletion() {
- // nothing to do here
- }
-
- public void afterCompletion(int status) {
- if (status == Status.STATUS_COMMITTED) {
- log.info("delivering " + event + " notification");
- synchronized (event) {
- event.notify();
- }
- }
- }
-
- };
- jbpmConfiguration.getCurrentJbpmContext()
- .getSession()
- .getTransaction()
- .registerSynchronization(notification);
- }
-
- public static void waitForEvent(String event) {
- synchronized (event) {
- try {
- event.wait(60000);
- }
- catch (InterruptedException e) {
- // reassert interruption
- Thread.currentThread().interrupt();
- }
- }
- }
- }
}
17 years, 7 months
JBoss JBPM SVN: r2118 - jbpm4/pvm/trunk.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-09-04 16:04:22 -0400 (Thu, 04 Sep 2008)
New Revision: 2118
Added:
jbpm4/pvm/trunk/build.xml
Log:
build file for ide integration
Added: jbpm4/pvm/trunk/build.xml
===================================================================
--- jbpm4/pvm/trunk/build.xml (rev 0)
+++ jbpm4/pvm/trunk/build.xml 2008-09-04 20:04:22 UTC (rev 2118)
@@ -0,0 +1,56 @@
+<project name="pvm" default="install" basedir=".">
+
+ <!-- BROWSER PROPERTIES -->
+ <property name="windows.browser" value="C:/Program Files/Internet Explorer/IEXPLORE.EXE" />
+ <property name="macos.browser" value="/usr/bin/open" />
+ <property name="linux.browser" value="mozilla" />
+
+ <target name="install">
+ <exec executable="cmd">
+ <arg line="/C mvn install" />
+ </exec>
+ </target>
+
+ <target name="javadoc">
+ <exec executable="cmd">
+ <arg line="/C mvn javadoc:javadoc" />
+ </exec>
+ <antcall target="show.html">
+ <param name="page" value="modules/core/target/site/apidocs/index.html"/>
+ </antcall>
+ </target>
+
+ <target name="wirexsddoc">
+ <exec executable="cmd">
+ <arg line="/C mvn ?" />
+ </exec>
+ <antcall target="show.html">
+ <param name="page" value="modules/core/target/site/apidocs/index.html"/>
+ </antcall>
+ </target>
+
+ <target name="reference">
+ <exec executable="cmd">
+ <arg line="/C mvn ?" />
+ </exec>
+ <antcall target="show.html">
+ <param name="page" value="modules/core/target/site/apidocs/index.html"/>
+ </antcall>
+ </target>
+
+
+ <!-- HTML -->
+ <target name="show.html">
+ <fail message="property page has to be specified to use this target" unless="page" />
+ <exec executable="${windows.browser}" os="Windows XP,Windows 2000,Windows 98">
+ <arg value="file://${basedir}/${page}" />
+ </exec>
+ <exec executable="${macos.browser}" os="Mac OS X">
+ <arg value="file://${basedir}/${page}" />
+ </exec>
+ <exec executable="${linux.browser}" os="Linux">
+ <arg value="file://${basedir}/${page}" />
+ </exec>
+ </target>
+
+</project>
\ No newline at end of file
17 years, 7 months
JBoss JBPM SVN: r2117 - jbpm4/identity/trunk.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-09-04 14:44:43 -0400 (Thu, 04 Sep 2008)
New Revision: 2117
Modified:
jbpm4/identity/trunk/.classpath
jbpm4/identity/trunk/pom.xml
Log:
classpath and pom updates
Modified: jbpm4/identity/trunk/.classpath
===================================================================
--- jbpm4/identity/trunk/.classpath 2008-09-04 18:44:23 UTC (rev 2116)
+++ jbpm4/identity/trunk/.classpath 2008-09-04 18:44:43 UTC (rev 2117)
@@ -1,18 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" output="modules/jpdl/target/classes" path="modules/jpdl/src/main/java"/>
- <classpathentry kind="src" output="modules/jpdl/target/classes" path="modules/jpdl/src/main/resources"/>
- <classpathentry kind="src" output="modules/jpdl/target/test-classes" path="modules/jpdl/src/test/java"/>
- <classpathentry kind="src" output="modules/jpdl/target/test-classes" path="modules/jpdl/src/test/resources"/>
- <classpathentry kind="src" output="modules/identity/target/classes" path="modules/identity/src/main/java"/>
- <classpathentry kind="src" output="modules/identity/target/classes" path="modules/identity/src/main/resources"/>
- <classpathentry kind="src" output="modules/identity/target/test-classes" path="modules/identity/src/test/java"/>
- <classpathentry kind="src" output="modules/identity/target/test-classes" path="modules/identity/src/test/resources"/>
- <classpathentry kind="src" output="modules/task/target/classes" path="modules/task/src/main/java"/>
- <classpathentry kind="src" output="modules/task/target/classes" path="modules/task/src/main/resources"/>
- <classpathentry kind="src" output="modules/task/target/test-classes" path="modules/task/src/test/java"/>
- <classpathentry kind="src" output="modules/task/target/test-classes" path="modules/task/src/test/resources"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
- <classpathentry kind="output" path="target/classes"/>
+ <classpathentry kind="src" output="modules/core/target/classes" path="modules/core/src/main/java"/>
+ <classpathentry kind="src" output="modules/core/target/classes" path="modules/core/src/main/resources"/>
+ <classpathentry kind="src" output="modules/core/target/test-classes" path="modules/core/src/test/java"/>
+ <classpathentry kind="src" output="modules/core/target/test-classes" path="modules/core/src/test/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER/modules"/>
+ <classpathentry kind="output" path="target/classes"/>
</classpath>
Modified: jbpm4/identity/trunk/pom.xml
===================================================================
--- jbpm4/identity/trunk/pom.xml 2008-09-04 18:44:23 UTC (rev 2116)
+++ jbpm4/identity/trunk/pom.xml 2008-09-04 18:44:43 UTC (rev 2117)
@@ -16,19 +16,12 @@
<modelVersion>4.0.0</modelVersion>
<name>JBoss jBPM 4 - Identity</name>
- <groupId>org.jboss.jbpm</groupId>
+ <groupId>org.jbpm</groupId>
<artifactId>identity</artifactId>
<packaging>pom</packaging>
<version>4.0.0-SNAPSHOT</version>
- <!-- Parent -->
- <parent>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- </parent>
-
<!-- Modules -->
<modules>
<module>modules/core</module>
@@ -47,18 +40,12 @@
<dependencies>
<!-- jBPM Dependencies -->
<dependency>
- <groupId>org.jboss.jbpm.pvm</groupId>
- <artifactId>pvm-core</artifactId>
+ <groupId>org.jbpm</groupId>
+ <artifactId>pvm</artifactId>
<version>${pvm.version}</version>
</dependency>
<dependency>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-api</artifactId>
- <version>${jboss.jbpm.api.version}</version>
- </dependency>
-
- <dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
17 years, 7 months
JBoss JBPM SVN: r2116 - jbpm4/identity/trunk/modules/core/src/main/java/org/jbpm/id/xml.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-09-04 14:44:23 -0400 (Thu, 04 Sep 2008)
New Revision: 2116
Modified:
jbpm4/identity/trunk/modules/core/src/main/java/org/jbpm/id/xml/IdentityDbSessionDescriptor.java
Log:
removed imports
Modified: jbpm4/identity/trunk/modules/core/src/main/java/org/jbpm/id/xml/IdentityDbSessionDescriptor.java
===================================================================
--- jbpm4/identity/trunk/modules/core/src/main/java/org/jbpm/id/xml/IdentityDbSessionDescriptor.java 2008-09-04 18:43:18 UTC (rev 2115)
+++ jbpm4/identity/trunk/modules/core/src/main/java/org/jbpm/id/xml/IdentityDbSessionDescriptor.java 2008-09-04 18:44:23 UTC (rev 2116)
@@ -21,11 +21,7 @@
*/
package org.jbpm.id.xml;
-import org.hibernate.Session;
import org.jbpm.id.session.IdentityDbSession;
-import org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor;
-import org.jbpm.pvm.internal.wire.WireContext;
-import org.jbpm.pvm.internal.wire.WireDefinition;
/**
17 years, 7 months
JBoss JBPM SVN: r2115 - jbpm4/task/trunk.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-09-04 14:43:18 -0400 (Thu, 04 Sep 2008)
New Revision: 2115
Modified:
jbpm4/task/trunk/.classpath
jbpm4/task/trunk/pom.xml
Log:
classpath
Modified: jbpm4/task/trunk/.classpath
===================================================================
--- jbpm4/task/trunk/.classpath 2008-09-04 18:12:56 UTC (rev 2114)
+++ jbpm4/task/trunk/.classpath 2008-09-04 18:43:18 UTC (rev 2115)
@@ -1,18 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" output="modules/jpdl/target/classes" path="modules/jpdl/src/main/java"/>
- <classpathentry kind="src" output="modules/jpdl/target/classes" path="modules/jpdl/src/main/resources"/>
- <classpathentry kind="src" output="modules/jpdl/target/test-classes" path="modules/jpdl/src/test/java"/>
- <classpathentry kind="src" output="modules/jpdl/target/test-classes" path="modules/jpdl/src/test/resources"/>
- <classpathentry kind="src" output="modules/identity/target/classes" path="modules/identity/src/main/java"/>
- <classpathentry kind="src" output="modules/identity/target/classes" path="modules/identity/src/main/resources"/>
- <classpathentry kind="src" output="modules/identity/target/test-classes" path="modules/identity/src/test/java"/>
- <classpathentry kind="src" output="modules/identity/target/test-classes" path="modules/identity/src/test/resources"/>
- <classpathentry kind="src" output="modules/task/target/classes" path="modules/task/src/main/java"/>
- <classpathentry kind="src" output="modules/task/target/classes" path="modules/task/src/main/resources"/>
- <classpathentry kind="src" output="modules/task/target/test-classes" path="modules/task/src/test/java"/>
- <classpathentry kind="src" output="modules/task/target/test-classes" path="modules/task/src/test/resources"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
- <classpathentry kind="output" path="target/classes"/>
+ <classpathentry kind="src" output="modules/core/target/classes" path="modules/core/src/main/java"/>
+ <classpathentry kind="src" output="modules/core/target/classes" path="modules/core/src/main/resources"/>
+ <classpathentry kind="src" output="modules/core/target/test-classes" path="modules/core/src/test/java"/>
+ <classpathentry kind="src" output="modules/core/target/test-classes" path="modules/core/src/test/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER/modules"/>
+ <classpathentry kind="output" path="target/classes"/>
</classpath>
Modified: jbpm4/task/trunk/pom.xml
===================================================================
--- jbpm4/task/trunk/pom.xml 2008-09-04 18:12:56 UTC (rev 2114)
+++ jbpm4/task/trunk/pom.xml 2008-09-04 18:43:18 UTC (rev 2115)
@@ -16,19 +16,12 @@
<modelVersion>4.0.0</modelVersion>
<name>JBoss jBPM 4 - Task</name>
- <groupId>org.jboss.jbpm</groupId>
+ <groupId>org.jbpm</groupId>
<artifactId>task</artifactId>
<packaging>pom</packaging>
<version>4.0.0-SNAPSHOT</version>
- <!-- Parent -->
- <parent>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- </parent>
-
<!-- Modules -->
<modules>
<module>modules/core</module>
@@ -47,18 +40,12 @@
<dependencies>
<!-- jBPM Dependencies -->
<dependency>
- <groupId>org.jboss.jbpm.pvm</groupId>
- <artifactId>pvm-core</artifactId>
+ <groupId>org.jbpm</groupId>
+ <artifactId>pvm</artifactId>
<version>${pvm.version}</version>
</dependency>
<dependency>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-api</artifactId>
- <version>${jboss.jbpm.api.version}</version>
- </dependency>
-
- <dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
17 years, 7 months
JBoss JBPM SVN: r2114 - in jbpm3/trunk/modules: enterprise and 7 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2008-09-04 14:12:56 -0400 (Thu, 04 Sep 2008)
New Revision: 2114
Removed:
jbpm3/trunk/modules/enterprise/scripts/antrun-jbpm-config.xml
jbpm3/trunk/modules/enterprise/src/main/resources/hibernate.cache.xml
jbpm3/trunk/modules/enterprise/src/main/resources/hibernate.common.xml
jbpm3/trunk/modules/enterprise/src/main/resources/hibernate.mapping.xml
jbpm3/trunk/modules/enterprise/src/main/resources/hibernate.properties.hsqldb.xml
jbpm3/trunk/modules/enterprise/src/main/resources/hibernate.properties.mysql.xml
jbpm3/trunk/modules/enterprise/src/main/resources/hibernate.properties.postgresql.xml
Modified:
jbpm3/trunk/modules/console/src/main/webapp/WEB-INF/web.xml
jbpm3/trunk/modules/enterprise/pom.xml
jbpm3/trunk/modules/enterprise/scripts/assembly-config.xml
jbpm3/trunk/modules/enterprise/src/main/java/org/jbpm/ejb/impl/CommandServiceBean.java
jbpm3/trunk/modules/enterprise/src/main/java/org/jbpm/scheduler/ejbtimer/EntitySchedulerServiceFactory.java
jbpm3/trunk/modules/enterprise/src/main/resources/META-INF/ejb-jar.xml
jbpm3/trunk/modules/enterprise/src/main/resources/jbpm.cfg.xml
jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/persistence/jta/JtaDbPersistenceTest.java
jbpm3/trunk/modules/jpdl/userguide/src/main/doocbook/en/modules/enterprise.xml
Log:
JBPM-1709: timer bean name used in test web.xml did not match name used by scheduler service to lookup
removed hibernate settings from enterprise module, moved them back to core
Modified: jbpm3/trunk/modules/console/src/main/webapp/WEB-INF/web.xml
===================================================================
--- jbpm3/trunk/modules/console/src/main/webapp/WEB-INF/web.xml 2008-09-04 17:40:29 UTC (rev 2113)
+++ jbpm3/trunk/modules/console/src/main/webapp/WEB-INF/web.xml 2008-09-04 18:12:56 UTC (rev 2114)
@@ -173,7 +173,7 @@
Link to the local entity bean that implements the scheduler service. Required for
processes that contain timers.
</description>
- <ejb-ref-name>ejb/LocalTimerEntityBean</ejb-ref-name>
+ <ejb-ref-name>ejb/TimerEntityBean</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>org.jbpm.ejb.LocalTimerEntityHome</local-home>
<local>org.jbpm.ejb.LocalTimerEntity</local>
Modified: jbpm3/trunk/modules/enterprise/pom.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/pom.xml 2008-09-04 17:40:29 UTC (rev 2113)
+++ jbpm3/trunk/modules/enterprise/pom.xml 2008-09-04 18:12:56 UTC (rev 2114)
@@ -124,19 +124,6 @@
</tasks>
</configuration>
</execution>
- <execution>
- <id>concat-hibernate-config</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <property name="database" value="${database}" />
- <ant antfile="scripts/antrun-jbpm-config.xml" target="concat" />
- </tasks>
- </configuration>
- </execution>
</executions>
</plugin>
<plugin>
@@ -193,7 +180,7 @@
<configuration>
<excludes>
<!-- https://jira.jboss.org/jira/browse/JBPM-1708 -->
- <exclude>org/jbpm/scheduler/ejbtimer/EjbSchedulerTest.java</exclude>
+ <!--exclude>org/jbpm/scheduler/ejbtimer/EjbSchedulerTest.java</exclude-->
<exclude>org/jbpm/msg/jms/AsyncProcessingTest.java</exclude>
</excludes>
</configuration>
Deleted: jbpm3/trunk/modules/enterprise/scripts/antrun-jbpm-config.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/scripts/antrun-jbpm-config.xml 2008-09-04 17:40:29 UTC (rev 2113)
+++ jbpm3/trunk/modules/enterprise/scripts/antrun-jbpm-config.xml 2008-09-04 18:12:56 UTC (rev 2114)
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- ====================================================================== -->
-<!-- -->
-<!-- JBoss, the OpenSource J2EE webOS -->
-<!-- -->
-<!-- Distributable under LGPL license. -->
-<!-- See terms of license at http://www.gnu.org. -->
-<!-- -->
-<!-- ====================================================================== -->
-
-<!-- $Id: antrun-jbpm-config.xml 2069 2008-09-02 12:30:53Z thomas.diesler(a)jboss.com $ -->
-
-<project default="concat">
-
- <property name="project.build.directory" value="${basedir}/target"/>
- <property name="project.resources.directory" value="${basedir}/src/main/resources"/>
-
- <macrodef name="macro-database-cfg">
- <attribute name="database" />
- <sequential>
-
- <available property="database.properties.available" file="${project.resources.directory}/hibernate.properties.(a){database}.xml"/>
- <fail message="hibernate.properties.(a){database}.xml not available" unless="database.properties.available"/>
-
- <echo message="Concat hibernate.cfg.(a){database}.xml using hibernate.properties.(a){database}.xml" />
-
- <!-- Concat hibernate.cfg.xml -->
- <concat destfile="${project.build.directory}/classes/hibernate.cfg.(a){database}.xml">
- <header trimleading="yes"><![CDATA[<?xml version='1.0' encoding='utf-8'?>
-
- <!DOCTYPE hibernate-configuration PUBLIC
- "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
- "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
-
- <hibernate-configuration>
- <session-factory>
- ]]></header>
- <fileset file="${project.resources.directory}/hibernate.common.xml" />
- <fileset file="${project.resources.directory}/hibernate.properties.(a){database}.xml" />
- <fileset file="${project.resources.directory}/hibernate.mapping.xml" />
- <fileset file="${project.resources.directory}/hibernate.cache.xml" />
- <footer trimleading="yes"><![CDATA[
- </session-factory>
- </hibernate-configuration>
- ]]></footer>
- </concat>
- </sequential>
- </macrodef>
-
- <target name="concat">
-
- <macro-database-cfg database="hsqldb"/>
- <macro-database-cfg database="mysql"/>
- <macro-database-cfg database="postgresql"/>
-
- <echo message="Copy hibernate.cfg.${database}.xml to hibernate.cfg.xml" />
- <copy file="${project.build.directory}/classes/hibernate.cfg.${database}.xml" tofile="${project.build.directory}/classes/hibernate.cfg.xml"/>
- </target>
-</project>
\ No newline at end of file
Modified: jbpm3/trunk/modules/enterprise/scripts/assembly-config.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/scripts/assembly-config.xml 2008-09-04 17:40:29 UTC (rev 2113)
+++ jbpm3/trunk/modules/enterprise/scripts/assembly-config.xml 2008-09-04 18:12:56 UTC (rev 2114)
@@ -10,11 +10,7 @@
<directory>${project.build.outputDirectory}</directory>
<outputDirectory>/</outputDirectory>
<includes>
- <include>hibernate.cfg.xml</include>
- <include>hibernate.cfg.*.xml</include>
<include>jbpm.cfg.xml</include>
- <include>jbpm.mail.templates.xml</include>
- <include>tree.cache.xml</include>
</includes>
</fileSet>
</fileSets>
Modified: jbpm3/trunk/modules/enterprise/src/main/java/org/jbpm/ejb/impl/CommandServiceBean.java
===================================================================
--- jbpm3/trunk/modules/enterprise/src/main/java/org/jbpm/ejb/impl/CommandServiceBean.java 2008-09-04 17:40:29 UTC (rev 2113)
+++ jbpm3/trunk/modules/enterprise/src/main/java/org/jbpm/ejb/impl/CommandServiceBean.java 2008-09-04 18:12:56 UTC (rev 2114)
@@ -63,7 +63,7 @@
* </td>
* </tr>
* <tr>
- * <td><code>ejb/LocalTimerEntityBean</code></td>
+ * <td><code>ejb/TimerEntityBean</code></td>
* <td>EJB Reference</td>
* <td>Link to the local {@linkplain TimerEntityBean entity bean} that
* implements the scheduler service. Required for processes that contain
Modified: jbpm3/trunk/modules/enterprise/src/main/java/org/jbpm/scheduler/ejbtimer/EntitySchedulerServiceFactory.java
===================================================================
--- jbpm3/trunk/modules/enterprise/src/main/java/org/jbpm/scheduler/ejbtimer/EntitySchedulerServiceFactory.java 2008-09-04 17:40:29 UTC (rev 2113)
+++ jbpm3/trunk/modules/enterprise/src/main/java/org/jbpm/scheduler/ejbtimer/EntitySchedulerServiceFactory.java 2008-09-04 18:12:56 UTC (rev 2114)
@@ -33,7 +33,7 @@
private static final long serialVersionUID = 1L;
- String timerEntityHomeJndiName = "java:comp/env/ejb/LocalTimerEntityBean";
+ String timerEntityHomeJndiName = "java:comp/env/ejb/TimerEntityBean";
private LocalTimerEntityHome timerEntityHome;
Modified: jbpm3/trunk/modules/enterprise/src/main/resources/META-INF/ejb-jar.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/src/main/resources/META-INF/ejb-jar.xml 2008-09-04 17:40:29 UTC (rev 2113)
+++ jbpm3/trunk/modules/enterprise/src/main/resources/META-INF/ejb-jar.xml 2008-09-04 18:12:56 UTC (rev 2114)
@@ -37,7 +37,7 @@
Link to the local entity bean that implements the scheduler service. Required for
processes that contain timers.
</description>
- <ejb-ref-name>ejb/LocalTimerEntityBean</ejb-ref-name>
+ <ejb-ref-name>ejb/TimerEntityBean</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>org.jbpm.ejb.LocalTimerEntityHome</local-home>
<local>org.jbpm.ejb.LocalTimerEntity</local>
Deleted: jbpm3/trunk/modules/enterprise/src/main/resources/hibernate.cache.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/src/main/resources/hibernate.cache.xml 2008-09-04 17:40:29 UTC (rev 2113)
+++ jbpm3/trunk/modules/enterprise/src/main/resources/hibernate.cache.xml 2008-09-04 18:12:56 UTC (rev 2114)
@@ -1,67 +0,0 @@
-
- <!-- ################################### -->
- <!-- # cache settings # -->
- <!-- # strategy="nonstrict-read-write" # -->
- <!-- # can be used with hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider # -->
- <!-- ################################### -->
-
- <class-cache class="org.jbpm.context.def.VariableAccess" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.file.def.FileDefinition.processFiles" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.graph.action.Script.variableAccesses" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.graph.def.Action" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.graph.def.Event" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Event.actions" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.graph.def.ExceptionHandler" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.ExceptionHandler.actions" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.graph.def.Node" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Node.events" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Node.exceptionHandlers" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Node.leavingTransitions" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Node.arrivingTransitions" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.graph.def.ProcessDefinition" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.events" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.exceptionHandlers" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.nodes" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.actions" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.definitions" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.graph.def.SuperState.nodes" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.graph.def.Transition" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Transition.events" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.graph.def.Transition.exceptionHandlers" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.graph.node.Decision.decisionConditions" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.graph.node.ProcessState.variableAccesses" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.graph.node.TaskNode.tasks" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.instantiation.Delegation" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.module.def.ModuleDefinition" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.taskmgmt.def.Swimlane.tasks" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.taskmgmt.def.TaskController" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.taskmgmt.def.TaskController.variableAccesses" usage="nonstrict-read-write" />
-
- <class-cache class="org.jbpm.taskmgmt.def.Task" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.taskmgmt.def.Task.events" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.taskmgmt.def.Task.exceptionHandlers" usage="nonstrict-read-write" />
-
- <collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.swimlanes" usage="nonstrict-read-write" />
- <collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.tasks" usage="nonstrict-read-write" />
-
- <!--
- ==================================================================================
- END org.jboss.jbpm:jbpm-jpdl-core hibernate.cfg.xml
- ==================================================================================
- -->
Deleted: jbpm3/trunk/modules/enterprise/src/main/resources/hibernate.common.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/src/main/resources/hibernate.common.xml 2008-09-04 17:40:29 UTC (rev 2113)
+++ jbpm3/trunk/modules/enterprise/src/main/resources/hibernate.common.xml 2008-09-04 18:12:56 UTC (rev 2114)
@@ -1,24 +0,0 @@
-
- <!-- ################################### -->
- <!-- # common settings # -->
- <!-- ################################### -->
-
- <!-- Simple memory-only cache -->
- <property name="cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
-
- <!-- DataSource properties -->
- <property name="hibernate.connection.datasource">java:comp/env/jdbc/JbpmDataSource</property>
-
- <!-- JTA transaction properties -->
- <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
- <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
-
- <!-- CMT transaction properties
- <property name="hibernate.transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property>
- <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
- -->
-
- <!-- logging properties -->
- <property name="hibernate.format_sql">true</property>
- <property name="hibernate.use_sql_comments">true</property>
-
\ No newline at end of file
Deleted: jbpm3/trunk/modules/enterprise/src/main/resources/hibernate.mapping.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/src/main/resources/hibernate.mapping.xml 2008-09-04 17:40:29 UTC (rev 2113)
+++ jbpm3/trunk/modules/enterprise/src/main/resources/hibernate.mapping.xml 2008-09-04 18:12:56 UTC (rev 2114)
@@ -1,149 +0,0 @@
-
- <!-- ############################################ -->
- <!-- # mapping files with external dependencies # -->
- <!-- ############################################ -->
-
- <!-- following mapping files have a dependency on the JCR API -->
- <!--
- <mapping resource="org/jbpm/context/exe/variableinstance/JcrNodeInstance.hbm.xml"/>
- -->
-
- <!-- ###################### -->
- <!-- # jbpm mapping files # -->
- <!-- ###################### -->
-
- <!-- hql queries and type defs -->
- <mapping resource="org/jbpm/db/hibernate.queries.hbm.xml" />
- <!-- hql queries used in simulation for querying historical data
- uncomment if you want to use the GetSimulationInputCommand
- or maybe you also want to use the queries yourself
- be patient: the queries need the stddev function to be enabled in your dialect
- more information on this can be found here: http://www.camunda.com/business_process_simulation_news/mysql_and_stddev.... -->
- <!--
- <mapping resource="org/jbpm/sim/bam/hibernate.queries.hbm.xml" />
- -->
-
- <!-- graph.action mapping files -->
- <mapping resource="org/jbpm/graph/action/MailAction.hbm.xml"/>
-
- <!-- graph.def mapping files -->
- <mapping resource="org/jbpm/graph/def/ProcessDefinition.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Node.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Transition.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Event.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Action.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/SuperState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/ExceptionHandler.hbm.xml"/>
- <mapping resource="org/jbpm/instantiation/Delegation.hbm.xml"/>
-
- <!-- ############################################ -->
- <!-- # another mapping file with external dependencies # -->
- <!-- ############################################ -->
- <!-- following mapping file has a dependency on -->
- <!-- 'bsh-{version}.jar'. -->
- <!-- uncomment this if you don't have bsh on your -->
- <!-- classpath. you won't be able to use the -->
- <!-- script element in process definition files -->
- <!-- has to be defined below org/jbpm/graph/def/Action.hbm.xml -->
- <!-- due to the inline collection-cache elements below -->
- <mapping resource="org/jbpm/graph/action/Script.hbm.xml"/>
-
- <!-- graph.node mapping files -->
- <mapping resource="org/jbpm/graph/node/StartState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/EndState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/ProcessState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/Decision.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/Fork.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/Join.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/MailNode.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/State.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/TaskNode.hbm.xml"/>
-
- <!-- context.def mapping files -->
- <mapping resource="org/jbpm/context/def/ContextDefinition.hbm.xml"/>
- <mapping resource="org/jbpm/context/def/VariableAccess.hbm.xml"/>
-
- <!-- bytes mapping files -->
- <mapping resource="org/jbpm/bytes/ByteArray.hbm.xml"/>
-
- <!-- module.def mapping files -->
- <mapping resource="org/jbpm/module/def/ModuleDefinition.hbm.xml"/>
-
- <!-- file.def mapping files -->
- <mapping resource="org/jbpm/file/def/FileDefinition.hbm.xml"/>
-
- <!-- taskmgmt.def mapping files -->
- <mapping resource="org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/def/Swimlane.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/def/Task.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/def/TaskController.hbm.xml"/>
-
- <!-- scheduler.def mapping files -->
- <mapping resource="org/jbpm/scheduler/def/CreateTimerAction.hbm.xml"/>
- <mapping resource="org/jbpm/scheduler/def/CancelTimerAction.hbm.xml"/>
-
- <!-- graph.exe mapping files -->
- <mapping resource="org/jbpm/graph/exe/Comment.hbm.xml"/>
- <mapping resource="org/jbpm/graph/exe/ProcessInstance.hbm.xml"/>
- <mapping resource="org/jbpm/graph/exe/Token.hbm.xml"/>
- <mapping resource="org/jbpm/graph/exe/RuntimeAction.hbm.xml"/>
-
- <!-- module.exe mapping files -->
- <mapping resource="org/jbpm/module/exe/ModuleInstance.hbm.xml"/>
-
- <!-- context.exe mapping files -->
- <mapping resource="org/jbpm/context/exe/ContextInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/TokenVariableMap.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/VariableInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/DateInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/DoubleInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/HibernateLongInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/HibernateStringInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/LongInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/NullInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/StringInstance.hbm.xml"/>
-
- <!-- job mapping files -->
- <mapping resource="org/jbpm/job/Job.hbm.xml"/>
- <mapping resource="org/jbpm/job/Timer.hbm.xml"/>
- <mapping resource="org/jbpm/job/ExecuteNodeJob.hbm.xml"/>
- <mapping resource="org/jbpm/job/ExecuteActionJob.hbm.xml"/>
-
- <!-- taskmgmt.exe mapping files -->
- <mapping resource="org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/exe/PooledActor.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml"/>
-
- <!-- logging mapping files -->
- <mapping resource="org/jbpm/logging/log/ProcessLog.hbm.xml"/>
- <mapping resource="org/jbpm/logging/log/MessageLog.hbm.xml"/>
- <mapping resource="org/jbpm/logging/log/CompositeLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ActionLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/NodeLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ProcessInstanceCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ProcessInstanceEndLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ProcessStateLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/SignalLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/TokenCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/TokenEndLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/TransitionLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableDeleteLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/ByteArrayUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/DateUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/DoubleUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/HibernateLongUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/HibernateStringUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/LongUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/StringUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskAssignLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskEndLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/SwimlaneCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml"/>
Deleted: jbpm3/trunk/modules/enterprise/src/main/resources/hibernate.properties.hsqldb.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/src/main/resources/hibernate.properties.hsqldb.xml 2008-09-04 17:40:29 UTC (rev 2113)
+++ jbpm3/trunk/modules/enterprise/src/main/resources/hibernate.properties.hsqldb.xml 2008-09-04 18:12:56 UTC (rev 2114)
@@ -1,3 +0,0 @@
-
- <!-- hibernate dialect -->
- <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
Deleted: jbpm3/trunk/modules/enterprise/src/main/resources/hibernate.properties.mysql.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/src/main/resources/hibernate.properties.mysql.xml 2008-09-04 17:40:29 UTC (rev 2113)
+++ jbpm3/trunk/modules/enterprise/src/main/resources/hibernate.properties.mysql.xml 2008-09-04 18:12:56 UTC (rev 2114)
@@ -1,3 +0,0 @@
-
- <!-- hibernate dialect -->
- <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
Deleted: jbpm3/trunk/modules/enterprise/src/main/resources/hibernate.properties.postgresql.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/src/main/resources/hibernate.properties.postgresql.xml 2008-09-04 17:40:29 UTC (rev 2113)
+++ jbpm3/trunk/modules/enterprise/src/main/resources/hibernate.properties.postgresql.xml 2008-09-04 18:12:56 UTC (rev 2114)
@@ -1,3 +0,0 @@
-
- <!-- hibernate dialect -->
- <property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property>
Modified: jbpm3/trunk/modules/enterprise/src/main/resources/jbpm.cfg.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/src/main/resources/jbpm.cfg.xml 2008-09-04 17:40:29 UTC (rev 2113)
+++ jbpm3/trunk/modules/enterprise/src/main/resources/jbpm.cfg.xml 2008-09-04 18:12:56 UTC (rev 2114)
@@ -9,30 +9,11 @@
<service name="authentication" factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory" />
</jbpm-context>
- <!-- configuration property used by persistence service impl org.jbpm.persistence.db.DbPersistenceServiceFactory -->
- <string name="resource.hibernate.cfg.xml" value="hibernate.cfg.xml" />
-
- <!-- configuration resource files pointing to default configuration files in jbpm-jpdl.jar -->
- <string name="resource.business.calendar" value="org/jbpm/calendar/jbpm.business.calendar.properties" />
- <string name="resource.default.modules" value="org/jbpm/graph/def/jbpm.default.modules.properties" />
- <string name="resource.converter" value="org/jbpm/db/hibernate/jbpm.converter.properties" />
- <string name="resource.action.types" value="org/jbpm/graph/action/action.types.xml" />
- <string name="resource.node.types" value="org/jbpm/graph/node/node.types.xml" />
- <string name="resource.parsers" value="org/jbpm/jpdl/par/jbpm.parsers.xml" />
- <string name="resource.varmapping" value="org/jbpm/context/exe/jbpm.varmapping.xml" />
- <string name="resource.mail.templates" value="jbpm.mail.templates.xml" />
-
- <int name="jbpm.byte.block.size" value="1024" singleton="true" />
- <string name="jbpm.mail.smtp.host" value="localhost" />
- <bean name="jbpm.task.instance.factory" class="org.jbpm.taskmgmt.impl.DefaultTaskInstanceFactoryImpl" singleton="true" />
- <bean name="jbpm.variable.resolver" class="org.jbpm.jpdl.el.impl.JbpmVariableResolver" singleton="true" />
- <bean name="jbpm.mail.address.resolver" class="org.jbpm.identity.mail.IdentityAddressResolver" singleton="true" />
-
<!--
Note, that the default job executor needs to be overwritten with a null value.
In the enterprise configuration there should be no job executor.
Async messaging is there bound to jms and timers to ejb timers.
-->
<null name="jbpm.job.executor" />
-
+
</jbpm-configuration>
Modified: jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/persistence/jta/JtaDbPersistenceTest.java
===================================================================
--- jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/persistence/jta/JtaDbPersistenceTest.java 2008-09-04 17:40:29 UTC (rev 2113)
+++ jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/persistence/jta/JtaDbPersistenceTest.java 2008-09-04 18:12:56 UTC (rev 2114)
@@ -49,7 +49,6 @@
protected void setUp() throws Exception {
jbpmConfiguration = JbpmConfiguration.getInstance();
- getUserTransaction();
}
public void testUserTx() throws Exception {
Modified: jbpm3/trunk/modules/jpdl/userguide/src/main/doocbook/en/modules/enterprise.xml
===================================================================
--- jbpm3/trunk/modules/jpdl/userguide/src/main/doocbook/en/modules/enterprise.xml 2008-09-04 17:40:29 UTC (rev 2113)
+++ jbpm3/trunk/modules/jpdl/userguide/src/main/doocbook/en/modules/enterprise.xml 2008-09-04 18:12:56 UTC (rev 2114)
@@ -37,7 +37,7 @@
</entry>
</row>
<row>
- <entry><literal>ejb/LocalTimerEntityBean</literal></entry>
+ <entry><literal>ejb/TimerEntityBean</literal></entry>
<entry>EJB Reference</entry>
<entry>Link to the local entity bean that implements the scheduler service.
Required for processes that contain timers.
@@ -280,7 +280,7 @@
<itemizedlist>
<listitem><literal>timerEntityHomeJndiName</literal>: the name of the
<literal>TimerEntityBean</literal>'s local home interface in the JNDI initial context.
- Defaults to <literal>java:comp/env/ejb/LocalTimerEntityBean</literal>.
+ Defaults to <literal>java:comp/env/ejb/TimerEntityBean</literal>.
</listitem>
</itemizedlist>
@@ -388,7 +388,7 @@
<transaction-type>Container</transaction-type>
<ejb-local-ref>
- <ejb-ref-name>ejb/LocalTimerEntityBean</ejb-ref-name>
+ <ejb-ref-name>ejb/TimerEntityBean</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>org.jbpm.ejb.LocalTimerEntityHome</local-home>
<local>org.jbpm.ejb.LocalTimerEntity</local>
@@ -426,7 +426,7 @@
<local-jndi-name>java:ejb/MyClientBean</local-jndi-name>
<ejb-local-ref>
- <ejb-ref-name>ejb/LocalTimerEntityBean</ejb-ref-name>
+ <ejb-ref-name>ejb/TimerEntityBean</ejb-ref-name>
<local-jndi-name>java:ejb/TimerEntityBean</local-jndi-name>
</ejb-local-ref>
@@ -463,7 +463,7 @@
</servlet-mapping>
<ejb-local-ref>
- <ejb-ref-name>ejb/LocalTimerEntityBean</ejb-ref-name>
+ <ejb-ref-name>ejb/TimerEntityBean</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>org.jbpm.ejb.LocalTimerEntityHome</local-home>
<local>org.jbpm.ejb.LocalTimerEntity</local>
@@ -498,7 +498,7 @@
<programlisting><![CDATA[<jboss-web>
<ejb-local-ref>
- <ejb-ref-name>ejb/LocalTimerEntityBean</ejb-ref-name>
+ <ejb-ref-name>ejb/TimerEntityBean</ejb-ref-name>
<local-jndi-name>java:ejb/TimerEntityBean</local-jndi-name>
</ejb-local-ref>
17 years, 7 months
JBoss JBPM SVN: r2113 - in jbpm3/trunk/modules/jpdl/core/src: test/java/org/jbpm/job/executor and 1 other directory.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2008-09-04 13:40:29 -0400 (Thu, 04 Sep 2008)
New Revision: 2113
Modified:
jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.common.xml
jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.properties.hsqldb.xml
jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.properties.mysql.xml
jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.properties.postgresql.xml
jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/NoJobExecutorDbTest.java
Log:
JBPM-1708: removed hbm2ddl.auto property, added back data source and jta transaction properties
Modified: jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.common.xml
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.common.xml 2008-09-04 16:11:14 UTC (rev 2112)
+++ jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.common.xml 2008-09-04 17:40:29 UTC (rev 2113)
@@ -1,4 +1,18 @@
+ <!-- DataSource properties (begin) ===
+ <property name="hibernate.connection.datasource">java:comp/env/jdbc/JbpmDataSource</property>
+ ==== DataSource properties (end) -->
+
+ <!-- JTA transaction properties (begin) ===
+ <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
+ <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
+ ==== JTA transaction properties (end) -->
+
+ <!-- CMT transaction properties (begin) ===
+ <property name="hibernate.transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property>
+ <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
+ ==== CMT transaction properties (end) -->
+
<!-- ################################### -->
<!-- # common settings # -->
<!-- ################################### -->
@@ -6,9 +20,6 @@
<!-- Simple memory-only cache -->
<property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
- <!-- Automatic schema creation -->
- <property name="hibernate.hbm2ddl.auto">create</property>
-
<!-- logging properties -->
<property name="hibernate.format_sql">true</property>
<property name="hibernate.use_sql_comments">true</property>
Modified: jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.properties.hsqldb.xml
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.properties.hsqldb.xml 2008-09-04 16:11:14 UTC (rev 2112)
+++ jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.properties.hsqldb.xml 2008-09-04 17:40:29 UTC (rev 2113)
@@ -8,4 +8,3 @@
<property name="hibernate.connection.username">sa</property>
<property name="hibernate.connection.password"></property>
<!-- JDBC connection properties (end) -->
-
Modified: jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.properties.mysql.xml
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.properties.mysql.xml 2008-09-04 16:11:14 UTC (rev 2112)
+++ jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.properties.mysql.xml 2008-09-04 17:40:29 UTC (rev 2113)
@@ -9,4 +9,3 @@
<property name="hibernate.connection.password"></property>
<property name="hibernate.query.substitutions">true 1, false 0</property>
<!-- JDBC connection properties (end) -->
-
\ No newline at end of file
Modified: jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.properties.postgresql.xml
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.properties.postgresql.xml 2008-09-04 16:11:14 UTC (rev 2112)
+++ jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.properties.postgresql.xml 2008-09-04 17:40:29 UTC (rev 2113)
@@ -8,4 +8,3 @@
<property name="hibernate.connection.username">jbpmtest</property>
<property name="hibernate.connection.password"></property>
<!-- JDBC connection properties (end) -->
-
\ No newline at end of file
Modified: jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/NoJobExecutorDbTest.java
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/NoJobExecutorDbTest.java 2008-09-04 16:11:14 UTC (rev 2112)
+++ jbpm3/trunk/modules/jpdl/core/src/test/java/org/jbpm/job/executor/NoJobExecutorDbTest.java 2008-09-04 17:40:29 UTC (rev 2113)
@@ -42,11 +42,13 @@
"</jbpm-configuration>");
public void setUp() throws Exception {
+ jbpmConfiguration.createSchema();
jbpmContext = jbpmConfiguration.createJbpmContext();
}
public void tearDown() throws Exception {
jbpmContext.close();
+ jbpmConfiguration.dropSchema();
}
public void testJobExecutorDoesNotExist() {
17 years, 7 months