I am looking into a web app that already uses Quartz.
In the web.xml there is:
<servlet>
<servlet-name>QuartzInitializer</servlet-name>
<display-name>Quartz-Init Servlet</display-name>
<servlet-class>
org.quartz.ee.servlet.QuartzInitializerServlet
</servlet-class>
<load-on-startup>5</load-on-startup>
</servlet>
What is the job of this servlet and it's lifecycle?
I understand that it does some intialization for the quartz job scheduling but not exactly sure what.
Since there is no servlet-mapping
for it, I assume that it is not supposed to handle requests.
Any help is appreciated.
Thanks
QuartzInitializerServlet starts the Scheduler (typically a StdScheduler) and its worker threads. The configuration will be loaded from the file quartz.properties
.
If you are only using one scheduler, you can use QuartzInitializerListener
It's right, this servlet is not supposed to handle requests, but only for quartz initialization. In fact, the implementation of the methods doPost and doGet returns an error:
response.sendError(HttpServletResponse.SC_FORBIDDEN);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With