使用proxool了...版本0.9.1
时不时会报异常如下:
Exception in thread "HouseKeeper" java.lang.NullPointerException
at org.logicalcobwebs.proxool.HouseKeeperController.getHouseKeeperToRun(HouseKeeperController.java:53)
at org.logicalcobwebs.proxool.HouseKeeperThread.run(HouseKeeperThread.java:33)
参考:
http://yang7527.iteye.com/blog/427512
http://harbey.iteye.com/blog/888966
http://topic.csdn.net/u/20080708/16/823ff6cc-a062-40e9-9858-169013138487.html
引用
This is because Proxool is not being shutdown properly. If the JVM stops then Proxool recognises that and shuts down gracefully, but if you redeploy Proxool into some environments (for example, a servlet container) then Proxool needs to be explicitly told so by calling ProxoolFacade.shutdown(). If you have a servlet container then you could put it in the servlet's destroy() method. Alternatively, use the ServletConfigurator to both configure and shutdown Proxool
http://hi.baidu.com/dannyif/blog/item/66f4cdd749ca3f2806088b5a.html
今天应用启动后,页面点击几下就报出 Exception in thread "HouseKeeper" java.lang.NullPointerException; 多点几次会重复出现这bug, 然后在网上找到一个比较妙的解决办法:
LoadServlet.java :
package com.fsti.ec.common;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.logicalcobwebs.proxool.ProxoolFacade;
public class LoadServlet extends HttpServlet {
public void init() throws ServletException {
}
public void destroy() {
//此处添加处理
ProxoolFacade.shutdown();
}
public void doPost(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
doGet(request,response);
}
public void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
}
}
在web.xml 里的配置:
<!-- for resolving HouseKeeper bug-->
<servlet>
<servlet-name>loadServlet</servlet-name>
<servlet-class>com.fsti.ec.common.LoadServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
分享到:
相关推荐
一个家庭管家系统,可以实现家庭日常的和谐管理。采用的是VB编程。
资源分类:Python库 所属语言:Python 资源全名:housekeeper-2.6.0.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
housekeeper
Sybase ASE 15.7 开发文档:系统管理指南(卷一)共两卷 第 1 章系统管理概述 .......... 1 Adaptive Server 管理任务 .......... 1 系统管理任务所需的角色 .............使用 isql 执行系统管理任务 .............
<br>11. A)The girls got on well with each other. B)It's ...housekeeper. C)The woman's house is in a mess. D)The woman works as a housekeeper. <br>13. A)The Edwards are quite well...
2.解决housekeeper内存泄露问题 3.解决与spring配合时,只能在spring的定义中以bean方式加载proxool的问题。(使用servlet方式加载也可以,只是在启动时报错) 加载方式修改为: <!-- proxool --> ...
该项目的目标是提供一个管理家庭问题的应用程序。 目前,它能够保留一份包括保质期在内的食物清单,因此您可以随时了解即将播种的食物。
HouseKeeper_V1.0 是一款智能物联家居产品,它可以根据需求方便的扩展各种家居家电控制,例如门的控制,窗帘的控制,和一些其他家电的控制,只需要简单外接一个继电器便可。本次我们将用指纹门锁控制,来阐述...
picture_housekeeper 图片档案的清理
In this project, we will provide the applications such as Video Player, Audio Player, Image Browser, Audio Recorder, FM Radio, E-book Viewer, Utilities (Calculator, Calendary, Stopwatch), Games ...
Zabbix服务器进程75%优化
Healthy_diet_housekeeper 颤振的应用程序。入门该项目是Flutter应用程序的起点。 如果这是您的第一个Flutter项目,那么有一些资源可以帮助您入门:要获得Flutter入门方面的帮助,请查看我们的,其中提供了教程,...
:sun:top-housekeeperWeb试验地这是实践Web知识的地方,眼过千遍不如手过一遍,很多时候在动手时会碰到新问题,发现以前从未关注过的点。再加上工作中,很多框架底层都是大佬们搭建好的,我们大多数时刻只能关注业务...
MQ全称为Message Queue, 消息队列(MQ)是一种应用程序对应用程序的通信方法。应用程序通过读写出入队列的消息(针对应用程序的数据)来通信,而无需专用连接来链接它们。消息传递指的是程序之间通过在消息中发送...
zabbix的源码安装和基本操作指南,其中简单包含了zabbix的yum过程。
Solid Edge管家外部程序 Solid Edge管家“运行外部程序”任务的描述和示例。 外部程序是一个可在单个Solid Edge文件上运行的控制台应用程序。 管家一次提供一个文件进行处理。...Dim ExitCode As In
只为自己写生活控制
管家集无线通讯、环境监测、实时定位、远程控制、安全报警等功能于一体的智能管家系统。
列type -可能的值: biomarker , housekeeper或spike_in 控制文件包括: 列sample -样本ID 列label -类标签 每个biomarker列 输出 归一化计数表: 列sample -样本ID 每个biomarker列 得分表包括: 列sample -...