Proxool報錯Exception in Thread "HouseKeeper" java.lang.NullPointerException

問題:
當tomcat裏的項目設置成reload=true時,Proxool報錯Exception in Thread "HouseKeeper" java.lang.NullPointerException ;
原因:
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
解決辦法:
在tomcat容器銷燬時,將proxool連接池關閉。
在Servlet的destroy()方法中顯式地proxool關閉連接池:
ProxoolFacade.shutdown();
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章