jeetmp3 / spring-session

Apache License 2.0
18 stars 24 forks source link

It is not possible to configure pool #8

Closed dizonn closed 8 years ago

dizonn commented 8 years ago

If sentinel master and nodes are not specified than redisConnectionFactory is configured without poolConfig

jeetmp3 commented 8 years ago

Hi @dizonn by default redisConnectionFactory use pool, if you don't want to use pool then set the property springsession.redis.connectionFactory.usePool = false. If you want to override poolConfig then create a JedisPoolConfig bean with name poolConfig in your config. Hope this answer your question.

dizonn commented 8 years ago

redisConnectionFactory does not use overridden pool since it is declared without reference to it. To fix this you can declare factory this way: redisConnectionFactory(JedisConnectionFactory, ref("poolConfig"))

or

redisConnectionFactory(JedisConnectionFactory) {
hostName = conf.redis.connectionFactory.hostName ?: "localhost"
...
poolConfig = ref('poolConfig')
}

UPD: I see that it is already in 1.3 branch, thank you.

jitendra-bisht commented 8 years ago

@dizonn Yes same is configured in 1.2.1 branch and available in plugin version 1.2.1 Thanks to let us know about the issue.