SGF-68
+ fix region initialization
This commit is contained in:
@@ -24,8 +24,9 @@ import java.util.Arrays;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.data.gemfire.client.ClientRegionFactoryBean;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
@@ -91,12 +92,12 @@ public class RegionIntegrationTest {
|
||||
}
|
||||
|
||||
//@Test
|
||||
//TODO: Disabled since for some reason in Spring, I get the bean rather then the client
|
||||
// TODO: disabled since the interest registration requires a proper pool to be created, which requires another JVM to run with the server/locator
|
||||
public void testRegionInterest() throws Exception {
|
||||
ClientRegionFactoryBean regionFB = (ClientRegionFactoryBean) ctx.getBean("&basic-client");
|
||||
System.out.println("**** interests are " + Arrays.toString(regionFB.getInterests()));
|
||||
//BeanDefinition bd = ((BeanDefinitionRegistry) ctx.getAutowireCapableBeanFactory()).getBeanDefinition("basic-client");
|
||||
// System.out.println(bd.getPropertyValues().getPropertyValue("interests").getValue());
|
||||
BeanDefinition bd = ((BeanDefinitionRegistry) ctx.getAutowireCapableBeanFactory()).getBeanDefinition("basic-client");
|
||||
System.out.println(bd.getPropertyValues().getPropertyValue("interests").getValue());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -31,7 +31,8 @@
|
||||
</bean>
|
||||
|
||||
<!-- client configurations -->
|
||||
<bean id="basic-client" class="org.springframework.data.gemfire.client.ClientRegionFactoryBean" p:cache-ref="cache" p:name="client-region" lazy-init="true">
|
||||
<bean id="basic-client" class="org.springframework.data.gemfire.client.ClientRegionFactoryBean" p:cache-ref="cache"
|
||||
p:name="client-region" lazy-init="true" p:pool-name="pool">
|
||||
<property name="interests">
|
||||
<array>
|
||||
<bean class="org.springframework.data.gemfire.client.Interest" p:key="Vlaicu" p:policy="NONE"/>
|
||||
@@ -40,6 +41,12 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="pool" class="org.springframework.data.gemfire.client.PoolFactoryBean" p:subscription-enabled="true">
|
||||
<property name="servers">
|
||||
<bean class="org.springframework.data.gemfire.client.PoolConnection" p:host="localhost" p:port="40404"/>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- region with various attributes -->
|
||||
<bean id="attr-region" class="org.springframework.data.gemfire.RegionFactoryBean" p:cache-ref="cache" lazy-init="true">
|
||||
<property name="attributes">
|
||||
|
||||
Reference in New Issue
Block a user