Announcement Announcement Module
Collapse
No announcement yet.
Quartz Schedular + passing custom params Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Quartz Schedular + passing custom params

    Hello,

    I started to use quartz task schedular with spring this way:
    Code:
    <bean name="hourlyDeltaIntegration" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
      		<property name="targetObject" ref="deltaIntegrator" />
     		<property name="targetMethod" value="processIntegration"/>
    	</bean>
    It works great, but what if i want to pass a parameter to processIntegration method?
    Is there a way to achieve this?
    I tryed JobDetailBean but i can't find a way
    i want to do something like :
    Code:
    <bean name="hourlyDeltaIntegration" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
      		<property name="targetObject" ref="deltaIntegrator" />
     		<property name="targetMethod" value="processIntegration">
                    <property name="params">
                             <map>
                                   <entry type="Boolean" value="true"/>
                             </map>
    	</bean>
    is that possible?
    thanks

  • #2
    You might have got this by now, but might help others:

    Code:
    <bean name="hourlyDeltaIntegration" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
      		<property name="targetObject" ref="deltaIntegrator" />
     		<property name="targetMethod" value="processIntegration">
                    <property name="arguments">
      			<list>
      				<value>true</value>
      			</list>
      		</property>
    	</bean>

    Comment

    Working...
    X