In Tomcat, I wrote a ServletContextListener which will start an ExecutorService during startup and terminate it when it is unloaded.
I am following the example in the javadoc for ExecutorService
public void contextDestroyed( ServletContextEvent sce )
{
executor.shutdown();
try
{
executor.awaitTermination( 50, TimeUnit.SECONDS );
}
catch( InterruptedException ie )
{
Thread.currentThread().interrupt();
}
}
My question is should I propagate the InterruptedException in the contextDestroyed() method ?