Uploaded image for project: 'Tuscany'
  1. Tuscany
  2. TUSCANY-3348

PERF: handleCallback is not optimized

    XMLWordPrintableJSON

Details

    Description

      The following change in JDKInvocationHandler.handleCallback() improves performance when callback is not defined.

      From:
      -----------------------------------
      private void handleCallback(Message msg, RuntimeWire wire, Object currentConversationID)
      throws TargetResolutionException {
      ReferenceParameters parameters = msg.getFrom().getReferenceParameters();
      parameters.setCallbackID(getCallbackID());
      if (msg.getFrom() == null || msg.getFrom().getCallbackEndpoint() == null)

      { return; }

      parameters.setCallbackReference(msg.getFrom().getCallbackEndpoint());
      ------------------------------------


      To:
      ------------------------------------
      private void handleCallback(Message msg, RuntimeWire wire, Object currentConversationID)
      throws TargetResolutionException {
      if (msg.getFrom() == null || msg.getFrom().getCallbackEndpoint() == null) { return; }

      ReferenceParameters parameters = msg.getFrom().getReferenceParameters();
      parameters.setCallbackID(getCallbackID());

      parameters.setCallbackReference(msg.getFrom().getCallbackEndpoint());
      -------------------------------------

      Attachments

        Activity

          People

            rfeng Zhaohui Feng
            asundar Hasan Muhammad
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: