Can Quartz be used to implement EVENT BASED JOB CHAINING?

View: New views
9 Messages — Rating Filter:   Alert me  

Can Quartz be used to implement EVENT BASED JOB CHAINING?

by Sachin-21 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Afternoon!

Looking for something that can help automate the following set of jobs.

JOB A - does something
JOB B1 - waits for JOB A to complete, and does something
JOB B2 - waits for JOB A to complete, and does something
JOB C - waits for JOB B1 and JOB B2 to complete, and does something

I'm looking at Quartz, learning the terminology.

I believe the example above is an example of JOB CHAINING.

I believe the example above is EVENT BASED, not TIME BASED.

I believe that Quartz is TIME BASED, and doesn't handle out-of-the-box the EVENT BASED scenarios.

Is all of what I said true?  Is there a nice way to implement this EVENT BASED JOB CHAINING using Quartz?

I've got through the simple examples within the (excellent) book for Quartz called 'Quartz Job Scheduling Framework - Building open source enterprise applications', but the are just that - simple, and I don't believe apply.

Thoughts?  Alternatives?

Will.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=44562&messageID=89999#89999

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Can Quartz be used to implement EVENT BASED JOB CHAINING?

by Sachin-21 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Just thought: Using Job Listener Interface

You can implement job listener interface so as soon as your job A is complete, in Job A's listener method
public void jobWasExecuted(JobExecutionContext inContext,
                        JobExecutionException inException) {}
 you can schedule your job B.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=44562&messageID=90355#90355

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Can Quartz be used to implement EVENT BASED JOB CHAINING?

by Sachin-21 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You could also check out the JobChainingJobListener that James recently added to the trunk.  (You can download from svn, or get it out of fisheye: http://svn.opensymphony.com/fisheye/browse/quartz).  It is in package org.quartz.listeners
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=44562&messageID=90766#90766

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Can Quartz be used to implement EVENT BASED JOB CHAINING?

by Sachin-21 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for pointing to the Listeners...I believe this would work well for a straight chain (A>>B>>C) but perhaps not so well for a chain the breaks and then merges again.

A triggers both B1 and B2, but then both B1 and B2 need to complete to trigger C.

This break apart and then merging later (jobs with multiple prerequisites) is (IMO) almost a defacto requirement for many jobs within a single task.

Quartz appears ideally suited for independent, time-based jobs. I'm looking for an answer for a series of related jobs, with a great deal of interdependency.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=44562&messageID=91547#91547

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Can Quartz be used to implement EVENT BASED JOB CHAINING?

by Sachin-21 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> http://svn.opensymphony.com/fisheye/browse/quartz

Shucks.  'Undergoing maintenance'?

My curiousity is picqued...I'll be checking back.

W.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=44562&messageID=91549#91549

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Can Quartz be used to implement EVENT BASED JOB CHAINING?

by Sachin-21 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Huh, seems to be stuck that way!  (which is quite the bummer, fisheye is fun to play around with...)

I have attached the code here for your convenience.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=44562&messageID=92038#92038



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

JobChainingJobListener.java (3K) Download Attachment
JobListenerSupport.java (1K) Download Attachment

Re: Can Quartz be used to implement EVENT BASED JOB CHAINING?

by Sachin-21 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Can you please post an example which makes use of these classes.

Thanks in advance
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=44562&messageID=105733#105733

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Can Quartz be used to implement EVENT BASED JOB CHAINING?

by Sachin-21 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> A triggers both B1 and B2, but then both B1 and B2
> need to complete to trigger C.
>
> This break apart and then merging later (jobs with
> multiple prerequisites) is (IMO) almost a defacto
> requirement for many jobs within a single task.

Sounds like you want a workflow engine, not a job scheduler.
I worked on a project that used OSWorkflow, another Opensymphony project, with success.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=44562&messageID=570115#570115


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Can Quartz be used to implement EVENT BASED JOB CHAINING?

by Sachin-21 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

osworkflow: http://www.opensymphony.com/osworkflow/
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=44562&messageID=570116#570116


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

LightInTheBox - Buy quality products at wholesale price!