"closing all connections" infinite loop
Consider:
class Boot {
...
def boot() {
...
if (!DB.jndiJdbcConnAvailable_?) {
DB.defineConnectionManager(DefaultConnectionIdentifier, DBVendor)
LiftRules.unloadHooks.append(() =>
DBVendor.closeAllConnections_!())
}
...
When this code has run, there is an unload hook registered. If later the initialization of the database connection fails, then during shutdown we get an infinite printing of:
20:31:37.775 [Shutdown] INFO net.liftweb.mapper.ProtoDBVendor - Closing all connections
This prevents the container from exiting.
class Boot {
...
def boot() {
...
if (!DB.jndiJdbcConnAvailable_?) {
DB.defineConnectionManager(DefaultConnectionIdentifier, DBVendor)
LiftRules.unloadHooks.append(() =>
DBVendor.closeAllConnections_!())
}
...
When this code has run, there is an unload hook registered. If later the initialization of the database connection fails, then during shutdown we get an infinite printing of:
20:31:37.775 [Shutdown] INFO net.liftweb.mapper.ProtoDBVendor - Closing all connections
This prevents the container from exiting.
Leave a comment