You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "Andreas Veithen (JIRA)" <ji...@apache.org> on 2008/06/30 19:01:45 UTC

[jira] Created: (SYNAPSE-382) Provide access to SynapseConfiguration and ConfigurationContext through SynapseEnvironment

Provide access to SynapseConfiguration and ConfigurationContext through SynapseEnvironment
------------------------------------------------------------------------------------------

                 Key: SYNAPSE-382
                 URL: https://issues.apache.org/jira/browse/SYNAPSE-382
             Project: Synapse
          Issue Type: Improvement
          Components: Core
    Affects Versions: 1.2
         Environment: N/A
            Reporter: Andreas Veithen
            Priority: Minor


When the init method on a Startup (or any other object implementing ManagedLifecycle) is called it receives only a reference to the SynapseEnvironment. From there it is not possible to directly retrieve the corresponding SynapseConfiguration object. Neither it is possible to easily get access to Axis2's ConfigurationContext (assuming that the SynapseEnvironment implementation is Axis2SynapseEnvironment). However it is possible to get references to these two objects by creating a new MessageContext:

for SynapseConfiguration: synEnv.createMessageContext().getConfiguration()
for ConfigurationContext: ((Axis2MessageContext)synEnv.createMessageContext()).getAxis2MessageContext().getConfigurationContext()

If using that workaround it is possible to get the SynapseConfiguration and ConfigurationContext from a (Axis2)SynapseEnvironment anyway, then there is no reason to hide these objects and we should expose them cleanly by adding a getSynapseConfiguration() method to SynapseEnvironment and a getConfigurationContext() method to Axis2SynapseEnvironment.

-- 
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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Assigned: (SYNAPSE-382) Provide access to SynapseConfiguration and ConfigurationContext through SynapseEnvironment

Posted by "Ruwan Linton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-382?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ruwan Linton reassigned SYNAPSE-382:
------------------------------------

    Assignee: Ruwan Linton

> Provide access to SynapseConfiguration and ConfigurationContext through SynapseEnvironment
> ------------------------------------------------------------------------------------------
>
>                 Key: SYNAPSE-382
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-382
>             Project: Synapse
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.2
>         Environment: N/A
>            Reporter: Andreas Veithen
>            Assignee: Ruwan Linton
>            Priority: Minor
>
> When the init method on a Startup (or any other object implementing ManagedLifecycle) is called it receives only a reference to the SynapseEnvironment. From there it is not possible to directly retrieve the corresponding SynapseConfiguration object. Neither it is possible to easily get access to Axis2's ConfigurationContext (assuming that the SynapseEnvironment implementation is Axis2SynapseEnvironment). However it is possible to get references to these two objects by creating a new MessageContext:
> for SynapseConfiguration: synEnv.createMessageContext().getConfiguration()
> for ConfigurationContext: ((Axis2MessageContext)synEnv.createMessageContext()).getAxis2MessageContext().getConfigurationContext()
> If using that workaround it is possible to get the SynapseConfiguration and ConfigurationContext from a (Axis2)SynapseEnvironment anyway, then there is no reason to hide these objects and we should expose them cleanly by adding a getSynapseConfiguration() method to SynapseEnvironment and a getConfigurationContext() method to Axis2SynapseEnvironment.

-- 
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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Commented: (SYNAPSE-382) Provide access to SynapseConfiguration and ConfigurationContext through SynapseEnvironment

Posted by "Ruwan Linton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12609771#action_12609771 ] 

Ruwan Linton commented on SYNAPSE-382:
--------------------------------------

Added the getSynapseConfiguration method to the SynapseEnvironment interface while adding the getAxis2ConfigurationContext method into the Axis2SynapseEnvironment because it is specific to Axis2.

> Provide access to SynapseConfiguration and ConfigurationContext through SynapseEnvironment
> ------------------------------------------------------------------------------------------
>
>                 Key: SYNAPSE-382
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-382
>             Project: Synapse
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.2
>         Environment: N/A
>            Reporter: Andreas Veithen
>            Assignee: Ruwan Linton
>            Priority: Minor
>
> When the init method on a Startup (or any other object implementing ManagedLifecycle) is called it receives only a reference to the SynapseEnvironment. From there it is not possible to directly retrieve the corresponding SynapseConfiguration object. Neither it is possible to easily get access to Axis2's ConfigurationContext (assuming that the SynapseEnvironment implementation is Axis2SynapseEnvironment). However it is possible to get references to these two objects by creating a new MessageContext:
> for SynapseConfiguration: synEnv.createMessageContext().getConfiguration()
> for ConfigurationContext: ((Axis2MessageContext)synEnv.createMessageContext()).getAxis2MessageContext().getConfigurationContext()
> If using that workaround it is possible to get the SynapseConfiguration and ConfigurationContext from a (Axis2)SynapseEnvironment anyway, then there is no reason to hide these objects and we should expose them cleanly by adding a getSynapseConfiguration() method to SynapseEnvironment and a getConfigurationContext() method to Axis2SynapseEnvironment.

