Sunday, March 7, 2010

Spring Framework + RMI + JBoss

Use RMI port 1199 (other than the default port 1099, JBoss RMI) with org.springframework.remoting.rmi.RmiServiceExporter.

<bean id="escortLocationService" class="com.don.remoting.EscortLocationServiceImpl" >
</bean>

<bean id="rmi" class="org.springframework.remoting.rmi.RmiServiceExporter" >
<property name="service" ref="escortLocationService" />
<property name="serviceName" value="EscortLocationService" />
<property name="serviceInterface" value="com.don.remoting.EscortLocationService" />
<property name="registryPort" value="1199"/>
</bean>

<bean id="escortLocationServiceClient" class="org.springframework.remoting.rmi.RmiProxyFactoryBean">
<property name="serviceUrl" value="rmi://127.0.0.1:1199/EscortLocationService" />
<property name="serviceInterface" value="com.don.remoting.EscortLocationService" />
</bean>

<bean id="escortLocationClient" class="com.don.remoting.EscortLocationClient" >
<property name="escortLocationService" ref="escortLocationServiceClient" />
</bean>

1 comment:

  1. Thanks a lot! I have searched a long time to find the correct port to use my beans over RMI! :)
    Greetings

    ReplyDelete