I am using Jedis to connect with a Redis server in a REST service.
When I am calling the web service I want to do operations like jedis.hmget ,
Check out Spring-data-redis.
When you add a JedisConnectionFactory you get a connectionFactory which has connection pooling capability by default.
JedisConnectionFactory()Constructs a new JedisConnectionFactory instance with default settings (default connection pooling, no shard information). See docs.
For further information, see the documentation.