-- 
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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Resolved: (SYNAPSE-382) Provide access to SynapseConfiguration and ConfigurationContext through SynapseEnvironment

Posted by "Ruwan Linton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-382?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ruwan Linton resolved SYNAPSE-382.
----------------------------------

       Resolution: Fixed
    Fix Version/s: NIGHTLY

Fixed on the svn trunk

> Provide access to SynapseConfiguration and ConfigurationContext through SynapseEnvironment
> ------------------------------------------------------------------------------------------
>
>                 Key: SYNAPSE-382
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-382
>             Project: Synapse
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.2
>         Environment: N/A
>            Reporter: Andreas Veithen
>            Assignee: Ruwan Linton
>            Priority: Minor
>             Fix For: NIGHTLY
>
>
> When the init method on a Startup (or any other object implementing ManagedLifecycle) is called it receives only a reference to the SynapseEnvironment. From there it is not possible to directly retrieve the corresponding SynapseConfiguration object. Neither it is possible to easily get access to Axis2's ConfigurationContext (assuming that the SynapseEnvironment implementation is Axis2SynapseEnvironment). However it is possible to get references to these two objects by creating a new MessageContext:
> for SynapseConfiguration: synEnv.createMessageContext().getConfiguration()
> for ConfigurationContext: ((Axis2MessageContext)synEnv.createMessageContext()).getAxis2MessageContext().getConfigurationContext()
> If using that workaround it is possible to get the SynapseConfiguration and ConfigurationContext from a (Axis2)SynapseEnvironment anyway, then there is no reason to hide these objects and we should expose them cleanly by adding a getSynapseConfiguration() method to SynapseEnvironment and a getConfigurationContext() method to Axis2SynapseEnvironment.

-- 
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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Commented: (SYNAPSE-382) Provide access to SynapseConfiguration and ConfigurationContext through SynapseEnvironment

Posted by "Ruwan Linton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12609423#action_12609423 ] 

Ruwan Linton commented on SYNAPSE-382:
--------------------------------------

I was also having the same problem and used the above defined approach to get the SynapseConfiguration. But I must say that there is a reason why this has not been exposed to the outsiders.

When you are calling the init methods of mediators (for instance) the Synapse Configuration is not fully built. For example if you have 4 sequences in the configuration while building the first sequence the rest of the three sequences are not registered with the SynapseConfiguration. So I would say we enable this (I mean give the accessors) but this has to be used with care, specially on the init methods. 

Any way, there is no point in hiding this because the above described approach by andreas, gives the access to it but it is just ugly to get the access to SynapseConfiguration in that way.

> Provide access to SynapseConfiguration and ConfigurationContext through SynapseEnvironment
> ------------------------------------------------------------------------------------------
>
>                 Key: SYNAPSE-382
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-382
>             Project: Synapse
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.2
>         Environment: N/A
>            Reporter: Andreas Veithen
>            Priority: Minor
>
> When the init method on a Startup (or any other object implementing ManagedLifecycle) is called it receives only a reference to the SynapseEnvironment. From there it is not possible to directly retrieve the corresponding SynapseConfiguration object. Neither it is possible to easily get access to Axis2's ConfigurationContext (assuming that the SynapseEnvironment implementation is Axis2SynapseEnvironment). However it is possible to get references to these two objects by creating a new MessageContext:
> for SynapseConfiguration: synEnv.createMessageContext().getConfiguration()
> for ConfigurationContext: ((Axis2MessageContext)synEnv.createMessageContext()).getAxis2MessageContext().getConfigurationContext()
> If using that workaround it is possible to get the SynapseConfiguration and ConfigurationContext from a (Axis2)SynapseEnvironment anyway, then there is no reason to hide these objects and we should expose them cleanly by adding a getSynapseConfiguration() method to SynapseEnvironment and a getConfigurationContext() method to Axis2SynapseEnvironment.

-- 
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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org