0

I made a manager/Service Server system.

Manager server collects data from database and send that data to multiple Service servers.

My code works nice when I have only 1 server. My configuration like below.(root-context.xml)

<bean id="connectionFactory" 
class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory">
    <property name="hostName" value="127.0.0.1"/>
    <property name="port" value="6379"/>
</bean>

The Problem is Service servers should be multiple. Is there any way to set multiple connection list with spring configurations? Thanks:D

P.S

I know the way to use JedisHelper.java which can be found easily in github. However, what I want to do is figure this out in spring root-context.xml.

Juneyoung Oh
  • 7,318
  • 16
  • 73
  • 121

1 Answers1

0

you need to use a Jedis Pool.

http://docs.spring.io/spring-data/redis/docs/1.0.6.RELEASE/api/org/springframework/data/redis/connection/jedis/JedisConnectionFactory.html

You need to specify a pool and set it up with all your servers.

Tim Spann
  • 517
  • 2
  • 6