Working with application server it is Inadvisable to create threads (the threads should be created by the application server which manage them).
I would like to schedule task.
I familar with method of executing task on application server - using the jms.
my question is it there any other method, what about
Quartz sheduling - is it right to use it on application server (the quartz job/thread will be managed by the application server)?
posted 3 years ago
I've always thought that the guidance against creating threads within app servers was somewhat overdone. Tools like Quartz, or even just the java.util.Timer/TimerTask classes can be very handy to use.
BTW, I don't really understand why you mention JMS as a way of executing tasks - do you mean because you can send messages from outside the app server at specific times, and thus have the app server execute code? That would also be true for any kind of timed web service call (assuming that an HTTP server/service is available).
If you really want to avoid creating threads of your own, have the external trigger come from a cron job - it could launch an independent Java app that sends a JMS message or REST call to the app server.