• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Spring(version 2.5)+ Quartz - SchedulerFactoryBean - waitForJobsToCompleteOnShutdown

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

As per the documentation of property "waitForJobsToCompleteOnShutdown" within "org.springframework.scheduling.quartz.SchedulerFactoryBean", Spring should wait for running jobs to complete before shutdown.

I have configured the scheduler in spring configuration xml as shown below -


I also have configured correponding trigger and job. Then I am scheduling the job using the scheduler.

This Spring module is deployed on weblogic 8.1.

When a 'shutdown' is issued from weblogic, it appears that weblogic does not wait for the spring job to complete before shutdown even though 'waitForJobsToCompleteOnShutdown' is set to TRUE.

Could you please advice what could be wrong?

Please let me know if you need any more details.

Regards,
Jacob
 
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is Weblogic issuing a graceful shutdown to the Spring context? It is the context closing event that handles this, it has nothing to do with Weblogic. You can test this by running it in a standalone application and calling close on the context. If Weblogic won't wait there is nothing you can do.
 
Jacob Tom
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bill for reply.

Weblogic is issuing graceful shutdown. Please find below class that extends "ContextLoaderListener". Is there anything I need to do more in the "contextDestroyed" method to ensure that weblogic waits till all my currently running jobs are finished before shutting down?



Regards,
Jacob
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!