You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org> on 2013/08/09 01:43:48 UTC
[jira] [Resolved] (SYNAPSE-774) loading resources from registry is
not based on synapse.home
[ https://issues.apache.org/jira/browse/SYNAPSE-774?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hiranya Jayathilaka resolved SYNAPSE-774.
-----------------------------------------
Resolution: Fixed
Fix Version/s: (was: 2.1)
NIGHTLY
Applied the proposed fix. Thanks Michal for pointing this out.
> 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