Expected behavior
When Redis's password changed, without redeploy, the JedisFactory can get the new password during making a new incoming Object.
Actual behavior
JedisFactory is package protected, we couldn't extend from it to make our own customized factory.
Our proposal
1, Inside JedisPool.java, add a new constractor
public JedisPool(final GenericObjectPoolConfig poolConfig, final PooledObjectFactory<Jedis> factory) {
super(poolConfig, factory);
}
2, Change JedisFactory.java to public if possible
3, Inside JedisFactory.java (Optional)
- add
private final AtomicReference<String> password = new AtomicReference<String>();
- add
setPassword(final String password)
method
If above is approved/accepted, our application can use the new constructor to pass in JedisFactory or our own customized factory to allow reset password.
Redis / Jedis Configuration
Jedis version:
3.0.0-SNAPSHOT
Redis version:
2.8/3.0
Java version:
1.8
Thanks,
Yan