|
@@ -136,18 +136,6 @@ public class DBUtil {
|
|
|
throw new RuntimeException(e);
|
|
|
}
|
|
|
|
|
|
- final DataSource finalDataSource = dataSource;
|
|
|
- Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {
|
|
|
- public void run() {
|
|
|
- try {
|
|
|
- DataSources.destroy(finalDataSource);
|
|
|
- } catch (SQLException e) {
|
|
|
- LOG.error("[JDBC] Fail to destroy dataSource. dataSourceName=" + dataSourceName,
|
|
|
- e);
|
|
|
- }
|
|
|
- }
|
|
|
- }));
|
|
|
-
|
|
|
Connection conn = null;
|
|
|
try {
|
|
|
conn = dataSource.getConnection();
|