Hi,
I try to run a thread (class AlertManager implements Runnable) with ScheduledExecutorService, writing this code in a Listener contextInitialized method:

Java Code:
				Runnable alertTask = new AlertManager();
				ScheduledExecutorService scheduledExecutorService = Executors.newSingleThreadScheduledExecutor();
				ScheduledFuture<?> scheduledFuture = scheduledExecutorService.scheduleAtFixedRate(
						alertTask,
						0,
						Keys.DB_POLLING_TIME,
						TimeUnit.MILLISECONDS
				);
When I deploy war file on Tomcat, deploy doesn't end. In catalina.log file I can read the AlertManager thread log information, replaced subsequently with the given period. But the execution of contextInitialized method doesn't end, deploy can't finish.

If I use classic implementation, it works!

Java Code:
			Runnable runnable = new AlertManager();
			Thread thread = new Thread(runnable);
			thread.start();
Can you help me?

Thanks!