如何配置Spring XD来连接远程Gemfire

时间:2015-08-18 06:31:51

标签: spring-xd

我已经配置了Spring-XD,应用程序context.xml来连接到远程gemfire db。我无法连接到远程数据库。它将连接到本地gemfire,它是Spring XD安装的一部分。请任何人都可以帮助必定的错误。

Configuration to disable local gemfire and configure to connect remote : 
/spring-xd-1.2.0.RELEASE/xd/config/modules/modules.yml

gemfire:

   useLocator: true

   host: remote-ip-address

   port: 44444

**Configuration to remote connection gemfire - spring-module.xml**

<bean id="template" class="org.springframework.data.gemfire.GemfireTemplate">
        <property name="region" ref="restaurants" />
    </bean>

    <util:properties id="gemfire-props">
        <prop key="log-level">warning</prop>
    </util:properties>

    <gfe:cache properties-ref="gemfire-props" />

    <gfe:cache-server bind-address="localhost" port="44444" />

    <gfe:replicated-region id="restaurants">
    </gfe:replicated-region>

When we deploy custom moudules and run it on spring-xd shell which access and store object in gemfire template it goes and saves it in local gmefire instead of remote gemfire database.  Please can anyone guide or suggest right way of confuguring gemfire db.

Regards,
Cleophus P.

1 个答案:

答案 0 :(得分:0)

访问Gemfire的XD模块,例如gemfire源和gemfire接收器使用客户端 - 服务器配置。

您有一个远程缓存服务器,该模块是一个客户端。通过定位器连接需要网格中的所有服务器和客户端共享定位器地址。假设您的Gemfire服务器安装已经运行了一个或多个定位器,则模块上下文应包含client-cache,其配置的地址定位器地址与远程缓存服务器相同。如果您不熟悉Gemfire客户端 - 服务器拓扑,我建议您在尝试部署XD模块之前查看product documentation并在缓存服务器上运行一个简单的独立示例。