Announcement Announcement Module
Collapse
No announcement yet.
Quartz not working Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Quartz not working

    Hello all. I have simple web shop with spring (ver. 2.5.6), hibernate and icefaces. All was good, before I try to do Quartz trigger. Here is my Quartz configuration:
    Code:
    <bean id="productTriggerTarget" class="org.myshop.trigger.impl.ProductTriggerImpl">
    		<property name="productImporter" ref="productImporter" />
    	</bean>
    
    	<bean id="productTrigger" class="org.springframework.aop.framework.ProxyFactoryBean">
    		<property name="target">
    			<ref bean="productTriggerTarget" />
    		</property>
    		<property name="proxyInterfaces">
    			<value>org.myshop.trigger.ProductTrigger</value>
    		</property>
    		<property name="interceptorNames">
    			<list>
    				<value>hibernateInterceptor</value>
    			</list>
    		</property>
    	</bean>
    
    	<bean id="productImporterJobDetail"
    		class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
    		<property name="targetObject" ref="productTrigger" />
    		<property name="targetMethod" value="doImport" />
    	</bean>
    
    	<bean id="productImporterCronTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
    		<property name="jobDetail" ref="productImporterJobDetail" />
    		<property name="cronExpression" value="0 0/1 * * * ?" />
    	</bean>
    
    	<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
    		<property name="triggers">
    			<list>
    				<ref bean="productImporterCronTrigger" />
    			</list>
    		</property>
    	</bean>
    Application starts without exceptions, but quartz doesn't invoke my trigger. I try use this trigger and this config in blank spring application, all working good. I try place breakpoints on MethodInvokingJobDetailFactoryBean and CronTriggerBean and saw that CronTriggerBean don't initialazing.
    In other projects this quartz configuration works well.
    SVN google code link for project sources: http://code.google.com/p/ra-webshop/source/checkout
    Help me, please.

  • #2
    Have you tried with these settings:
    Code:
    <bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean"
        lazy-init="false">
        <property name="autoStartup" value="true"/>
        ....

    Comment


    • #3
      It's working. Thanks.

      Comment

      Working...
      X