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

Alex Rudyy commented on QPID-7486:
----------------------------------

Rob,
A commit under revision [ https://svn.apache.org/r1767592 ] introduced a 
backward incompatibility when initial configuration is overridden in 
system.properties and set there as a relative path.
With code before BrokerOptions#getInitialConfigurationLocation() was converting 
that path into URL from classpath:
{code}
public String getInitialConfigurationLocation()
    {
        if(_initialConfigurationLocation == null)
        {
            String overriddenDefaultConfigurationLocation = 
System.getProperty("qpid.initialConfigurationLocation");
            if (overriddenDefaultConfigurationLocation != null)
            {
                URL resource = 
BrokerOptions.class.getClassLoader().getResource(overriddenDefaultConfigurationLocation);
                if (resource == null)
                {
                    throw new IllegalArgumentException(String.format("Initial 
configuration '%s' is not found",
                                                                          
overriddenDefaultConfigurationLocation));
                }
                return resource.toExternalForm();
            }
            return DEFAULT_INITIAL_CONFIG_LOCATION;
        }

        return _initialConfigurationLocation;
    }
{code}
As result, initial configuration was passed into Main#copyInitialConfigFile as 
jar url containing the exact location of the file. With current approach the 
conversion of the overridden path into url does not happen and Broker fails to 
locate the initial configuration.
Perhaps, AbstractSystemConfig can be changed to convert 
overriddenDefaultConfigurationLocation into URL in 
AbstractSystemConfig#updateAttributes similar to logic in 
BrokerOptions#getInitialConfigurationLocation() 


> [Java Broker] Refactor broker startup code, remove BrokerOptions
> ----------------------------------------------------------------
>
>                 Key: QPID-7486
>                 URL: https://issues.apache.org/jira/browse/QPID-7486
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Java Broker
>            Reporter: Rob Godfrey
>            Assignee: Rob Godfrey
>             Fix For: qpid-java-6.2
>
>
> The code relating to the initial construction of the broker has evolved over 
> time leaving functionality spread across a number of different classes with 
> no clear division of responsibilities.
> Refactor so that Main in the broker module has responsibility for parsing of 
> command line arguments and conversion into SystemConfig attributes, as well 
> as providing the hooks into the desired logging provider.
> SystemLauncher (renamed from Broker) provides a thin layer of state 
> management (shutdown/startup) on top of the SystemConfig configured object.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to