Results 1 to 3 of 3

Thread: Quartz not working

  1. #1
    Join Date
    Apr 2010
    Posts
    2

    Default 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. #2
    Join Date
    Aug 2004
    Location
    Montreal - Canada
    Posts
    46

    Default

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

  3. #3
    Join Date
    Apr 2010
    Posts
    2

    Default

    It's working. Thanks.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •