Alex.Savitsky
Apr 25th, 2012, 09:44 AM
I do suspect this is a bug, but it's always better to double-check first, so here goes...
I'm using Spring GemFire version 1.1.1.RELEASE, together with the GemFire v.6.6.2. The cache server is running locally in a different VM from the test program, using a locator listening to localhost:55221 (using
cacheserver start start-locator=localhost[55221] The client uses the following Spring XML to connect to the server:
test.xml:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:gfe="http://www.springframework.org/schema/gemfire" xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
<util:map id="cacheProperties" map-class="java.util.Properties">
<entry key="log-level" value="config" />
</util:map>
<gfe:pool>
<gfe:locator host="localhost" port="55221" />
</gfe:pool>
<gfe:client-cache properties-ref="cacheProperties" />
</beans>
The only reason for the properties is to see the log messages during cache initialization.
When the client code instantiates this Spring context, using nothing else but
public static void main(String[] args) throws Exception {
new GenericXmlApplicationContext("classpath:test.xml");
}
I see the following lines in the log (emphasis mine):
[info 2012/04/25 10:28:29.210 EDT <main> tid=0x1] Running in local mode since mcast-port was 0 and locators was empty.
[info 2012/04/25 10:28:29.273 EDT <Thread-1 StatSampler> tid=0xc] Disabling statistic archival.
[config 2012/04/25 10:28:29.444 EDT <main> tid=0x1] Pool DEFAULT started with multiuser-authentication=false
[config 2012/04/25 10:28:29.444 EDT <poolTimer-DEFAULT-2> tid=0x11] Updating membership port. Port changed from 0 to 50,458.
[config 2012/04/25 10:28:29.445 EDT <main> tid=0x1] Pool gemfire-pool started with multiuser-authentication=false
I checked the operation of several cache clients running in different threads, and they do indeed run in local modes - no changes get propagated anywhere.
Am I, um, doing something wrong? The intention was to connect to the cache server using specified locator, yet the locator is clearly ignored...
I'm using Spring GemFire version 1.1.1.RELEASE, together with the GemFire v.6.6.2. The cache server is running locally in a different VM from the test program, using a locator listening to localhost:55221 (using
cacheserver start start-locator=localhost[55221] The client uses the following Spring XML to connect to the server:
test.xml:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:gfe="http://www.springframework.org/schema/gemfire" xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
<util:map id="cacheProperties" map-class="java.util.Properties">
<entry key="log-level" value="config" />
</util:map>
<gfe:pool>
<gfe:locator host="localhost" port="55221" />
</gfe:pool>
<gfe:client-cache properties-ref="cacheProperties" />
</beans>
The only reason for the properties is to see the log messages during cache initialization.
When the client code instantiates this Spring context, using nothing else but
public static void main(String[] args) throws Exception {
new GenericXmlApplicationContext("classpath:test.xml");
}
I see the following lines in the log (emphasis mine):
[info 2012/04/25 10:28:29.210 EDT <main> tid=0x1] Running in local mode since mcast-port was 0 and locators was empty.
[info 2012/04/25 10:28:29.273 EDT <Thread-1 StatSampler> tid=0xc] Disabling statistic archival.
[config 2012/04/25 10:28:29.444 EDT <main> tid=0x1] Pool DEFAULT started with multiuser-authentication=false
[config 2012/04/25 10:28:29.444 EDT <poolTimer-DEFAULT-2> tid=0x11] Updating membership port. Port changed from 0 to 50,458.
[config 2012/04/25 10:28:29.445 EDT <main> tid=0x1] Pool gemfire-pool started with multiuser-authentication=false
I checked the operation of several cache clients running in different threads, and they do indeed run in local modes - no changes get propagated anywhere.
Am I, um, doing something wrong? The intention was to connect to the cache server using specified locator, yet the locator is clearly ignored...