1. ActiveMQ
  2. AMQ-2027

setUseJmx(false) ignored when creating embedded broker.


    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Not A Problem
    • Affects Version/s: 5.2.0
    • Fix Version/s: 5.2.0
    • Component/s: Broker
    • Labels:
    • Environment:

      Running inside Netbeans environment on a dual-core laptop:
      Product Version: NetBeans IDE 6.1 (Build 200805300101)
      Java: 1.6.0_10; Java HotSpot(TM) Client VM 11.0-b15
      System: Windows XP version 5.1 running on x86; Cp1252; en_GB (nb)


      When creating an embedded broker, the BrokerService setUseJmx(false) method appears to be ignored.

      I was using the URI configuration technique, but even explicit setup calls seem to fail.

      Here's an example setup:

      _broker = new BrokerService();

      When I run the application I get the following messages (note the failure to start the JMX connector at the end):

      09-Dec-2008 16:29:42 start
      INFO: Using Persistence Adapter: AMQPersistenceAdapter(activemq-data\aftestjms)
      09-Dec-2008 16:29:42 start
      INFO: AMQStore starting using directory: activemq-data\aftestjms
      09-Dec-2008 16:29:42 org.apache.activemq.kaha.impl.KahaStore initialize
      INFO: Kaha Store using data directory activemq-data\aftestjms\kr-store\state
      09-Dec-2008 16:29:42 start
      INFO: Active data files: []
      09-Dec-2008 16:29:42 start
      WARNING: The ReferenceStore is not valid - recovering ...
      09-Dec-2008 16:29:42 org.apache.activemq.kaha.impl.KahaStore delete
      INFO: Kaha Store successfully deleted data directory activemq-data\aftestjms\kr-store\data
      09-Dec-2008 16:29:42 recover
      INFO: Journal Recovery Started from: DataManager:(data-)
      09-Dec-2008 16:29:42 recover
      INFO: Recovered 0 operations from redo log in 0.0 seconds.
      09-Dec-2008 16:29:42 start
      INFO: Finished recovering the ReferenceStore
      09-Dec-2008 16:29:42 getBroker
      INFO: ActiveMQ null JMS Message Broker (aftestjms) is starting
      09-Dec-2008 16:29:42 getBroker
      INFO: For help or more information please see:
      09-Dec-2008 16:29:42 org.apache.activemq.kaha.impl.KahaStore initialize
      INFO: Kaha Store using data directory activemq-data\aftestjms\kr-store\data
      09-Dec-2008 16:29:42 start
      INFO: ActiveMQ JMS Message Broker (aftestjms, ID:LT-BAS-EN-05004-1199-1228840182685-0:0) started
      09-Dec-2008 16:29:42 start
      INFO: Connector vm://aftestjms Started
      Waiting for messages...
      09-Dec-2008 16:29:45$1 run
      WARNING: Failed to start jmx connector: Cannot bind to URL [rmi://localhost:1099/jmxrmi]: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is: Connection refused: connect]

      I will attach a sample java souce file.



          • Assignee:
            Tim Harris
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: