This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Scheduling jobs on application server. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Scheduling jobs on application server." Watch "Scheduling jobs on application server." New topic

Scheduling jobs on application server.

Itamar ab

Joined: Oct 27, 2012
Posts: 7

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)?

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41024
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.

Ping & DNS - my free Android networking tools app
I agree. Here's the link:
subject: Scheduling jobs on application server.
Similar Threads
schedule a java program to run everyday at 6'0 clock
Quartz Auto starting the scheduled job - J2ee application
ServletContextListener (contextDestroyed) with Threads
How to configure Glassfish server to allow user threads
How to configure Quartz mbean