workListener = new WorkListener() {
public void workAccepted(WorkEvent event) { /* No-op */ }
public void workCompleted(WorkEvent event)
{
// This only needs to be handled if execution of the Runnable failed.
WorkException e = event.getException();
if (e != null)
{
if (Log.isDebug())
Log.getLogger(LogCategories.EXECUTOR).error("AsynchBeansWorkManager's WorkListener.workCompleted() callback invoked for failed execution.", e);
handleFailedExecution(((WorkCommandWrapper)event.getWork()).command, e);
}
}
public void workRejected(WorkEvent event)
{
WorkException e = event.getException();
if (Log.isDebug())
Log.getLogger(LogCategories.EXECUTOR).error("AsynchBeansWorkManager's WorkListener.workRejected() callback invoked. WorkException? " + e);
handleFailedExecution(((WorkCommandWrapper)event.getWork()).command, e);
}