synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SYNAPSE-774) loading resources from registry is not based on synapse.home
Date Fri, 09 Aug 2013 05:27:49 GMT

    [ https://issues.apache.org/jira/browse/SYNAPSE-774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13734411#comment-13734411
] 

Hudson commented on SYNAPSE-774:
--------------------------------

SUCCESS: Integrated in Synapse - Trunk #4703 (See [https://builds.apache.org/job/Synapse%20-%20Trunk/4703/])
Adding a test for SYNAPSE-774 (hiranya: rev 1512136)
* /synapse/trunk/java/modules/core/src/test/java/org/apache/synapse/config/xml/MultiXMLConfigurationBuilderTest.java

                
> loading resources from registry is not based on synapse.home
> ------------------------------------------------------------
>
>                 Key: SYNAPSE-774
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-774
>             Project: Synapse
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0
>         Environment: tested on windows 
>            Reporter: Michal Stochmialek
>            Assignee: Hiranya Jayathilaka
>            Priority: Minor
>             Fix For: NIGHTLY
>
>
> The issue appears when synapse.home is different from current directory of virtual machine.
> In my case it is when I want to run synapse from maven.
> The problem is in the following method:
> org.apache.synapse.config.xml.RegistryFactory.getProperties
> The method should gather properties from the xml element and add to them topLevelProps.
> This is done by using Properties(Properties) constructor, which doesn't copy all element
> from the argument to the object, but it treats properties from the argument as default
values.
> In result in AbstractRegistry.init method not all properties are copied. Those top level
ones are omitted
> including "synapse.home" property. 
> When you change RegistryFactory.getProperties from:
>     private static Properties getProperties(OMElement elem, Properties topLevelProps)
{
>         Iterator params = elem.getChildrenWithName(PARAMETER_Q);
>         Properties props = new Properties(topLevelProps);
>         while (params.hasNext()) {
> to:
>     private static Properties getProperties(OMElement elem, Properties topLevelProps)
{
>         Iterator params = elem.getChildrenWithName(PARAMETER_Q);
>         Properties props = new Properties();
>         props.putAll(topLevelProps);
>         while (params.hasNext()) {
>   
> ..the issue is gone.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


Mime
View raw message