Performance improvement in AddressingOutHandler
-----------------------------------------------
Key: AXIS2-4824
URL: https://issues.apache.org/jira/browse/AXIS2-4824
Project: Axis2
Issue Type: Improvement
Components: Addressing
Reporter: Katherine Sanders
Priority: Minor
Revisions 631988 and 829832 added support for support for disabling the
WS-Addressing outbound handler using a parameter in module.xml.
This impacts performance in
org.apache.axis2.handlers.addressing.AddressingOutHandler#invoke because the
code changed from:
//determine whether outbound addressing has been disabled or not.
boolean disableAddressing =
msgContext.isPropertyTrue(DISABLE_ADDRESSING_FOR_OUT_MESSAGES,
this.disableAddressing);
to:
//determine whether outbound addressing has been disabled or not.
// Get default value from module.xml or axis2.xml files
Parameter param = msgContext.getModuleParameter(
DISABLE_ADDRESSING_FOR_OUT_MESSAGES, MODULE_NAME, handlerDesc);
boolean disableAddressing =
msgContext.isPropertyTrue(DISABLE_ADDRESSING_FOR_OUT_MESSAGES,
JavaUtils.isTrueExplicitly(Utils.getParameterValue(param)));
The call to MessageContext#getModuleParameter is quite expensive but this is
only used to find a default value in case it is not set in the MessageContext.
When there is a value in the MessageContext, the extra work is unnecessary.
This jira should be used to reverse the logic in AddressingOutHandler so we
only call getModuleParameter if the value is not set in the MessageContext.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]