I am using redisson's Tomcat Session Manager which allows me to store sessions of Apache Tomcat in Redis. I have hardcoded the link in redis conf file and referenced that file in context.xml in meta INF (path : webapplication/project_name/WebContent/META-INF/context.xml ).
context.xml:
<Manager className="org.redisson.tomcat.RedissonSessionManager"
configPath="${catalina.base}/webapps/ROOT/WEB-INF/redisson.conf"
readMode="REDIS" updateMode="DEFAULT" broadcastSessionEvents="false"/>
redisson.conf:
singleServerConfig:
address: "redis://tomcat-session-store.XXXXX"
#devo address: "redis://tomcat-session-store.XXXXX"
# address: "redis://localhost:6379"
# idleConnectionTimeout: 10000
# connectTimeout: 10000
# timeout: 3000
# retryAttempts: 1
# retryInterval: 1500
# password: null
# subscriptionsPerConnection: 5
# clientName: null
# subscriptionConnectionMinimumIdleSize: 1
# subscriptionConnectionPoolSize: 50
# connectionMinimumIdleSize: 24
# connectionPoolSize: 64
# database: 0
#dnsMonitoringInterval: 5000
# threads: 16
# nettyThreads: 32
# codec: !<org.redisson.codec.FstCodec> {}
# transportMode: "NIO"
I need a solution to differentiate that link in prod and devo without making manual changes.