[SWS-443] Javadoc State Thread Safety Level PayloadEndpoint Implementers Must Support Created: 31/Oct/08 Updated: 04/May/12 Resolved: 01/Nov/08
|Project:||Spring Web Services|
|Reporter:||Brian Brooks||Assignee:||Arjen Poutsma|
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
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:
|Comment by Brian Brooks [ 31/Oct/08 ]|
Adding the same information to the JavaDoc for
would be great too.
|Comment by Arjen Poutsma [ 01/Nov/08 ]|
PayloadEndpoint is an interface, I cannot define the level of thread safety it supports. That really depends on the implementing class. That said, any endpoint (as any other Spring Bean) is scoped as a singleton by default, i.e. one instance of the bean definition is created per container. Being a singleton implies that more than one thread can use it, so it has to be thread safe. If you want to use a different scope, such as prototype, see
I will also add a little note to the documentation about endpoints being Spring singletons by default. Also, all abstract base classes (like AbstractDomPayloadEndpoint etc) are thread safe.
|Comment by Arjen Poutsma [ 04/May/12 ]|
Closing old issues