2016-04-25 46 views
0

如何在Spring Remoting中使用rmi連接到其他系統。有什麼方法可以連接它嗎?Spring RMI遠程訪問其他

我使用了春季rmi的概念,但我沒有得到它。

如何在spring配置文件中給出主機名和ip地址。

任何身體能幫助我嗎?

回答

0

我不確定您完全瞭解什麼是Spring Integration,但您應在下次啓動問題時檢查標記。

反正你可以走正道,因爲是的,Spring集成提供RMI Adapters,太:

<int-rmi:outbound-gateway id="gateway" 
    request-channel="localChannel" 
    remote-channel="testChannel" 
    host="localhost"/> 

隨着原材料Spring配置,它看起來像:

<bean id="accountService" class="org.springframework.remoting.rmi.RmiProxyFactoryBean"> 
    <property name="serviceUrl" value="rmi://HOST:1199/AccountService"/> 
    <property name="serviceInterface" value="example.AccountService"/> 
</bean>