Hi all experts,
I have JMX setup with help of 1.5 annotations and quartz running, at the moment a single job. How could I simply expose a Quartz schedule object so I can trigger jobs? See when they last run etc.. ?
Thanks in advance..
Code:<bean id="mbeanExporter" class="org.springframework.jmx.export.MBeanExporter"> <property name="assembler" ref="assembler"/> <property name="namingStrategy" ref="namingStrategy"/> <property name="autodetect" value="true"/> </bean> <bean id="jmxAttributeSource" class="org.springframework.jmx.export.annotation.AnnotationJmxAttributeSource"/> <!-- will create management interface using annotation metadata --> <bean id="assembler" class="org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler"> <property name="attributeSource" ref="jmxAttributeSource"/> </bean> <!-- will pick up the ObjectName from the annotation --> <bean id="namingStrategy" class="org.springframework.jmx.export.naming.MetadataNamingStrategy"> <property name="attributeSource" ref="jmxAttributeSource"/> </bean> <bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean"> <property name="triggers"> <ref bean="cronTriggerClean" /> </property> </bean> <bean id="cronTriggerClean" class="org.springframework.scheduling.quartz.CronTriggerBean"> <property name="jobDetail" ref="cleanJob" /> </bean> <bean id="cleanJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"> <property name="targetObject" ref="cleanDirectory" /> <property name="targetMethod" value="doIt" /> </bean>


Reply With Quote