Need flag to support AWS Static and Dynamic modes.
I am working with memcached-session-manager version 1.9.7 with AWS AmazonElastiCacheClusterClient 1.1.0. I have need to support standalone memcached server for QA and UAT stacks and AWS elastic cache for production environment. We already have the amazonelasticcacheclustorclient packaged in the webapp. The setup does not work with standalone memcached because the WEB-INF/lib jars are loaded first and the app tries to connect to local memcached server in dynamic mode.
I need to be able to configure this setup in both Static and Dynamic mode.
I was able to get around this by patching MemcachedClientFactory.java with the following code.
...
ClientMode clientMode = ClientMode.Static;
if (memcachedNodesManager.getMemcachedNodes().contains(".cfg"))
{
clientMode = ClientMode.Dynamic;
}
..
I guess this would not work with spymemcached client.
I need a more permanent solution for this. Any suggestion on how to address this.
Made this code change against tag v1.9.7 https://github.com/ashishsodhi/memcached-session-manager/commit/e6035b64afe793a53b00f7fffe4f67dccba62256