Announcement Announcement Module
Collapse
No announcement yet.
why my quartz don't start , thanks ! Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • why my quartz don't start , thanks !

    hi guys , when i using quartz in spring 2.5 , i met some problem. has no idear

    below is my configuration :

    <bean id="cpoQuartz"
    class="org.springframework.scheduling.quartz.Sched ulerFactoryBean">
    <property name="triggers">
    <list>
    <ref bean="cronReportTrigger" />
    </list>
    </property>
    </bean>

    <bean id="gabeHistoryTax" class="com.test.service.GbService"/>

    <bean id="noticeMailService"
    class="org.springframework.scheduling.quartz.Metho dInvokingJobDetailFactoryBean">
    <property name="targetObject">
    <ref bean="gabeHistoryTax" />
    </property>
    <property name="targetMethod">
    <value>remindInvoice</value>
    </property>
    <property name="concurrent" value="false" />
    </bean>

    <bean id="cronReportTrigger"
    class="org.springframework.scheduling.quartz.CronT riggerBean">
    <property name="jobDetail">
    <ref bean="noticeMailService" />
    </property>
    <property name="cronExpression">
    <value>20 * * * * ? *</value>
    </property>
    </bean>

    the target service is :
    public class GbService {
    public void remindInvoice(){
    System.out.println("hahahahha"+new Date());
    }
    }

  • #2
    this is my web.xml configuration :

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath:applicationContext.xml</param-value>
    </context-param>

    <listener>
    <listener-class>org.springframework.web.context.ContextLoade rListener</listener-class>
    </listener>

    <listener>
    <listener-class>org.springframework.web.util.IntrospectorCle anupListener</listener-class>
    </listener>

    <servlet>
    <servlet-name>Jersey Spring Web Application</servlet-name>
    <servlet-class>com.sun.jersey.spi.spring.container.servlet. SpringServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Jersey Spring Web Application</servlet-name>
    <url-pattern>/*</url-pattern>
    </servlet-mapping>
    </web-app>

    Comment

    Working...
    X