title: jmx doesnt seem to be working with activeMQ
body: <p>I'm trying to use JMX with activeMQ for monitoring so far I've been using <a href="http://activemq.apache.org/jmx.html" rel="nofollow noreferrer">this</a> and <a href="https://www.appdynamics.com/community/exchange/extension/activemq-monitoring-extension/" rel="nofollow noreferrer">this</a> as a reference but so far I'm unable to connect to jmx remotely and also I don't see any mention of jmx url in activemq logs. I'm wondering if there is another way to make sure jmx is working? is it supposed to be indicated in activemq logs? 
  PS I'm using jdk1.7 and activeMQ 5.14.2.</p>
  
  <p>Thanks in advance!</p>
  
  <p>EDIT</p>
  
  <p>I set useJmx="true" in my activemq.xml file:</p>
  
  <pre><code>&lt;broker xmlns="http://activemq.apache.org/schema/core" brokerName="primary" useJmx="true" dataDirectory="${activemq.data}"&gt;
  </code></pre>
  
  <p>I tried two steps:</p>
  
  <h1>FIRST</h1>
  
  <p>I tried changing management context from createConnector="false" to :</p>
  
  <pre><code>&lt;managementContext&gt;
     &lt;managementContext createConnector="true" connectorPort="1099"/&gt;
  &lt;/managementContext&gt;
  </code></pre>
  
  <h1>FOR FIRST TIME THE PORT IS OPEN AND ACTIVEMQ RUNS FINE AND JMX URL GETS REPORTED IN LOGS ALTHOUGH I CAN NOT CONNECT IT TO IT REMOTLEY BUT IM ASSUMING ITS WORKING</h1>
  
  <h1>SECOND</h1>
  
  <p>I reverted back the changes I made for managmentContext and I tried setting:</p>
  
  <pre><code>ACTIVEMQ_SUNJMX_START="-Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_BASE}/jmx.password -Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_BASE}/jmx.access"
  </code></pre>
  
  <p>in bin/activemq script and I set a username in conf/jmx.access file as:</p>
  
  <pre><code>admin readwrite
  </code></pre>
  
  <p>And also have set a password in conf/jmx.password:</p>
  
  <pre><code>admin activemq
  </code></pre>
  
  <blockquote>
    <p>NOW ACTIVEMQ IS NOT RUNNINT AT ALL BUT IT WILL RUN IF I SET
    AUTHENTICATE=FALSE AND DELETE JMX.ACCESS AND JMX.PASSWORD
    CONFIGURATION IN BIN/ACTIVEMQ FILE BUT I NEED USER NAME AND PASSWORD
    FOR SECURITY REASONS
    I found this <a href="https://stackoverflow.com/questions/21295915/activemq-shutdown-fails-and-then-kills-process">post</a> which has the exact same issue as mine. any ideas? </p>
  </blockquote>