I am trying to decide on whether or not to use spring to handle the scheduling of my tasks. At first this seemed very easy as I was just going to use a ThreadPoolTaskScheduler to get the job done.
However this is a WAR that I am deploying to a JBoss application server. I would like to use spring to schedule tasks within my WAR instead of EJB3 timers because I want to be able to be AS agnostic, i.e. maybe just deploy my WAR to tomcat.
The problem is this:
Meaning JBoss should be the one managing threads not spring. This makes it tough to be AS agnostic as I will need to hook into something that lives in JBoss.26.3.3 TaskScheduler implementations
As with Spring's TaskExecutor abstraction, the primary benefit of the TaskScheduler is that code relying on scheduling behavior need not be coupled to a particular scheduler implementation. The flexibility this provides is particularly relevant when running within Application Server environments where threads should not be created directly by the application itself. For such cases, Spring provides a TimerManagerTaskScheduler that delegates to a CommonJ TimerManager instance, typically configured with a JNDI-lookup.
Does anyone have an example of how I can configure Jboss/Spring scheduler to be 'correct' in my case?