java - Too frequent load of Quartz Scheduler in a Spring application -
i writing spring application , use quart scheduler.
i'm running jetty server , ok, app works:
i sending http request 1 of services , then, refreshing:
and quartz gives log 3 times:
here piece of config.xml file:
<bean id="simpletrigger" class="org.springframework.scheduling.quartz.simpletriggerbean"> <property name="jobdetail" ref="fileimport" /> <property name="repeatinterval" value="${prop.checkinterval}" /> </bean> <bean class="org.springframework.scheduling.quartz.schedulerfactorybean"> <property name="jobdetails"> <list> <ref bean="fileimport" /> </list> </property> <property name="triggers"> <list> <ref bean="simpletrigger" /> </list> </property> </bean>
how can load context once, during startup, , use later without refreshing?
your problem here context reload each time when load xml file. try create different xml files each java class , then, load each of them once.
you can use private static field of class.
Comments
Post a Comment