Hello,
I practice SI starting from the "cafe" exemple. Like Alca (thread titled "Remoting version of CafeDemo") I 'd like to use RMI. Everything has worked fine until I added a return value from the Barista (server) to the client (Cafe). In the case the client get the following Exception :
I know that the command goes well to the server because the service-activator (a method in a bean) is executedCode:java.rmi.UnmarshalException: error unmarshalling return; nested exception is: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.springframework.integration.message.MessageExchangeTemplate$TemporaryReturnAddress
Indeed the TemporaryReturnAddress inner class is not serializable but I feel that the problem comes from my work.
Here the client config :
(ps: I deactivate the router / spliiter / all interceptors)Code:<integration:message-bus /> <integration:channel id="orders" /> <integration:channel id="drinks" /> <integration:channel id="returnChannel"> </integration:channel> <integration:channel id="coldDrinks"> </integration:channel> <integration:channel id="hotDrinks" /> <integration:rmi-handler id="rmiTargetColdDrinks" remote-channel="coldDrinks" host="localhost" port="1099" /> <integration:rmi-handler id="rmiTargetHotDrinks"remote-channel="hotDrinks" host="localhost" port="1099" /> <bean id="drinkRouter" class="org.springframework.integration.samples.cafe.DrinkRouter" /> <integration:router input-channel="drinks" ref="drinkRouter" method="resolveDrinkChannel" /> <bean id="orderSplitter" class="org.springframework.integration.samples.cafe.OrderSplitter" /> <integration:splitter input-channel="orders" output-channel="drinks" ref="orderSplitter" method="split" /> <integration:service-activator input-channel="returnChannel" ref="clientRmiInter" method="coldDrinkscb"> </integration:service-activator> <integration:service-activator input-channel="coldDrinks" ref="rmiTargetColdDrinks"> </integration:service-activator> <integration:service-activator input-channel="hotDrinks" ref="rmiTargetHotDrinks" /> <bean id="clientRmiInter" class="org.springframework.integration.samples.cafe.ClientRmiInterceptor" /> <bean id="clientInter" class="org.springframework.integration.samples.cafe.ClientChannelInterceptor" /> <bean id="cafe" class="org.springframework.integration.samples.cafe.Cafe"> <property name="orderChannel" ref="coldDrinks" /> </bean>
(I tried to add an output-channel to coldDrinks service-activator->same behaviour).
Does anyone has an idea that helps ?
Thanks.
P.Herve


Reply With Quote
