Author: alex.guizar(a)jboss.com
Date: 2009-03-05 11:26:51 -0500 (Thu, 05 Mar 2009)
New Revision: 4157
Modified:
jbpm3/branches/jbpm-3.2.6.GA/modules/core/src/main/java/org/jbpm/graph/def/EventCallback.java
Log:
increase timeout to 5 minutes
Modified:
jbpm3/branches/jbpm-3.2.6.GA/modules/core/src/main/java/org/jbpm/graph/def/EventCallback.java
===================================================================
---
jbpm3/branches/jbpm-3.2.6.GA/modules/core/src/main/java/org/jbpm/graph/def/EventCallback.java 2009-03-05
16:23:48 UTC (rev 4156)
+++
jbpm3/branches/jbpm-3.2.6.GA/modules/core/src/main/java/org/jbpm/graph/def/EventCallback.java 2009-03-05
16:26:51 UTC (rev 4157)
@@ -38,7 +38,7 @@
public class EventCallback implements Serializable {
- public static final int DEFAULT_TIMEOUT = 60 * 1000;
+ public static final int DEFAULT_TIMEOUT = 5 * 60;
private static final long serialVersionUID = 1L;
private static final Log log = LogFactory.getLog(EventCallback.class);
@@ -158,11 +158,11 @@
log.debug("waiting for " + event);
Semaphore eventSemaphore = getEventSemaphore(event);
try {
- if (eventSemaphore.tryAcquire(occurrences, timeout, TimeUnit.MILLISECONDS)) {
+ if (eventSemaphore.tryAcquire(occurrences, timeout, TimeUnit.SECONDS)) {
log.debug("received '" + event + "' notification");
}
else {
- throw new JbpmException("event '" + event + "' did not
occur within " + timeout + " ms");
+ throw new JbpmException("event '" + event + "' did not
occur within " + timeout + " sec");
}
}
catch (InterruptedException e) {