Hi,

I am sort of trying to implement a failover/failback for geode client. I
have followed the approach the mentioned in here
<https://community.pivotal.io/s/article/Configure-client-to-use-several-clusters>.
I understand it's for gemfire but sharing just for reference as the use
case is same and will apply this for geode as well. I hope that's ok.

This is what i am trying to do. Creating two pools but in my case i have
same region names in both cluster A and B.
ClientCache clientCache = new ClientCacheFactory().create();

PoolFactory poolFactory = PoolManager.createFactory();
poolFactory.addLocator("Locator1", 10334);
poolFactory.addLocator("Locator2", 10334);
poolFactory.create("A");

poolFactory = PoolManager.createFactory();
poolFactory.addLocator("Locator1", 10334);
poolFactory.addLocator("Locator2", 10334);
poolFactory.create("B");

Region region11 =
clientCache.createClientRegionFactory(ClientRegionShortcut.PROXY)
        .setPoolName("A")
        .create("region1");

Region region22 =
clientCache.createClientRegionFactory(ClientRegionShortcut.PROXY)
        .setPoolName("A")
        .create("region2");



Region region33 =
clientCache.createClientRegionFactory(ClientRegionShortcut.PROXY)
        .setPoolName("B")

        .create("region1");

Region region44 =
clientCache.createClientRegionFactory(ClientRegionShortcut.PROXY)
        .setPoolName("B")

        .create("region2");

So If a client needs to connect to regions with the same name in two
different distributed systems then it must close or destroy the region
and recreate it with the changed pool configuration each time it wants
to change between two distributed systems.

I am doing the same but getting region destroyed exception instead. I
am using geode java client not spring data geode.

How to do this? Please help.



With Best Regards,
Ashish

Reply via email to