Wicket
  1. Wicket
  2. WICKET-3874

RequestLogger#getRequests throws concurrentmodificationexceptions when used

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5-RC5.1
    • Fix Version/s: 1.5-RC6
    • Component/s: wicket
    • Labels:
      None

      Description

      The getRequests() method of the request logger doesn't work at all. It returns a synchronized list which is wrapped in a unmodifiable list. The contents of the list is linked list, so whenever you are iterating over the unmodifiable list, the request logger is updating the underlying linked list—causing ConcurrentModificationExceptions.

      At topicus we worked around this by using a rounded buffer in the request logger instead of the linked list. This implementation brings improved statistics to the request logger, such as average request times across the monitored interval and requests per minute.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        1m 18s 1 Martijn Dashorst 06/Jul/11 10:05
        Martijn Dashorst made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Martijn Dashorst made changes -
        Assignee Martijn Dashorst [ dashorst ]
        Martijn Dashorst made changes -
        Field Original Value New Value
        Description The getRequests() method of the request logger doesn't work at all. It returns a synchronized list which is wrapped in a unmodifiable list. The contents of the list is linked list, so whenever you are iterating over the unmodifiable list, the request logger is updating the underlying linked list—causing ConcurrentModificationExceptions.

        At topicus we worked around this by using a rounded buffer in the request logger instead of the linked list. This implementation brings improved statistics to the request logger, such as average request times across the monitored interval.
        The getRequests() method of the request logger doesn't work at all. It returns a synchronized list which is wrapped in a unmodifiable list. The contents of the list is linked list, so whenever you are iterating over the unmodifiable list, the request logger is updating the underlying linked list—causing ConcurrentModificationExceptions.

        At topicus we worked around this by using a rounded buffer in the request logger instead of the linked list. This implementation brings improved statistics to the request logger, such as average request times across the monitored interval and requests per minute.
        Martijn Dashorst created issue -

          People

          • Assignee:
            Martijn Dashorst
            Reporter:
            Martijn Dashorst
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development