public interface DatabaseConnectionShutdownHookService
| Modifier and Type | Method and Description |
|---|---|
void |
addShutdownHook(String description,
Connection dbConn)
Creates a
Thread that will close a database connection, then adds this thread as a JVM shutdown hook
by calling Runtime.addShutdownHook(Thread). |
void addShutdownHook(String description, Connection dbConn)
Thread that will close a database connection, then adds this thread as a JVM shutdown hook
by calling Runtime.addShutdownHook(Thread).description - human-friendly description of dbConn, e.g., "trade database"dbConn - database connection to close when JVM is shutdownCopyright © 2013–2020. All rights reserved.