Brett Delle Grazie created AMQ-4894:
---------------------------------------

             Summary: JSVC can only start the default xbean:activemq.xml
                 Key: AMQ-4894
                 URL: https://issues.apache.org/jira/browse/AMQ-4894
             Project: ActiveMQ
          Issue Type: Bug
    Affects Versions: 5.9.0
            Reporter: Brett Delle Grazie
            Priority: Minor


class org.apache.activemq.console.ActiveMQLauncher
which is used by JSVC to bootstrap ActiveMQ can only start using a default 
listener as defined in:
org.apache.activemq.console.command.StartCommand

which is currently: DEFAULT_CONFIG_URI = "xbean:activemq.xml"

Any attempt to supply parameters of any sort results in an 
UnsupportedOperationException.

Root Cause:
ActiveMQLauncher takes a reference to the read only command line parameters 
array via DaemonContext (part of commons-daemon) and passes them to 
StartCommand. StartCommand attempts to modify the command line during 
processing resulting in an UnsupportedOperationException.

The simplest way to resolve this is to make a mutable copy of the command line 
parameters in ActiveMQLauncher

Alternatively fix StartCommand so that it either:
a) Does not modify the command line during processing
b) Uses a command line parsing tool (e.g. JOpt Simple or similar)

Some benefit could be had by aligning the two main activemq start techniques 
(jsvc via ActiveMQLauncher and tanuki service wrapper via 
org.apache.activemq.console.Main) and their command line parsing processes so 
the behaviour is as close to identical as possible.




--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to