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...
This is a shareware program. This means that you need to buy it if you would like to continue using it after the evaluation period. Installation ============ 1) Uninstall any previous version of ...
Fixed a possible memory leak and fault in AcpiExResolveObjectToValue during a read from a buffer or region field. (BZ 458) Fiodor Suietov. Example Code and Data Size: These are the sizes for the OS- ...
Note: This directive is hardcoded to Off for the CLI SAPI ; Default Value: Off ; Development Value: 4096 ; Production Value: 4096 ; http://php.net/output-buffering output_buffering = 4096 ; You can ...
items a blank line is added to the list (EnumProp.Add('')). - ADD: Added the method TEnumProp.SetEnumType, setting all enumerable type items in compliance with the Delphi type: SetEnumType...