diff options
Diffstat (limited to 'connector/src/main/java/at/asitplus/eidas/specific/connector/SpringContextCloseHandler.java')
-rw-r--r-- | connector/src/main/java/at/asitplus/eidas/specific/connector/SpringContextCloseHandler.java | 56 |
1 files changed, 1 insertions, 55 deletions
diff --git a/connector/src/main/java/at/asitplus/eidas/specific/connector/SpringContextCloseHandler.java b/connector/src/main/java/at/asitplus/eidas/specific/connector/SpringContextCloseHandler.java index 2a3b659a..e884b5c6 100644 --- a/connector/src/main/java/at/asitplus/eidas/specific/connector/SpringContextCloseHandler.java +++ b/connector/src/main/java/at/asitplus/eidas/specific/connector/SpringContextCloseHandler.java @@ -133,29 +133,6 @@ public class SpringContextCloseHandler private void internalThreadPoolTaskExecutor(final Map<String, ThreadPoolTaskExecutor> executers) { for (final ThreadPoolTaskExecutor executor : executers.values()) { - // Not needed yet - // int retryCount = 0; - // while(executor.getActiveCount()>0 && ++retryCount<51){ - // try { - // log.debug("Executer {} is still working with active {} work. Retry count is - // {}", - // executor.getThreadNamePrefix(), - // executor.getActiveCount(), - // retryCount); - // Thread.sleep(1000); - // - // } catch (final InterruptedException e) { - // e.printStackTrace(); - // } - // } - // - // if(!(retryCount<51)) - // log.debug("Executer {} is still working. Since Retry count exceeded max value - // {}, will be - // killed immediately", - // executor.getThreadNamePrefix(), - // retryCount); - executor.shutdown(); log.debug("Executer {} with active {} work has killed", executor.getThreadNamePrefix(), executor.getActiveCount()); @@ -168,38 +145,7 @@ public class SpringContextCloseHandler private void internalThreadPoolTaskScheduler( final Map<String, ThreadPoolTaskScheduler> schedulers) { log.trace("Stopping #{} task-schedulers", schedulers.size()); - - // for (final ThreadPoolTaskScheduler scheduler : schedulers.values()) { - // scheduler.getScheduledExecutor().shutdown(); - // try { - // scheduler.getScheduledExecutor().awaitTermination(20000, - // TimeUnit.MILLISECONDS); - // if(scheduler.getScheduledExecutor().isTerminated() || - // scheduler.getScheduledExecutor().isShutdown()) - // log.debug("Scheduler {} has stoped", scheduler.getThreadNamePrefix()); - // - // else{ - // log.debug("Scheduler {} has not stoped normally and will be shut down - // immediately", - // scheduler.getThreadNamePrefix()); - // scheduler.getScheduledExecutor().shutdownNow(); - // log.info("Scheduler {} has shut down immediately", - // scheduler.getThreadNamePrefix()); - // - // } - // - // } catch (final IllegalStateException e) { - // e.printStackTrace(); - // - // } catch (final InterruptedException e) { - // e.printStackTrace(); - // - // } finally { - // scheduler.shutdown(); - // - // } - // } - + } private void internalIDestroyableObject(final Map<String, IDestroyableObject> objectsToDestroy) { |