http://stackoverflow.com/questions/11872316/tomcat-guice-jdbc-memory-leak
public class XBasicDataSource extends DruidDataSource {
@Override
public void close(){
Enumeration<Driver> drivers = DriverManager.getDrivers();
while (drivers.hasMoreElements()) {
Driver driver = drivers.nextElement();
try {
DriverManager.deregisterDriver(driver);
} catch (SQLException e) {
e.printStackTrace();
}
}
try {
AbandonedConnectionCleanupThread.shutdown();
} catch (InterruptedException e) {
//logger.warn("SEVERE problem cleaning up: " + e.getMessage());
e.printStackTrace();
}
super.close();
}
}
jdbc.dataSource=com.pandy.core.ds.XBasicDataSource
分享到:
相关推荐
A 32-bit process is normally limited to addressing 2 gigabytes (GB) of memory, or 3 GB if the system was booted using the /3G boot switch even if there is more physical memory available. By leveraging...
I confine myself to problems that a programmer is very likely to have to face in her work. Many of these problems and their solutions are so general to the human condition that I will probably seem ...
初步了解Axure RP,让你了解他的控件和使用。对于初学者有一定帮助。
It is very likely that there are many errors and that the solutions are wrong. If you have found an error , have a better solution or wish to contribute in some constructive way please send a message...
SenchaSDKTools-2.0.0-Beta-windows
is very likely to be an institution that produces fiscal and monetary tools in an economics, financial, or political domain, whereas in an aviation or vehicular domain it is more likely to be a form ...
It is very likely that there are many errors and that the solutions are wrong. If you have found an error, have a better solution or wish to contribute in some constructive way please send a message ...
It is very likely that there are many errors and that the solutions are wrong. If you have found an error, have a better solution or wish to contribute in some constructive way please send a message ...
It is very likely that there are many errors and that the solutions are wrong. If you have found an error, have a better solution or wish to contribute in some constructive way please send a message ...
This is the very first release of Dante, the api will (most likely) change for the better with successive iterations. Installation Simply add the following to your build.gradle: repositories { ...
It is very likely that there are many errors and that the solutions are wrong. If you have found an error , have a better solution or wish to contribute in some constructive way please send a message...
It is very likely that there are many errors and that the solutions are wrong. If you have found an error, have a better solution or wish to contribute in some constructive way please send a message ...
It is very likely that there are many errors and that the solutions are wrong. If you have found an error, have a better solution or wish to contribute in some constructive way please send a message ...
It is very likely that there are many errors and that the solutions are wrong. If you have found an error , have a better solution or wish to contribute in some constructive way please send a message...
This is, on the surface, a book about writing device drivers for the Linux system. That is a worthy goal, of ...this book, we hope, it is more open and accessible to a larger community of developers
程序员面试刷题的书哪个好 开了交流群啦,欢迎加入交流心得 QQ群365780609 ...likely to cause a memory leak. 闭包有三个特性: Closures have three characteristics: 1.函数嵌套函数 2.函数内部可以
It is very likely that there are many errors and that the solutions are wrong. If you have found an error, have a better solution or wish to contribute in some constructive way please send a message ...
It is very likely that there are many errors and that the solutions are wrong. If you have found an error, have a better solution or wish to contribute in some constructive way please send a message ...
One way to increase availability is to create a cluster or pool of servers and add a load-balancing solution. If one server fails, the other servers take over its load. It is generally a good idea to...
the flow of new hardware products is not likely to slow down anytime soon, and somebody is going to have to make all those new gadgets work with Linux. But this book is also about how the Linux ...