Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Complete
-
2.2.3
-
None
Description
If an exception is propagated from RmiInboundGateway to RmiOutboundGateway, the exception is always sent to the special channel "errorChannel". RmiOutboundGateway does not correctly check if the original outgoing message had an "errorChannel" header.
The exception propagates just fine, but RmiOutboundGateway's exception handling always ignores the header "errorChannel" of the outgoing message. Instead, all exceptions are routed to the special "errorChannel". I think the intention of the code is (or should be) to first check the "errorChannel" header, and only if the header is missing, route to the default error channel.
For example, it should be sufficient to configure this pair of RMI gateways in the two JVMs and a server-side exception should be routed to the channel specified in the outgoing message's "errorChannel" header.
Client:
<si-rmi:outbound-gateway request-channel="xmlRequestChannel" reply-channel="rmiReplyChannel" remote-channel="rmiInboundChannel" host="${java.rmi.server.hostname:localhost}" port="${rmi.registry.port:0}" <si:poller fixed-delay="100" receive-timeout="60000" /> </si-rmi:outbound-gateway>
Server:
<si-rmi:inbound-gateway id="rmiInboundGateway" request-channel="rmiInboundChannel" registry-port="${rmi.registry.port:0}" />