Tuscany
  1. Tuscany
  2. TUSCANY-3969

RRBJMSBindingInvoker.invoke() should be setting timeout

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: Java-SCA-2.x
    • Fix Version/s: None
    • Component/s: SCA Java Runtime
    • Labels:
      None

      Description

      The RRBJMSBindingInvoker.invoke() isn't setting the JMSTimeToLive timeout value. For example, I might expect to see something like the following in the invoke method:

      Long ttl = jmsBinding.getOperationJMSTimeToLive(operationName);
      if (ttl != null)
      context.setTimeToLive(ttl);
      <followed by additional code to handle two way operations>

        Activity

        Hide
        Greg Dritschler added a comment -

        Suggested fix

        Long ttl = jmsBinding.getOperationJMSTimeToLive(operationName);
        if (ttl != null)
        context.setTimeToLive(ttl);

        // For twoway operations, determine a request timeout.
        // The SCA specs do not address how to do this. We use the following approach.
        // - If JMSTimeToLive is specified, use double that value.
        // Doubling is basically arbitrary. JMSTimeToLive expresses request
        // transmission and queue time. Doubling it allows request execution
        // and response delivery to take up to the same amount of time.
        // Note that explicitly coding a JMSTimeToLive of 0 results in
        // a message that doesn't expire and an indefinite wait.
        // - If JMSTimeToLive is not specified, get the default request
        // timeout from the JMS resource factory and simply use that for the
        // request timeout and JMSTimeToLive value.
        if (!operation.isNonBlocking()) {
        if (ttl != null)

        { context.setRequestTimeout(ttl * 2); }

        else

        { long timeout = jmsResourceFactory.getDefaultRequestTimeout(); context.setRequestTimeout(timeout); context.setTimeToLive(timeout); }

        }

        Show
        Greg Dritschler added a comment - Suggested fix Long ttl = jmsBinding.getOperationJMSTimeToLive(operationName); if (ttl != null) context.setTimeToLive(ttl); // For twoway operations, determine a request timeout. // The SCA specs do not address how to do this. We use the following approach. // - If JMSTimeToLive is specified, use double that value. // Doubling is basically arbitrary. JMSTimeToLive expresses request // transmission and queue time. Doubling it allows request execution // and response delivery to take up to the same amount of time. // Note that explicitly coding a JMSTimeToLive of 0 results in // a message that doesn't expire and an indefinite wait. // - If JMSTimeToLive is not specified, get the default request // timeout from the JMS resource factory and simply use that for the // request timeout and JMSTimeToLive value. if (!operation.isNonBlocking()) { if (ttl != null) { context.setRequestTimeout(ttl * 2); } else { long timeout = jmsResourceFactory.getDefaultRequestTimeout(); context.setRequestTimeout(timeout); context.setTimeToLive(timeout); } }
        Hide
        ant elder added a comment -

        I've committed these changes. They have added new methods on the context and resource factory so i wonder do you have other code that uses those which also needs to be added/updated in Tuscany?

        Show
        ant elder added a comment - I've committed these changes. They have added new methods on the context and resource factory so i wonder do you have other code that uses those which also needs to be added/updated in Tuscany?

          People

          • Assignee:
            Unassigned
            Reporter:
            Jennifer A Thompson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development