Hi Alex,
- How do you know changes to the cache are not being propagated to the members?
- Where and how are you configuring the region(s)?
I have almost the exact same setup and I DO see the same Running in local mode since mcast-port was 0 and locators was empty message but the client seems to be connecting through the dedicated pool and changes being propagated to the cache server nodes.
Server console shows this:
Code:
[info 2012/05/02 12:02:51.784 CDT Spring GemFire Cache <ServerConnection on port 40404 Thread 1> tid=0x35]
ClientHealthMonitor: Registering client with member id identity(70.125.155.138(:loner):57473:4e1b810e:Spring
GemFire Cache,connection=1
[info 2012/05/02 12:02:51.819 CDT Spring GemFire Cache <Handshaker /0:0:0:0:0:0:0:0:40404 Thread 1> tid=0x34]
Initializing region _gfe_non_durable_client_with_id_70.125.155.138(:loner):57473:4e1b810e:Spring GemFire
Cache_1_queue
[info 2012/05/02 12:02:51.861 CDT Spring GemFire Cache <Handshaker /0:0:0:0:0:0:0:0:40404 Thread 1> tid=0x34]
Entry expiry tasks disabled because the queue became primary. Old messageTimeToLive was: 180
INFO : com.playground.gemfire.CacheLogger - Added [1=nicolas] to the cache
[info 2012/05/02 12:02:54.292 CDT Spring GemFire Cache <ServerConnection on port 40404 Thread 2> tid=0x36]
ClientHealthMonitor: Unregistering client with member id identity(70.125.155.138(:loner):57473:4e1b810e:Spring
GemFire Cache,connection=1
"INFO : com.playground.gemfire.CacheLogger - Added [1=nicolas] to the cache" Is the output generated by a listener registered on the Region configured on the server.
Server Config:
Code:
<!-- Cache -->
<gfe:cache properties-ref="cacheProps" />
<!-- Cache properties -->
<util:properties id="cacheProps" location="classpath:cache.properties"/>
<!-- Cache Server -->
<gfe:cache-server max-threads="10" groups="test-servers" >
<gfe:subscription-config eviction-type="ENTRY" disk-store="." />
</gfe:cache-server>
<!-- Region -->
<gfe:replicated-region id="userRegion" >
<gfe:cache-listener>
<bean class="com.playground.gemfire.CacheLogger"/>
</gfe:cache-listener>
</gfe:replicated-region>
Client Config:
Code:
<!-- Client Cache -->
<gfe:client-cache properties-ref="cacheProps" pool-name="gemfireConnectionPool" />
<!-- Cache properties -->
<util:properties id="cacheProps" location="classpath:META-INF/props/cache.properties"/>
<!-- Client Region -->
<gfe:client-region id="userRegion" pool-name="gemfireConnectionPool" />
<!-- Gemfire template -->
<bean id="cacheTemplate" class="org.springframework.data.gemfire.GemfireTemplate" p:region-ref="userRegion" />
<!-- Connection Pool -->
<gfe:pool id="gemfireConnectionPool" max-connections="20" server-group="test-servers" subscription-enabled="true">
<gfe:locator host="localhost" port="40404" />
</gfe:pool>
On the client I used the GemfireTemplate to execute template.put( 1L, "nicolas" ); and in the server node the listener is called and outputs: "INFO : com.playground.gemfire.CacheLogger - Added [1=nicolas] to the cache"
I'm not sure of the relevance of the Running in local mode since mcast-port was 0 and locators was empty log line on the client side but seems the members (client/server) are communicating as expected.
Watch the server console for client connection requests and maybe add a listener to your region on the server config to verify if the cache gets updated.
nicolas.loriente