} catch (RejectedExecutionException rx) {
//there could have been contention around the queue
try {
if ( !( (TaskQueue) executor.getQueue()).force(command,timeout,unit) ) {
submittedTasksCount.decrementAndGet();
throw new RejectedExecutionException("Work queue full.");
}
}catch (InterruptedException x) {
throw new RejectedExecutionException("Interrupted.",x);
}
}
} else throw new IllegalStateException("StandardThreadPool not started.");
}