axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Calvin R Smith (JIRA)" <>
Subject [jira] Commented: (AXIS2-4137) getAxisConfiguration cannot be called twice
Date Mon, 01 Dec 2008 23:08:46 GMT


Calvin R Smith commented on AXIS2-4137:

What I would like to do is set some parameter's upon creation:

AxisConfigurator axisConfigurator = new MyAxisConfigurator(axis2XmlUrl, null);
AxisConfiguration axisConfig = axisConfigurator.getAxisConfiguration();
axisConfig.addParameter("param1", param1);
configurationContext = ConfigurationContextFactory.createConfigurationContext(axisConfigurator);

However, ConfigurationContextFactory.createConfigurationContext calls getAxisConfiguration
which recreates the AxisConfiguration thus killing my added parameter.

Now of course you could do:
configurationContext = ConfigurationContextFactory.createConfigurationContextFromURIs(axis2XmlUrl,null);
AxisConfiguration axisConfig = configurationContext.getAxisConfiguration();
axisConfig.addParameter("param1", param1);

However, this adds the parameter after the ConfigurationContext is created.  Now let's say
you have a TransportSender that wants to use the added parameter in it's init method.  TransportSender.init
is called from ConfigurationContextFactory so the parameter will not be available yet.

> getAxisConfiguration cannot be called twice
> -------------------------------------------
>                 Key: AXIS2-4137
>                 URL:
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: 1.4.1
>            Reporter: Calvin R Smith
>         Attachments: patch-01.txt
> It is not possible to call getAxisConfiguration twice since each time after the first
time the method is called it creates a new AxisConfiguration from scratch instead of just
returnign the one created last time

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:
For additional commands, e-mail:

View raw message