Wednesday, November 30, 2011

Jruby on Rails + Quartz + log4j

If you want your custom quartz.properties file to be picked up, please make sure you configure this in your web.xml or web.xml.erb
<servlet>
     <servlet-name>QuartzInitializer</servlet-name>
     <display-name> Quartz Initializer Servlet</display-name>
     <servlet-class>org.quartz.ee.servlet.QuartzInitializerServlet</servlet-class>
     <load-on-startup>1</load-on-startup>
     <init-param>
         <param-name>config-file</param-name>
         <param-value>WEB-INF/lib/quartz.properties</param-value>
     </init-param>
     <init-param>
         <param-name>shutdown-on-unload</param-name>
         <param-value>true</param-value>
     </init-param>
     <init-param>
         <param-name>start-scheduler-on-load</param-name>
         <param-value>true</param-value>
     </init-param>
 </servlet>


and you want  your log4j properties to be picked up
<context-param>
    <param-name>log4jConfigLocation</param-name>
    <param-value>WEB-INF/lib/frlog4j.properties</param-value>
  </context-param>
<listener>
        <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
  </listener>

No comments:

Post a Comment