@PostCreate
RichardHightower opened this issue · 1 comments
RichardHightower commented
@QueueCallback(QueueCallbackType.INIT)
fun connectionInit() {
checkConnectionBreaker()
}
@QueueCallback(QueueCallbackType.SHUTDOWN)
fun shutdown() {
try {
connectionBreaker.ifOk {
it.close()
}.cleanup { it.close() }
} catch (ex : Exception) {
logger.warn("unable to close connection", ex)
}
}
The above should also work like this
@PostCreate
fun connectionInit() {
checkConnectionBreaker()
}
@PreDestroy
fun shutdown() {
try {
connectionBreaker.ifOk {
it.close()
}.cleanup { it.close() }
} catch (ex : Exception) {
logger.warn("unable to close connection", ex)
}
}