axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Calvin R Smith (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (AXIS2-4137) getAxisConfiguration cannot be called twice
Date Tue, 02 Dec 2008 00:49:44 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-4137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12652197#action_12652197
] 

crsscl edited comment on AXIS2-4137 at 12/1/08 4:48 PM:
----------------------------------------------------------------

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

AxisConfigurator axisConfigurator = new URLBasedAxisConfigurator(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.



      was (Author: crsscl):
    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: https://issues.apache.org/jira/browse/AXIS2-4137
>             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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message