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

Monitor contention at org.apache.cxf.transport.http.Headers

    XMLWordPrintableJSON

Details

    • Unknown

    Description

      Headers.getHttpDateFormat() indirectly calls TimeZone.getTimeZone("GMT"), which calls into JRE lib method causing monitor contention. See screen shot

      Fix by instantiate into static variable.

          private static TimeZone tZone = TimeZone.getTimeZone("GMT");
      
          public static SimpleDateFormat getHttpDateFormat() {
              SimpleDateFormat dateFormat = 
                  new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US);
              dateFormat.setTimeZone(tZone);
              return dateFormat;
          }
      

      Attachments

        1. monitor_contention_headers.png
          218 kB
          Lucas Pouzac

        Activity

          People

            sergey_beryozkin Sergey Beryozkin
            lpouzac Lucas Pouzac
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: