Uploaded image for project: 'JBoss Remoting (3+)'
  1. JBoss Remoting (3+)
  2. REM3-11

RequestContextImpl is unable to send an exception thrown while sending a reply

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • 3.1.0.Beta3
    • 3.1.0.Beta2
    • None

      In org.jboss.remoting3.test.remote.RemoteMessageHandlerTestCase, test method testReplyExceptionAbort() (currently commented) sends an exception over the wire, and the request listener sends it back. But on the return trip, the exception's writeObject() method throws an exception. So

      1. RequestContextImpl.sendReply() calls OutboundReplyHandler.sendReply() to write the exception for its return trip

      2. OutboundReplyHandler.sendReply() tries to write the exception

      2. the exception's writeObject() throws an exception

      3. RequestContextImpl.sendReply() catches the exception and calls

      SpiUtils.safeHandleException(replyHandler, new RemoteReplyException("Remote reply failed", e));

      4. SpiUtils.safeHandleException() calls OutboundReplyHandler.handleException().

      The problem is that the call to OutboundReplyHandler.sendReply() sets OutboundReplyHandler.done to true, and the call to OutboundReplyHandler.handleException() turns into a no-op.

            Unassigned Unassigned
            rsigal@redhat.com Ronald Sigal
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: