Results 1 to 6 of 6

Thread: Quartz and getCurrentlyExecutingJobs

  1. #1
    Join Date
    Dec 2009
    Posts
    211

    Quartz and getCurrentlyExecutingJobs

    Hello,
    We used within a J2EE application, the API QUARTZ who can start treatment sooner or later. I would like to develop a reading list of jobs launched by QUARTZ, to assess the number of jobs and manage these jobs (Stop, summarize ...) Reading the docs, APIs that I could find on the web, there is an element named JobStore which can do this with an extension that is RAMJobStore for assets in memory directly (as I understand) . But despite the best intentions, I can not find a concrete example of how JobStore and how I can retrieve a list of my jobs running, just a sample, Or there may be alternative? Basically I want to know more about the Quartz and getCurrentlyExecutingJobs method in java. Thank you in advance for your reply.

  2. #2
    Join Date
    Dec 2009
    Posts
    204

    Re: Quartz and getCurrentlyExecutingJobs

    Hello,
    Even I am interested in this topic. Till now I have tried this and I have this code with me.
    Code:
    StdSchedulerFactory fac = (StdSchedulerFactory) this.Servlet.getServletContext().getAttribute(QuartzInitializerServlet.QUARTZ_FACTORY_KEY);
    
    Scheduler sch = fac.getScheduler();
     
    / / List getCurrentlyExecutingJobs () 
    / / Return a list of JobExecutionContext objects that represent all currently executing Jobs in this Scheduler instance. 
    List ion = sch.getCurrentlyExecutingJobs();
    Any other ideas on this will be appreciated and they are going to help me.
    Last edited by Ash maker; 05-02-2010 at 01:05 AM.

  3. #3
    Join Date
    Dec 2009
    Posts
    211

    Re: Quartz and getCurrentlyExecutingJobs

    Hello,
    This is my web.xml content, I do not know much about it. I guess this is correct
    Code:
     <context-param>
     <param-name> shutdown-on-unload </ param-name>
     <param-value> true </ param-value>
     </ context-param>
    
     <context-param>
     <param-name> start-scheduler-on-load </ param-name>
     <param-value> true </ param-value>
     </ context-param>
    
     <listener>
      <listener-class> org.quartz.ee.Servlet.QuartzInitializerListener</ listener-class>
     </ listener>

  4. #4
    Join Date
    Nov 2009
    Posts
    335

    Re: Quartz and getCurrentlyExecutingJobs

    Hello,
    No, I personally do not see, and if you do getCurrentlyExecutingJobs () with the same instance of Scheduler, right after you add your job does not work? The only trouble that can happen is that you use the StdSchedulerFactory generates a new Scheduler and did not have access to previous jobs. I use the same instance, making a JNDI lookup if necessary.

  5. #5
    Join Date
    Dec 2009
    Posts
    211

    Re: Quartz and getCurrentlyExecutingJobs

    Hello,
    I will confirm that the getCurrentlyExecutingJobs () works correctly with the scheduler when it is the same scheduler. I use a factory, I hope this will work, but I can still find the list of listeners that are underway? When I use getAllSchedulers () on the factory, it makes me well this time my sinWebScheduler, but how to retrieve information from the scheduler "sinWebScheduler? And truly speaking i do not have much knowledge about the JNDI.

  6. #6
    Join Date
    Nov 2009
    Posts
    333

    Re: Quartz and getCurrentlyExecutingJobs

    Hello,
    You should store the scheduler, rather than the factory in the context. Then, once you have a scheduler must be getJobGroupNames () for a list of groups. For each group, must be getJobNames () for a list of jobid and then he must do with group + jobid, getJobDetail (). The CurrentlyExecutingJob you back exactly what it says in the document, the list of jobs running. Jobs on hold and the jobs do not appear finished.

Similar Threads

  1. How to use Quartz Composer
    By Elbanco in forum Windows Software
    Replies: 4
    Last Post: 19-11-2009, 03:47 AM
  2. Need to download Quartz for Mac
    By MaCiNToSHeR in forum Operating Systems
    Replies: 3
    Last Post: 01-10-2009, 02:08 PM
  3. Quartz Composer display shadow
    By Holt in forum Operating Systems
    Replies: 3
    Last Post: 01-05-2009, 02:13 PM
  4. Quartz.dll -PROBLEM?
    By xloren in forum Media Player
    Replies: 2
    Last Post: 29-06-2007, 10:51 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,064,000.07418 seconds with 17 queries