I’m trying to run a Gemfire client app but I’m getting an IllegalStateException when running the following code:
//clientPool is the name of the pool from the client
DynamicRegionFactory.Config config = new DynamicRegionFactory.Config(null,(String)"clientPool",false,true);
dynRegFact = DynamicRegionFactory.get();
dynRegFact.open(config);
_cache = new ClientCacheFactory().set("locators", "")
.set("mcast-port", "0").set("log-level", "error")
.set("cache-xml-file", xmlFileName)
.create();
Exception in thread “main” java.lang.IllegalStateException: The client pool of a DynamicRegionFactory must be configured with queue-enabled set to true.
I can’t figure out how to set the queue-enabled to true. I would appreciate some code, not answers like “check this part of the documentation”. I’ve already looked everywhere.
You should enable subscription in your pool. Just add subscription-enabled=”true” attribute to your pool configuration.
Note: Your client should support transactions. It’s better to use dynamic regions on cache servers. From client call remote function.
Example:
Function:
Server side:
Add dynamic-region-factory in your server cache:
Client side:
In this case it’s not obligatory to use DynamicRegionFactory, you can use RegionFactory and create root regions.