You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by "Toshiro Takase (JIRA)" <ji...@apache.org> on 2006/04/07 15:01:24 UTC
[jira] Updated: (WSCOMMONS-9) Thread safety of
XML{Input|Output}Factory.createXMLStream{Reader|Writer}
[ http://issues.apache.org/jira/browse/WSCOMMONS-9?page=all ]
Toshiro Takase updated WSCOMMONS-9:
-----------------------------------
Attachment: patch.zip
A possible implementation of factory instance pool.
"svn diff" against latest repository and 2 added classes.
I am not sure whether this is the best way or not.
> Thread safety of XML{Input|Output}Factory.createXMLStream{Reader|Writer}
> ------------------------------------------------------------------------
>
> Key: WSCOMMONS-9
> URL: http://issues.apache.org/jira/browse/WSCOMMONS-9
> Project: WS-Commons
> Type: Bug
> Components: AXIOM
> Environment: Windows
> Reporter: Toshiro Takase
> Attachments: patch.zip
>
> In StAXOMBuilder and MTOMXMLStreamWriter (renamed from OMOutputImpl), XML{Input|Output}Factory is created just once now.
> It is great to reuse XMLInputFactory and XMLOutputFactory instance, I think.
> But I am not sure whether XMLInputFactory.createXMLStreamReader() and XMLOutputFactory.createXMLStreamWiter() have thread safety or not.
> It seems that JSR-173 StAX specification does not mention their thread safety.
> IMHO, strictly speaking, these factories can be broken if these methods are called concurrently.
> These methods can be enclosed by synchronized block, or a factory instance pool or something can be made.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira