[
https://issues.apache.org/jira/browse/WSCOMMONS-461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andreas Veithen updated WSCOMMONS-461:
--------------------------------------
Description:
The problem:
Axis2 uses StAXUtils to get XMLInputFactory and XMLOutputFactory instances. In
general the user has no control over the properties that are set on these
factories, though this would sometimes be desirable, e.g. to control how CDATA
sections are handled (see e.g. SYNAPSE-280). Actually code using StAXUtils
should not modify any properties on the factories: since they are cached, this
could have undesirable side effects.
Proposed solution:
Let StAXUtils look for property files with well defined names
(XMLInputFactory.properties and XMLOutputFactory.properties) in the classpath,
using the same classloader as the one from which the factory is loaded (by
default this is the context classloader). The content of these files would then
be used to initialize the factory properties. This mechanism would allow the
user to easily apply a custom factory configuration to a given instance of
Axis2 or Synapse. Since StAXUtils caches created factories, the overhead
introduced by this feature is minimal.
was:
The problem:
Axis2 uses StAXUtils to get XMLInputFactory and XMLOutputFactory instances. In
general the user has no control over the properties that are set on these
factories, though this would sometimes be desirable, e.g. to control how CDATA
sections are handled (see e.g. SYNAPSE-280). Actually code using StAXUtils
should not modify any properties on the factories: since they are cached, this
could have undesirable side effects.
Proposed solution:
Let StAXUtils look for property files with well defined names
(XMLInputFactory.properties and XMLOutputFactory.properties) in the classpath,
using the same classloader as the one from which the factory is loaded (by
default this is the context classloader). The content of these files would then
be used to initialize the factory properties. This mechanism would allow the
user to easily apply a custom factory configuration to a given instance of
Axis2 or Synapse.
> Allow StAXUtils to apply properties to XMLInputFactory and XMLOutputFactory
> ---------------------------------------------------------------------------
>
> Key: WSCOMMONS-461
> URL: https://issues.apache.org/jira/browse/WSCOMMONS-461
> Project: WS-Commons
> Issue Type: Improvement
> Components: AXIOM
> Reporter: Andreas Veithen
> Assignee: Andreas Veithen
> Priority: Minor
> Fix For: Axiom 1.2.9
>
>
> The problem:
> Axis2 uses StAXUtils to get XMLInputFactory and XMLOutputFactory instances.
> In general the user has no control over the properties that are set on these
> factories, though this would sometimes be desirable, e.g. to control how
> CDATA sections are handled (see e.g. SYNAPSE-280). Actually code using
> StAXUtils should not modify any properties on the factories: since they are
> cached, this could have undesirable side effects.
> Proposed solution:
> Let StAXUtils look for property files with well defined names
> (XMLInputFactory.properties and XMLOutputFactory.properties) in the
> classpath, using the same classloader as the one from which the factory is
> loaded (by default this is the context classloader). The content of these
> files would then be used to initialize the factory properties. This mechanism
> would allow the user to easily apply a custom factory configuration to a
> given instance of Axis2 or Synapse. Since StAXUtils caches created factories,
> the overhead introduced by this feature is minimal.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.