Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-443

Javadoc State Thread Safety Level PayloadEndpoint Implementers Must Support

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.4
    • Fix Version/s: 1.5.5
    • Component/s: Documentation
    • Labels:
      None

      Description

      Please update the JavaDoc for org.springframework.ws.server.endpoint.PayloadEndpoint to explicitly state the level of thread safety it supports. See reference below. After reading through the spring-ws reference manual and forums, I think I've confirmed that endpoint instances are shared by multiple threads (one thread per request).

      Wellings "Concurrent and Real-Time Programming" section 4.8, document's Bloch's Thread Safety Levels...

      "To aid the construction of concurrent Java programs, it is necessary for classes to document clearly the level of thread safety they support. Bloch (Bloch, 2001) has suggested the following levels:
      • Immutable. Instances of the class are constant and cannot be changed. There are, therefore, no thread safety issues. The String class is a good example of an immutable class.
      • Thread-safe. Instances of the class are mutable but they can be used safely in a concurrent environment. All methods provided by the class are properly synchronized either at the interface level or internally within the method. The java.util.Timer class presented in Section 4.4 is an example of a thread-safe class with internal synchronization.
      • Conditionally thread-safe. Instances of the class either have methods that are thread-safe or have methods that are called in sequence with the lock held by the caller. The SharedCoordinate class given in Section 3.1 is an example of a conditionally thread-safe class.
      • Thread-compatible. Instances of the class provide no synchronization. However, instances of the class can be safely used in a concurrent environment, if the caller provides the synchronization by surrounding each method (or sequence of method calls) with the appropriate lock.
      • Thread-hostile. Instances of the class should not be used in a concurrent environment even if the caller provides external synchronization. Ideally, classes should not be written that are thread-hostile. Typically a thread-hostile class is accessing static data or the external environment."

        Activity

        buzz3791 Brian Brooks created issue -
        arjen.poutsma Arjen Poutsma made changes -
        Field Original Value New Value
        Fix Version/s 1.5.5 [ 11067 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        arjen.poutsma Arjen Poutsma made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            arjen.poutsma Arjen Poutsma
            Reporter:
            buzz3791 Brian Brooks
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: