[Logo] Terracotta Discussion Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Quartz RESTful servlet  XML
Forum Index -> Quartz
Author Message
tam0009

neo

Joined: 06/25/2012 19:31:37
Messages: 4
Offline

What I'm trying to do is build a servlet that uses a quartz to do job scheduling. The main thing that I'm having trouble with is how do I need to write my doPost method? I'm familiar with the idea of a jobstore that allows me to persist jobs. Should I simply create db entry's for the jobs that I want to run? How can I find my job details if this is what I do? Are there any "best practices" documents on this topic
light5

ophanim
[Avatar]
Joined: 01/14/2011 20:32:56
Messages: 513
Offline

Hello tam0009,

You typically would just use the Quartz API directly. See javadoc on org.quartz.Scheduler class. Also the quartz site has detail documentation on how to use Quartz properly. You shouldn't insert data by hand into data.

Also, there is a MySchedule project out there that runs as Servlet application. You may use that as your study example.

http://code.google.com/p/myschedule

Have fun!

Zemian Deng
---------------
Looking for a web UI to manage Quartz?
Try http://code.google.com/p/myschedule
[WWW]
tam0009

neo

Joined: 06/25/2012 19:31:37
Messages: 4
Offline

Calling the scheduler directly doesn't really make sense in my case, but the servlet will have a running instance of a scheduler. My problem is how could I send all the the data associated with creating a job (job detail, trigger Info) to the servlet?
light5

ophanim
[Avatar]
Joined: 01/14/2011 20:32:56
Messages: 513
Offline

Quartz itself doesn't provide RESTful servlet, but only RMI and JMX for remoting. You would have to write the RESTful servlet that expose the scheduler; or google around might find other people have done similar.

Zemian Deng
---------------
Looking for a web UI to manage Quartz?
Try http://code.google.com/p/myschedule
[WWW]
tam0009

neo

Joined: 06/25/2012 19:31:37
Messages: 4
Offline

Writing the servlet is the plan. Maybe I haven't been clear about that up to this point.

Basically, what I'm trying to do is have the servlet effectively work as a scheduler. The problem is I'm not yet sure how the format of the requests and the responses should be. For the request, I basically need to define a way to pass all the information associated w/ the job detail and the trigger, and for the response I'm not exactly sure how to respond if the client wanted to know say all the triggers for a job.
tam0009

neo

Joined: 06/25/2012 19:31:37
Messages: 4
Offline

Is there a way to turn a jobdetail/trigger into a json?
adahanne

master

Joined: 03/20/2012 23:14:46
Messages: 78
Offline

a quartz rest agent is currently work in progress (there is already some code regarding this feature in trunk); we should be using jackson for exposing jobdetails and triggers in a json format.
zjtop

neo

Joined: 07/10/2012 00:18:59
Messages: 3
Offline

I increased the timeout variable in the batch script.

nitrogen determination apparatus
 
Forum Index -> Quartz
Go to:   
Powered by JForum 2.1.7 © JForum Team