@Override public void shutdown() { if (connectionFactory != null) { connectionFactory.destroy(); connectionFactory = null; } }
@OnDisabled public void onDisabled() { if (connectionFactory != null) { connectionFactory.destroy(); connectionFactory = null; redisType = null; context = null; } }
@Override public void destroy() throws Exception { super.destroy(); try { ((JedisConnectionFactory) redisTemplate.getConnectionFactory()).destroy(); } catch (Throwable e) { } } }
@PreDestroy public void preDestroy() { //Stopping REDIS emailEmbeddedRedis.stopRedis(); //Stopping Jedis Connection Factory log.info("Destroying Jedis connection factory on host {} and port {}.", connectionFactory.getHostName(), connectionFactory.getPort()); connectionFactory.destroy(); log.info("Destroyed Jedis connection factory on host {} and port {}.", connectionFactory.getHostName(), connectionFactory.getPort()); }
@PreDestroy public void preDestroy() { //Stopping REDIS emailEmbeddedRedis.stopRedis(); //Stopping Jedis Connection Factory log.info("Destroying Jedis connection factory on host {} and port {}.", connectionFactory.getHostName(), connectionFactory.getPort()); connectionFactory.destroy(); log.info("Destroyed Jedis connection factory on host {} and port {}.", connectionFactory.getHostName(), connectionFactory.getPort()); }