Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-4765

can't set timeout in message HTTPClientPolicy if it is not set in conduit

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.6.6, 2.7.3
    • Transports
    • None
    • Unknown

    Description

      This code in ClientPolicyCalculator.intersect (previously in PolicyUtils.intersect) tries to combine timeout values from two policies by taking the smaller:

              if (p1.isSetConnectionTimeout() || p2.isSetConnectionTimeout()) {
                  p.setConnectionTimeout(Math.min(p1.getConnectionTimeout(), p2.getConnectionTimeout()));
              }
              if (p1.isSetReceiveTimeout() || p2.isSetReceiveTimeout()) {
                  p.setReceiveTimeout(Math.min(p1.getReceiveTimeout(), p2.getReceiveTimeout()));
              }
      

      Together with HTTPClientPolicy returning hardcoded default timeouts when not set (30000 ms for connect, 60000 for receive), it means that one cannot, eg, set receiveTimeout in a message policy to 2 min, if the timeout is left unset in the conduit.

      Attachments

        Activity

          People

            dkulp Daniel Kulp
            vadimb Vadim Beilin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: