Announcement Announcement Module
Collapse
No announcement yet.
Help with RMI Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help with RMI

    Hello all,
    i am trying to integrate RMI into my small Spring Integration application.
    At the moment, in order to send a message to a remote RMI object, i have a channelAdapter
    which injects a spring RMI object.
    I'd like to use an RMI specific channel adapters but i am kind of lost.

    I have an 'rmiChannelAdapter' which subscribes to messages posted on an 'rmiChannel'.
    it injects a 'receveri' service, which is an RMI spring object.

    here's my spring config data
    Code:
    <si:publish-subscribe-channel id="rmiChannel"/>
    
    <si:outbound-channel-adapter channel="rmiChannel" ref="rmiChannelAdapter" method="log">
    </si:outbound-channel-adapter>
    
    <bean id="rmiChannelAdapter" class="com.sample.services.RmiChannelAdapter">
    		<property name="receiver" ref="receiverService"/>
    </bean>
    and here's my 'rmi-context.xm' which defines a remote object
    Code:
    <bean id="receiverService" class="com.sample.services.rmi.ReceiverServiceImpl"/>
    	
    	<bean id ="rmiServer" class="org.springframework.remoting.rmi.RmiServiceExporter">
    		<property name="serviceName" value="ReceiverService"/>
    		<property name="service" ref="receiverService"/>
    		<property name="serviceInterface" value="com.sample.services.rmi.Receiver"/>
    		
    		<!-- defaults to 1099 -->
    		<property name="registryPort" value="1099"/>
    	</bean>
    	
    	<bean id="remoteReceiver" class="org.springframework.remoting.rmi.RmiProxyFactoryBean">
    		<property name="serviceUrl" value="rmi://localhost/ReceiverService"/>
    		<property name="serviceInterface" value="com.sample.services.rmi.Receiver"/>
    	</bean>
    At the moment, for testing purposes, i am running everything on my local machine.

    Could anyone help me out in converting my application to use a Spring RMI Channel Adapter?

    thanks and regards
    marco

  • #2
    Hello all,
    could anyone help me with my RMI problem>?
    At the moment, teh RMI infrastructure is running on my local machine (i guess it shoudl not make any differences ..)

    What i want to do is to post a message to a remote channel where a remote gateway is listening.
    For the moment, messages are unidirectional only.

    How do i create a remote channel?
    How do i specify which method should be called on the rmi-outbound gateway to process messages?

    thanks and regards
    marco

    Comment

    Working...
    X