Uploaded image for project: 'Spring Integration'
  1. Spring Integration
  2. INT-3031

RmiOutboundGateway does not correctly check if the original outgoing message had an "errorChannel" header

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 2.2.3
    • Fix Version/s: 2.2.4, 3.0 M3
    • Component/s: None
    • Labels:

      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}" />
      

        Attachments

          Activity

            People

            • Assignee:
              grussell Gary Russell
              Reporter:
              jfai Jürgen Failenschmid
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: