In most examples including this Jedis example the Jedis pool is created in the try..catch parenthesis which I think disposes it:
try(Jedis jedis = jedisPool.getResource())
{
some code
}
For me this is not possible because I need to throw errors while still using the Jedis pool, depending on result from Redis. So for my this is just
Jedis jedis = jedisPool.getResource()
Question is how best to dispose the object? Is it jedis.disconnect? jedis.quit? jedis = null?
There are some similar questions but not exactly same. One about error it gives, another about increasing pool, another about threading.