I have been working on the following issue: -
https://jira.jboss.org/jira/browse/JBWS-2304
The fundamental problem is that the ThreadLocals are not being cleared when the client
request completes.
The initial fix has been to clear the ThreadLocals once the MessageContextAssociation
stack is empty with a couple of exceptions.
1 - When the MessageContextJAXWS pivots then a flag is needed to avoid clearing the thread
local.
2 - For message style endpoints the ThreadLocal of the Document is used for further
transitions if the SOAPMessage is subsequently accessed, for this the XMLSource now caches
the Document and sets it on the DOMUtils.
http://fisheye.jboss.com/changelog/JBossWS/?cs=8242
http://fisheye.jboss.com/changelog/JBossWS/?cs=8245
Overall I think the mechanism to cache the Document and DocumentBuilder should be
re-factored to possibly associate it with the MessageContext and the message itself so
that it does not need to be in it's own ThreadLocal with a potential for leaks -
however I am not sure if such a bug change would be suitable at the moment.
Anyway I just wanted to see if you have any additional thoughts on this fix before I
commit.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179092#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...