Is it ok to use ThreadPoolTaskExecutor and TimerTask in web app, or does it defy the mandate that one must not create their own threads in a web app?

Many thanks in advance,

Chris