@Override
public void shutdown(final boolean arg0) {
if (threadPoolExecutorUsed) {
final ThreadPoolExecutor tpe = (ThreadPoolExecutor) executor;
tpe.shutdown();
if (arg0) {
final int timeout = SystemInstance.get().getOptions().get(OPENEJB_EJB_TIMER_POOL_AWAIT_SECONDS, 5);
try {
tpe.awaitTermination(timeout, TimeUnit.SECONDS);
} catch (final InterruptedException e) {