xetorthio/jedis — Issue #237: jedispool seems to block when calling getResource
Author: debugging
Created: 2011-12-15 04:38:56+00:00
State: open

I have trace messages that I log to a file, and if I refresh the page many times my spring application seems to stop processing requests just before the call to:

```Jedis jedis = jedisPool.getResource();```

I'm sure I have setup the JedisPool incorrectly, here is what I did:

```public class RedisDaoImp implements RedisDao {

private static final JedisPool jedisPool = new JedisPool(new JedisPoolConfig(), "localhost");

public void someMethod(...) {

Jedis jedis = jedisPool.getResource();
}

}```

I use this RedisDao by injecting it into my Controller, and I have it wired up in my xml:

I noticed this issue first when my application didn't pass even simple benchmarking, and I then added some trace logging and it is clear that the call to .getResource is blocking.
I don't see what I have done wrong, but I am sure me creating JedisPool as a static is causing this?

I hope you can clear this up for me ")