java Quartz 内存泄漏
我用定时器启动应用的时候发现内存泄漏,具体报错如下:
十月 30, 2015 2:30:12 下午 org.apache.catalina.startup.HostConfig undeploy
信息: Undeploying context [/ChinaMoney Maven Webapp]
十月 30, 2015 2:30:15 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [/ChinaMoney Maven Webapp] registered the JDBC driver [net.sourceforge.jtds.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
十月 30, 2015 2:30:15 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/ChinaMoney Maven Webapp] appears to have started a thread named [startQuertz_Worker-1] but has failed to stop it. This is very likely to create a memory leak.
十月 30, 2015 2:30:15 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/ChinaMoney Maven Webapp] appears to have started a thread named [startQuertz_Worker-2] but has failed to stop it. This is very likely to create a memory leak.
...
定时器定义如下:
<!-- 定义触发时间 -->
<bean id="doTimeSync" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail">
<ref bean="jobtaskSync" />
</property>
<property name="cronExpression">
<value>30 38 09 * * ?</value>
</property>
</bean>
<!-- 总管理类 如果将lazy-init='false'那么容器启动就会执行调度程序 -->
<bean id="startQuertz" lazy-init="false" autowire="no"
class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref bean="doTimeSync" />
</list>
</property>
<property name="quartzProperties">
<props>
<prop key="org.quartz.scheduler.instanceName">buy_it_now</prop>
<prop key="org.quartz.threadPool.threadCount">2</prop>
<prop key="org.quartz.plugin.shutdownhook.class">org.quartz.plugins.management.ShutdownHookPlugin</prop>
<prop key="org.quartz.plugin.shutdownhook.cleanShutdown">true</prop>
<prop key="org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread">true</prop>
</props>
</property>
</bean>
请各位大神看看问题出在哪里了~跪谢!!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)