[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Quartz schduler in a multi-app scenario  XML
Forum Index -> Quartz
Author Message
sonamzam

neo

Joined: 01/04/2010 01:26:41
Messages: 8
Offline

Hi
I am using apache-tomcat-6.0.10
I have 2 contexts running in my tomcat.
Both the applications need to use Quartz (1.5.1) for scheduling activities.
So when I start my tomcat, I have 2 schedulers running at the same time.

My questions are :

1)How can I optimize the usage of Quartz in this scenario?
2)Will having 2 instances of org.quartz.Scheduler produce any issues?
jhouse

seraphim
[Avatar]
Joined: 11/06/2009 15:29:56
Messages: 1703
Offline


1.5.1 is pretty old... any reason you're sticking with it?


Either way (even with 1.5.1) your answers are:

1) If the two contexts are different applications, then it's probably most correct to have two distinct schedulers instantiated. If they're logically the same application, then you could deploy Quartz in just one of them, and then call it remotely from the other (e.g. via RMI) if you want to only have one instance. Note that because of the classloader isolation between the two contexts it would likely not work to try to somehow use the same instance in both contexts.


2) No, having 2 instances should not produce issues. (unless you are using JDBC job store and point them both at the same database tables - in which case the data will be corrupted by them -- unless you're using clustered mode). It's very common practice for even single applications to instantiate multiple schedulers.


sonamzam

neo

Joined: 01/04/2010 01:26:41
Messages: 8
Offline

Thank you very much for your insights.
Upgraded to the latest version of Quartz already.
 
Forum Index -> Quartz
Go to:   
Powered by JForum 2.1.7 © JForum Team