ActiveMQ
  1. ActiveMQ
  2. AMQ-2027

setUseJmx(false) ignored when creating embedded broker.

    Details

    • 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:
      None
    • 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)

      Description

      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();
      _broker.setBrokerName("testjms");
      _broker.setPersistent(false);
      _broker.setUseJmx(false);
      _broker.addConnector("tcp://localhost:61616");
      _broker.start();

      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 org.apache.activemq.broker.BrokerService start
      INFO: Using Persistence Adapter: AMQPersistenceAdapter(activemq-data\aftestjms)
      09-Dec-2008 16:29:42 org.apache.activemq.store.amq.AMQPersistenceAdapter 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 org.apache.activemq.store.amq.AMQPersistenceAdapter start
      INFO: Active data files: []
      09-Dec-2008 16:29:42 org.apache.activemq.store.amq.AMQPersistenceAdapter 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 org.apache.activemq.store.amq.AMQPersistenceAdapter recover
      INFO: Journal Recovery Started from: DataManager:(data-)
      09-Dec-2008 16:29:42 org.apache.activemq.store.amq.AMQPersistenceAdapter recover
      INFO: Recovered 0 operations from redo log in 0.0 seconds.
      09-Dec-2008 16:29:42 org.apache.activemq.store.amq.AMQPersistenceAdapter start
      INFO: Finished recovering the ReferenceStore
      09-Dec-2008 16:29:42 org.apache.activemq.broker.BrokerService getBroker
      INFO: ActiveMQ null JMS Message Broker (aftestjms) is starting
      09-Dec-2008 16:29:42 org.apache.activemq.broker.BrokerService getBroker
      INFO: For help or more information please see: http://activemq.apache.org/
      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 org.apache.activemq.broker.BrokerService start
      INFO: ActiveMQ JMS Message Broker (aftestjms, ID:LT-BAS-EN-05004-1199-1228840182685-0:0) started
      09-Dec-2008 16:29:42 org.apache.activemq.broker.TransportConnector start
      INFO: Connector vm://aftestjms Started
      Waiting for messages...
      09-Dec-2008 16:29:45 org.apache.activemq.broker.jmx.ManagementContext$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:
      java.net.ConnectException: Connection refused: connect]

      I will attach a sample java souce file.

        Activity

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development