in geronimo-connector/src/main/java/org/apache/geronimo/connector/work/WorkerContext.java [249:277]
public synchronized boolean isTimedOut() {
assert isAccepted : "The work is not accepted.";
// A value of 0 means that the work never times out.
//??? really?
if (0 == startTimeOut || startTimeOut == WorkManager.INDEFINITE) {
return false;
}
boolean isTimeout = acceptedTime + startTimeOut > 0 &&
System.currentTimeMillis() > acceptedTime + startTimeOut;
if (log.isLoggable(Level.FINE)) {
log.log(Level.FINE, this
+ " accepted at "
+ acceptedTime
+ (isTimeout ? " has timed out." : " has not timed out. ")
+ nbRetry
+ " retries have been performed.");
}
if (isTimeout) {
workException = new WorkRejectedException(this + " has timed out.",
WorkException.START_TIMED_OUT);
workListener.workRejected(new WorkEvent(this,
WorkEvent.WORK_REJECTED,
adaptee,
workException));
return true;
}
nbRetry++;
return isTimeout;
}