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

Improve error handling in TransportServiceInterceptor.invoke()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Java-SCA-2.x
    • Java-SCA-2.x
    • SCA Java Runtime
    • None

    Description

      In the TransportServiceInterceptor,invoke method, in the first catch block (corresponding to calling invokeResponse), if there is an error or runtime exception, this should be re-thrown. This allows transacted messages to be rolled back.

      Also, in the finally block, a new try/catch block should be added around "((JMSBindingContext)msg.getBindingContext()).closeJmsResponseSession();", so if an error is thrown the resource factory can be used to close the connection:

      try

      { ((JMSBindingContext)msg.getBindingContext()).closeJmsResponseSession(); }

      catch (Throwable t) {
      }
      // Use the resource factory in the binding context to close the response connection,
      // to ensure we use same resource factory used to close response session.
      JMSResourceFactory rf = ((JMSBindingContext)msg.getBindingContext()).getJmsResourceFactory();
      if (rf.isConnectionClosedAfterUse())
      rf.closeResponseConnection();

      Attachments

        Activity

          People

            Unassigned Unassigned
            jennthom Jennifer Thompson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: