Hi,
I have a class which implements ApplicationEventPublisherAware and is supposed to periodically publish an ApplicationEvent.
The problem is my application context does not appear to be automatically setting the ApplicationEventPublisher in this object as it should.
Below is the bean configuration which should give you an idea as to what im trying to do.
Any help greatly appreciated!
<!-- System Status Heartbeat -->
<bean name="heartBeatJob" class="org.springframework.scheduling.quartz.JobDe tailBean">
<property name="jobClass" value="com.utilities.heartbeat.HeartBeatTask" />
</bean>
<bean id="heartBeatTrigger" class="org.springframework.scheduling.quartz.Simpl eTriggerBean">
<!-- see the example of method invoking job above -->
<property name="jobDetail" ref="heartBeatJob" />
<!-- 10 seconds -->
<property name="startDelay" value="5000" />
<!-- repeat every 50 seconds -->
<property name="repeatInterval" value="1000" />
</bean>
<bean id="scheduler" class="org.springframework.scheduling.quartz.Sched ulerFactoryBean">
<property name="triggers">
<list>
<ref bean="heartBeatTrigger" />
</list>
</property>
</bean>
<bean id="heartBeatForwarder" class="com.utilities.HeartBeat" />


Reply With Quote