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:

enter image description here

i sending http request 1 of services , then, refreshing:

enter image description here

and quartz gives log 3 times: enter image description here

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

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -