JBoss JBPM SVN: r5414 - jbpm4/trunk/modules/devguide/src/main/docbook/en/modules.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2009-07-31 18:09:42 -0400 (Fri, 31 Jul 2009)
New Revision: 5414
Modified:
jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch11-JobExecutor.xml
Log:
[JBPM-2402] verify job executor threads in case of errors
update devguide text to changes in codebase
Modified: jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch11-JobExecutor.xml
===================================================================
--- jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch11-JobExecutor.xml 2009-07-31 15:29:15 UTC (rev 5413)
+++ jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch11-JobExecutor.xml 2009-07-31 22:09:42 UTC (rev 5414)
@@ -4,7 +4,7 @@
<para>
For jPDL features like asynchronous continuations and timers, jBPM
- relies on transactional asynchronous messaging and transactional
+ relies on transactional asynchronous messaging and
timers. Those are not available on the standard Java platform.
Therefore, jBPM includes the JobExecutor component, which executes
asynchronous messages and timers in any (potentially clustered)
@@ -51,12 +51,12 @@
<listitem>
A <emphasis role="bold">shared BlockingQueue</emphasis>,
which is used to temporary store job identifiers of jobs which
- are executable (eg duedate is passed).
+ are executable (e.g. due date is passed).
</listitem>
<listitem>
Every JobExecutor has one <emphasis role="bold">DispatcherThread.</emphasis>
- This thread will query the database for 'acquirable jobs' (eg timers
- which duedate is passed), using a dedicated command through the CommandService.
+ This thread will query the database for 'acquirable jobs' (e.g. timers
+ which due date is passed), using a dedicated command through the CommandService.
Since the dispatcher uses the CommandService, the command is
automatically made transactional and wrapped by the configured
interceptors. As long as jobs are available the dispatcher will put
@@ -65,24 +65,21 @@
free) or until no new jobs can be found in the database. If the latter
case, the dispatcher will wait for a configured time (ie the 'idle
time').
- </listitem>
+ </listitem>
<listitem>
- The JobExecutor also maintains a pool of
- <emphasis role="bold">JobExecutorThreads</emphasis>. The number of
- JobExecutorThreads can be configured and influences the size of the
- shared queue. Every one of the JobExecutorThreads will try to take a
- jobId from the queue. The shared queue implementation is guaranteed to
- block the JobexecutorThread until a queue slot is filled and the new
- job id will be passed to exactly one waiting JobexecutorThread.
- After taking a job id from the queue, the job is transactionally
- executed using a dedicated command through the CommandService. This
- means that the job logic will completely be executed on the
- JobExecutorThread, instead of the default calling thread. This also
- means that the order in which the jobs are executed is unknown since
- there could be multiple competing JobExecutorThreads, but it
- is certain that only one job per transaction will be done (unless using
- 'exclusive jobs' - in this case all exclusive jobs are sequentially
- executed).
+ The JobExecutor also maintains a pool of job executor threads. The number of
+ executor threads can be configured and influences the size of the shared
+ queue used to transfer and hold submitted jobs. Each executor thread will take a
+ job from the queue. The shared queue blocks the executor threads until a job
+ is queued. The new job will be acquired by exactly one waiting executor thread.
+ After taking a job from the queue, the job is transactionally
+ executed using a dedicated command through the CommandService. Therefore,
+ the job will be executed completely on the executor thread
+ instead of the caller thread. In consequence, the order in which the jobs
+ are executed is unknown since there are multiple competing executor threads.
+ However, it is certain that only one job will be done per transaction,
+ except for <emphasis>exclusive</emphasis> jobs. In this case,
+ all exclusive jobs are sequentially executed.
</listitem>
</itemizedlist>
</para>
15 years, 3 months
JBoss JBPM SVN: r5413 - jbpm4/trunk/modules/api/src/main/resources.
by do-not-reply@jboss.org
Author: kukeltje
Date: 2009-07-31 11:29:15 -0400 (Fri, 31 Jul 2009)
New Revision: 5413
Modified:
jbpm4/trunk/modules/api/src/main/resources/jpdl-4.0.xsd
Log:
[JBPM-2455] Added template attribute to notification and reminder elements in xsd
Modified: jbpm4/trunk/modules/api/src/main/resources/jpdl-4.0.xsd
===================================================================
--- jbpm4/trunk/modules/api/src/main/resources/jpdl-4.0.xsd 2009-07-31 14:58:39 UTC (rev 5412)
+++ jbpm4/trunk/modules/api/src/main/resources/jpdl-4.0.xsd 2009-07-31 15:29:15 UTC (rev 5413)
@@ -376,6 +376,7 @@
<element name="notification" minOccurs="0">
<complexType>
<attribute name="continue" type="tns:continueType" default="sync" />
+ <attribute name="template" type="tns:templateType" use="optional" />
</complexType>
</element>
<element name="reminder" minOccurs="0">
@@ -383,6 +384,7 @@
<attribute name="duedate" type="string" />
<attribute name="repeat" type="string" />
<attribute name="continue" type="tns:continueType" default="sync" />
+ <attribute name="template" type="tns:templateType" use="optional"/>
</complexType>
</element>
<element ref="tns:timer" minOccurs="0" maxOccurs="unbounded"/>
@@ -1158,9 +1160,7 @@
</complexType>
</element>
</sequence>
- <attribute name="template" type="string">
- <annotation><documentation>Reference to the email template</documentation></annotation>
- </attribute>
+ <attribute name="template" type="tns:templateType" />
</complexType>
<complexType name="mailRecipientType">
@@ -1188,4 +1188,9 @@
</restriction>
</simpleType>
+
+ <simpleType name="templateType">
+ <annotation><documentation>Reference to the email template</documentation></annotation>
+ <restriction base="string"></restriction>
+ </simpleType>
</schema>
15 years, 3 months
JBoss JBPM SVN: r5412 - jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml.
by do-not-reply@jboss.org
Author: kukeltje
Date: 2009-07-31 10:58:39 -0400 (Fri, 31 Jul 2009)
New Revision: 5412
Modified:
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/JpdlParser.java
Log:
[JBPM-2466] Fix hardcoded wrong defaultTemplate
Modified: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/JpdlParser.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/JpdlParser.java 2009-07-31 10:50:02 UTC (rev 5411)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/JpdlParser.java 2009-07-31 14:58:39 UTC (rev 5412)
@@ -618,8 +618,17 @@
else if ("exclusive".equals(continuationText)) {
eventListenerRef.setContinuation(Continuation.EXCLUSIVE);
}
+
+ //https://jira.jboss.org/jira/browse/JBPM-2466
+ String mailTemplateName = eventName;
+ if (Event.ASSIGN.equals(eventName)) {
+ mailTemplateName = "task-notification";
+ } else if (Event.REMIND.equals(eventName)) {
+ mailTemplateName = "task-reminder";
+ }
+
// associate mail producer to event listener
- MailProducer mailProducer = parseMailProducer(element, parse, "task-notification");
+ MailProducer mailProducer = parseMailProducer(element, parse, mailTemplateName);
eventListener.setMailProducer(mailProducer);
}
15 years, 3 months
JBoss JBPM SVN: r5411 - projects/gwt-console/trunk.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-07-31 06:50:02 -0400 (Fri, 31 Jul 2009)
New Revision: 5411
Added:
projects/gwt-console/trunk/README.txt
Log:
Leave readme
Added: projects/gwt-console/trunk/README.txt
===================================================================
--- projects/gwt-console/trunk/README.txt (rev 0)
+++ projects/gwt-console/trunk/README.txt 2009-07-31 10:50:02 UTC (rev 5411)
@@ -0,0 +1,5 @@
+The GWT Console source have been moved to:
+
+https://svn.jboss.org/repos/soag/bpm-console/trunk
+
+
15 years, 3 months
JBoss JBPM SVN: r5410 - projects/gwt-console.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-07-31 06:48:26 -0400 (Fri, 31 Jul 2009)
New Revision: 5410
Added:
projects/gwt-console/trunk/
Log:
Empty trunk
15 years, 3 months
JBoss JBPM SVN: r5408 - jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task.
by do-not-reply@jboss.org
Author: jbarrez
Date: 2009-07-31 05:23:41 -0400 (Fri, 31 Jul 2009)
New Revision: 5408
Modified:
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskQueryTest.java
Log:
Fix for Hudson integration test
Modified: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskQueryTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskQueryTest.java 2009-07-31 07:18:01 UTC (rev 5407)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskQueryTest.java 2009-07-31 09:23:41 UTC (rev 5408)
@@ -43,14 +43,14 @@
task.setDuedate(new Date());
String writeTestTaskId = taskService.saveTask(task);
- TaskQuery taskQuery = taskService.createTaskQuery();
+ //TaskQuery taskQuery = taskService.createTaskQuery();
- checkProperty(taskQuery, task, TaskQuery.PROPERTY_ASSIGNEE);
- checkProperty(taskQuery, task, TaskQuery.PROPERTY_CREATEDATE);
- checkProperty(taskQuery, task, TaskQuery.PROPERTY_DUEDATE);
- checkProperty(taskQuery, task, TaskQuery.PROPERTY_NAME);
- checkProperty(taskQuery, task, TaskQuery.PROPERTY_PRIORITY);
- checkProperty(taskQuery, task, TaskQuery.PROPERTY_PROGRESS);
+ checkProperty(taskService.createTaskQuery(), task, TaskQuery.PROPERTY_ASSIGNEE);
+ checkProperty(taskService.createTaskQuery(), task, TaskQuery.PROPERTY_CREATEDATE);
+ checkProperty(taskService.createTaskQuery(), task, TaskQuery.PROPERTY_DUEDATE);
+ checkProperty(taskService.createTaskQuery(), task, TaskQuery.PROPERTY_NAME);
+ checkProperty(taskService.createTaskQuery(), task, TaskQuery.PROPERTY_PRIORITY);
+ checkProperty(taskService.createTaskQuery(), task, TaskQuery.PROPERTY_PROGRESS);
taskService.deleteTaskCascade(writeTestTaskId);
}
15 years, 3 months
JBoss JBPM SVN: r5407 - in jbpm4/trunk/modules/migration/src: test/java/org/jbpm/jpdl/internal/convert and 1 other directories.
by do-not-reply@jboss.org
Author: jim.ma
Date: 2009-07-31 03:18:01 -0400 (Fri, 31 Jul 2009)
New Revision: 5407
Modified:
jbpm4/trunk/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/Jpdl3Converter.java
jbpm4/trunk/modules/migration/src/test/java/org/jbpm/jpdl/internal/convert/Jpdl3ConverterReaderTest.java
jbpm4/trunk/modules/migration/src/test/resources/businesstrip.xml
Log:
JBPM-2388:Added task reminder and notification conversion support
Modified: jbpm4/trunk/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/Jpdl3Converter.java
===================================================================
--- jbpm4/trunk/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/Jpdl3Converter.java 2009-07-31 07:13:39 UTC (rev 5406)
+++ jbpm4/trunk/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/Jpdl3Converter.java 2009-07-31 07:18:01 UTC (rev 5407)
@@ -420,32 +420,10 @@
addWarning("Unsupported condition attribute converstion for task : " + taskElement.asXML());
}
- // parse common subelements
- convertTaskTimers(taskElement, jpdlElement);
- convertEvents(taskElement, jpdlElement);
- convertExceptionHandlers(taskElement, jpdlElement);
-
- String duedateText = taskElement.attributeValue("duedate");
+
+ //The converted the elements in task should be in this sequence
+ //assignment-handler, on, notification, reminder, timer
- if (duedateText != null) {
- addWarning("Unsupported duedateDate attribute converstion for task : " + taskElement.asXML());
- }
-
- String priorityText = taskElement.attributeValue("priority");
- if (priorityText != null) {
- addWarning("Unsupported priorityText attribute converstion for task : " + taskElement.asXML());
- }
-
- String blockingText = taskElement.attributeValue("blocking");
- if (blockingText != null) {
- addWarning("Unsupported blocking attribute converstion for task : " + taskElement.asXML());
- }
-
- String signallingText = taskElement.attributeValue("signalling");
- if (signallingText != null) {
- addWarning("Unsupported signallingText attribute converstion for task : " + taskElement.asXML());
- }
-
// assignment
String swimlaneName = taskElement.attributeValue("swimlane");
Element assignmentElement = taskElement.element("assignment");
@@ -485,13 +463,45 @@
// the user has to manage assignment manually, so we better inform him/her.
log.info("process xml information: no swimlane or assignment specified for task '" + taskElement.asXML() + "'");
}
-
+
+ //event elements
+ convertEvents(taskElement, task4);
+
String notificationsText = taskElement.attributeValue("notify");
if (notificationsText != null && ("true".equalsIgnoreCase(notificationsText)
|| "on".equalsIgnoreCase(notificationsText) || "yes".equalsIgnoreCase(notificationsText))) {
- addWarning("Unsupported notify converstion for task : " + taskElement.asXML());
+ //TODO:Review if there is "continue" attribute to converted
+ Element notify = task4.addElement("notification");
+ notify.addAttribute("continue", "sync");
}
+ //Reminder elements
+ convertTaskReminders(taskElement, task4);
+ //timer elements
+ convertTaskTimers(taskElement, task4);
+ convertExceptionHandlers(taskElement, task4);
+
+ String duedateText = taskElement.attributeValue("duedate");
+
+ if (duedateText != null) {
+ addWarning("Unsupported duedateDate attribute converstion for task : " + taskElement.asXML());
+ }
+
+ String priorityText = taskElement.attributeValue("priority");
+ if (priorityText != null) {
+ addWarning("Unsupported priorityText attribute converstion for task : " + taskElement.asXML());
+ }
+
+ String blockingText = taskElement.attributeValue("blocking");
+ if (blockingText != null) {
+ addWarning("Unsupported blocking attribute converstion for task : " + taskElement.asXML());
+ }
+
+ String signallingText = taskElement.attributeValue("signalling");
+ if (signallingText != null) {
+ addWarning("Unsupported signallingText attribute converstion for task : " + taskElement.asXML());
+ }
+
Element taskControllerElement = taskElement.element("controller");
if (taskControllerElement != null) {
addWarning("Unsupported controller converstion for task : " + taskElement.asXML());
@@ -601,6 +611,7 @@
CreateTimerAction createTimerAction = new CreateTimerAction();
Element onElement = jpdl4Element.addElement("on");
+ //TODO: Look at how to map the event type : start , end and take
onElement.addAttribute("event", "timeout");
createTimerAction.createConvertedElement(timerElement, onElement);
createTimerAction.read(timerElement, this);
@@ -614,12 +625,28 @@
Iterator<?> iter = taskElement.elementIterator();
while (iter.hasNext()) {
Element element = (Element)iter.next();
- if (("timer".equals(element.getName())) || ("reminder".equals(element.getName())))
+ if (("timer".equals(element.getName())))
{
convertTaskTimer(element, jdpl4Element);
}
}
}
+
+
+ protected void convertTaskReminders(Element taskElement, Element jdpl4Element) {
+ Iterator<?> iter = taskElement.elementIterator();
+ while (iter.hasNext()) {
+ Element element = (Element)iter.next();
+ if ("reminder".equals(element.getName()))
+ {
+ convertTaskTimer(element, jdpl4Element);
+ }
+ }
+ }
+
+
+
+
protected void convertTaskTimer(Element timerElement, Element jpdl4Element) {
if ("timer".equals(timerElement.getName())) {
@@ -627,8 +654,7 @@
String name = timerElement.attributeValue("name", timerElement.getName());
if (name == null)
name = generateTimerName();
- Element onEle = jpdl4Element.addElement("on");
- onEle.addAttribute("event", "timeout");
+;
Element timer = jpdl4Element.addElement("timer");
String dueDate = timerElement.attributeValue("duedate");
@@ -653,18 +679,27 @@
repeat = null;
addProblem(new Problem(Problem.LEVEL_WARNING, "ignoring repeat on timer with transition "+ timerElement.asXML()));
}
-
- timer.addAttribute("duedata", dueDate);
this.convertSingleAction(timerElement, timer);
}
else
{
- //TODO:Create mail node for <task-reminder> element
+ Element reminder = jpdl4Element.addElement("reminder");
+ String dueDate = timerElement.attributeValue("duedate");
+ if (dueDate==null) {
+ addWarning("no duedate specified in reminder element '"+ timerElement.asXML()+"'");
+ } else {
+ reminder.addAttribute("duedate", dueDate);
+ }
+ String repeat = timerElement.attributeValue("repeat");
+ if ( "true".equalsIgnoreCase(repeat)
+ || "yes".equalsIgnoreCase(repeat) ) {
+ repeat = dueDate;
+ }
+ reminder.addAttribute("repeat", repeat);
+ //TODO: review it if there is no "continue" attribute to converted
+
}
-
- //TODO: Revist if we need to handle cancelTimerAction
-
}
public Element convertSingleAction(Element jpdl3NodeElement, Element jpdl4Element) {
Modified: jbpm4/trunk/modules/migration/src/test/java/org/jbpm/jpdl/internal/convert/Jpdl3ConverterReaderTest.java
===================================================================
--- jbpm4/trunk/modules/migration/src/test/java/org/jbpm/jpdl/internal/convert/Jpdl3ConverterReaderTest.java 2009-07-31 07:13:39 UTC (rev 5406)
+++ jbpm4/trunk/modules/migration/src/test/java/org/jbpm/jpdl/internal/convert/Jpdl3ConverterReaderTest.java 2009-07-31 07:18:01 UTC (rev 5407)
@@ -45,8 +45,9 @@
testConvert("simple.xml");
}
- @Ignore
+ @Test
public void testBusinessTrip() throws Exception {
+ setUpEnviroment();
testConvert("businesstrip.xml");
}
@@ -100,7 +101,6 @@
}
@Test
- //Unsupported super-sate and mail node conversion
public void testSuperStateAndMailNode() throws Exception {
InputStream inputStream = getClass().getClassLoader()
.getResourceAsStream("superstate-mail.xml");
@@ -166,7 +166,7 @@
InputSource ins = new InputSource(inputStream);
Jpdl3Converter converter = new Jpdl3Converter(ins);
Document doc = converter.readAndConvert();
- System.out.println(doc.asXML());
+ //System.out.println(doc.asXML());
return doc;
}
@@ -188,7 +188,13 @@
+ " <to addresses='${addressee}' />"
+ " <subject>rectify ${newspaper}</subject>"
+ " <text>${newspaper} ${date} ${details}</text>"
- + " </mail-template>"
+ + " </mail-template>"
+ + " <mail-template name='task-notification'> "
+ + " <to addresses='${addressee}' />"
+ + " <subject>rectify ${newspaper}</subject>"
+ + " <text>${newspaper} ${date} ${details}</text>"
+ + " </mail-template>"
+
+ " </process-engine-context> </jbpm-configuration>");
environmentFactory.openEnvironment();
Modified: jbpm4/trunk/modules/migration/src/test/resources/businesstrip.xml
===================================================================
--- jbpm4/trunk/modules/migration/src/test/resources/businesstrip.xml 2009-07-31 07:13:39 UTC (rev 5406)
+++ jbpm4/trunk/modules/migration/src/test/resources/businesstrip.xml 2009-07-31 07:18:01 UTC (rev 5407)
@@ -31,21 +31,35 @@
</fork>
<node name="erp update">
- <action
- class="org.jbpm.examples.businesstrip.action.UpdateErpAction">
+ <action class="com.test.NodeEnterAction">
</action>
<transition to="join"></transition>
</node>
<node name="query travel agent db">
- <action
- class="org.jbpm.examples.businesstrip.action.QueryTravelAgentDbAction">
+ <action class="com.test.NodeEnterAction">
</action>
<transition to="join"></transition>
</node>
<task-node name="ticket purchase">
- <task swimlane="accountant" />
+ <task notify="true">
+ <timer duedate="2 business minutes">
+ <action name="timer-action1" class="com.test.MessageActionHandler" />
+ </timer>
+ <event type="node-enter">
+ <action class="com.test.NodeEnterAction" />
+ </event>
+ <assignment class="com.test.RulesAssignmentHandler">
+ <group>reviewers</group>
+ <objectNames>
+ <element>order</element>
+ </objectNames>
+ <ruleFile>/assignment/Assignment.drl
+ </ruleFile>
+ </assignment>
+ <reminder duedate="3 business day" repeat="true" />
+ </task>
<transition to="query travel agent db"></transition>
</task-node>
15 years, 3 months
JBoss JBPM SVN: r5406 - in projects/jsf-console/branches/jsf-console-3.2-soa/jbpm4jsf/src/main/java/org/jbpm/jsf: identity/action and 1 other directory.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2009-07-31 03:13:39 -0400 (Fri, 31 Jul 2009)
New Revision: 5406
Modified:
projects/jsf-console/branches/jsf-console-3.2-soa/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/CancelActionListener.java
projects/jsf-console/branches/jsf-console-3.2-soa/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/GetTaskFormInfoActionListener.java
projects/jsf-console/branches/jsf-console-3.2-soa/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/DeleteMembershipActionListener.java
projects/jsf-console/branches/jsf-console-3.2-soa/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/DeleteUserActionListener.java
Log:
[JBPM-2194] Allow clients to set the UserCodeInterceptor in the configuration file
fix a few eclipse warnings
Modified: projects/jsf-console/branches/jsf-console-3.2-soa/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/CancelActionListener.java
===================================================================
--- projects/jsf-console/branches/jsf-console-3.2-soa/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/CancelActionListener.java 2009-07-31 07:12:07 UTC (rev 5405)
+++ projects/jsf-console/branches/jsf-console-3.2-soa/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/CancelActionListener.java 2009-07-31 07:13:39 UTC (rev 5406)
@@ -27,7 +27,6 @@
return "cancel";
}
- @SuppressWarnings ({"unchecked"})
public void handleAction(JbpmJsfContext context, ActionEvent event) {
try {
final FacesContext facesContext = FacesContext.getCurrentInstance();
Modified: projects/jsf-console/branches/jsf-console-3.2-soa/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/GetTaskFormInfoActionListener.java
===================================================================
--- projects/jsf-console/branches/jsf-console-3.2-soa/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/GetTaskFormInfoActionListener.java 2009-07-31 07:12:07 UTC (rev 5405)
+++ projects/jsf-console/branches/jsf-console-3.2-soa/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/GetTaskFormInfoActionListener.java 2009-07-31 07:13:39 UTC (rev 5406)
@@ -5,24 +5,18 @@
import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.file.def.FileDefinition;
import org.jbpm.util.XmlUtil;
-import org.jbpm.JbpmException;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
-import org.w3c.dom.Node;
import javax.el.ValueExpression;
import javax.el.ELContext;
import javax.faces.event.ActionEvent;
import javax.faces.context.FacesContext;
-import java.util.List;
-import java.util.ArrayList;
import java.util.Map;
-import java.util.LinkedHashMap;
import java.util.Collections;
import java.util.HashMap;
-import java.io.Serializable;
import java.io.InputStream;
/**
Modified: projects/jsf-console/branches/jsf-console-3.2-soa/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/DeleteMembershipActionListener.java
===================================================================
--- projects/jsf-console/branches/jsf-console-3.2-soa/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/DeleteMembershipActionListener.java 2009-07-31 07:12:07 UTC (rev 5405)
+++ projects/jsf-console/branches/jsf-console-3.2-soa/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/DeleteMembershipActionListener.java 2009-07-31 07:13:39 UTC (rev 5406)
@@ -4,7 +4,6 @@
import java.util.Set;
import org.jbpm.identity.Membership;
import org.jbpm.identity.User;
-import org.jbpm.identity.hibernate.IdentitySession;
import org.jbpm.jsf.JbpmActionListener;
import org.jbpm.jsf.JbpmJsfContext;
Modified: projects/jsf-console/branches/jsf-console-3.2-soa/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/DeleteUserActionListener.java
===================================================================
--- projects/jsf-console/branches/jsf-console-3.2-soa/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/DeleteUserActionListener.java 2009-07-31 07:12:07 UTC (rev 5405)
+++ projects/jsf-console/branches/jsf-console-3.2-soa/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/DeleteUserActionListener.java 2009-07-31 07:13:39 UTC (rev 5406)
@@ -24,7 +24,6 @@
return "deleteUser";
}
- @SuppressWarnings ({"unchecked"})
public void handleAction(JbpmJsfContext context, ActionEvent event) {
try {
final FacesContext facesContext = FacesContext.getCurrentInstance();
15 years, 3 months
JBoss JBPM SVN: r5405 - jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2009-07-31 03:12:07 -0400 (Fri, 31 Jul 2009)
New Revision: 5405
Modified:
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutor.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobParcel.java
Log:
[JBPM-2402] verify job executor threads in case of errors
pass bounded queue to job thread pool
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutor.java 2009-07-31 06:42:58 UTC (rev 5404)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutor.java 2009-07-31 07:12:07 UTC (rev 5405)
@@ -28,8 +28,11 @@
import java.util.Collection;
import java.util.Date;
import java.util.List;
+import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
+import java.util.concurrent.RejectedExecutionException;
+import java.util.concurrent.RejectedExecutionHandler;
+import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import org.jbpm.api.JbpmException;
@@ -37,7 +40,6 @@
import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.cmd.CommandService;
-
/** manager for job execution threads and their configuration.
*
* @author Tom Baeyens, Guillaume Porcher
@@ -53,10 +55,10 @@
CommandService commandService;
String name = "JobExecutor-"+getHostName();
int nbrOfThreads = 3;
- int idleMillis = 5000; // default normal poll interval is 5 seconds
- int idleMillisMax = 1000*60*2; // default max poll interval in case of continuous exceptions is 2 minutes
+ int idleMillis = 5*1000; // default normal poll interval is 5 seconds
+ int idleMillisMax = 5*60*1000; // default max poll interval in case of continuous exceptions is 5 minutes
int historySize = 200;
- int lockMillis = 1000*60*30; // default max lock time is 30 minutes
+ int lockMillis = 30*60*1000; // default max lock time is 30 minutes
// runtime state
@@ -81,7 +83,8 @@
isActive = true;
log.trace("starting thread pool for job executor '"+name+"'...");
- threadPool = Executors.newFixedThreadPool(nbrOfThreads);
+ threadPool = new ThreadPoolExecutor(nbrOfThreads, nbrOfThreads, 0L, TimeUnit.MILLISECONDS,
+ new ArrayBlockingQueue<Runnable>(nbrOfThreads), JobRejectionHandler.INSTANCE);
log.trace("starting dispatcher thread for job executor '"+name+"'...");
dispatcherThread = new DispatcherThread(this);
@@ -91,7 +94,20 @@
log.trace("ignoring start: job executor '"+name+"' is already started'");
}
}
-
+
+ static final class JobRejectionHandler implements RejectedExecutionHandler {
+
+ static final JobRejectionHandler INSTANCE = new JobRejectionHandler();
+
+ public void rejectedExecution(Runnable task, ThreadPoolExecutor executor) {
+ try {
+ executor.getQueue().put(task);
+ } catch (InterruptedException e) {
+ throw new RejectedExecutionException("queuing " + task + " got interrupted", e);
+ }
+ }
+ }
+
/** stops with join set to false.
* @see #stop(boolean) */
public synchronized void stop() {
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobParcel.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobParcel.java 2009-07-31 06:42:58 UTC (rev 5404)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobParcel.java 2009-07-31 07:12:07 UTC (rev 5405)
@@ -51,4 +51,9 @@
log.error("exception in job block", e);
}
}
+
+ @Override
+ public String toString() {
+ return JobParcel.class.getSimpleName() + jobDbids;
+ }
}
15 years, 3 months