Closed
Description
Mark Paluch opened DATAREDIS-507 and commented
The RedisKeyValueAdapter
creates an exception during shutdown:
2016-05-03 12:07:02.343 WARN 94337 --- [ Thread-6] o.s.b.f.support.DisposableBeanAdapter : Invocation of destroy method failed on bean with name 'redisKeyValueAdapter': com.lambdaworks.redis.RedisException: Connection is closed
This is because RedisKeyValueAdapter
closes the connection factory before the message listener containers are shut down:
public void destroy() throws Exception {
if (redisOps instanceof RedisTemplate) {
RedisConnectionFactory connectionFactory = ((RedisTemplate<?, ?>) redisOps).getConnectionFactory();
if (connectionFactory instanceof DisposableBean) {
((DisposableBean) connectionFactory).destroy();
}
}
this.expirationListener.destroy();
this.messageListenerContainer.destroy();
}
Closing the RedisConnectionFactory
seems not necessary as the bean is managed by the container itself
Referenced from: pull request #195
Backported to: 1.7.2 (Hopper SR2)