Package org.apache.activemq.broker

Examples of org.apache.activemq.broker.BrokerService.stop()


        broker = createBroker("org/apache/activemq/config/config.xml");
        try {
            assertEquals("Broker Config Error (brokerName)", "brokerXmlConfigHelper", broker.getBrokerName());
        } finally {
            if (broker != null) {
                broker.stop();
            }
        }
    }

    /*
 
View Full Code Here


        BrokerService broker = new BrokerService();
        broker.setPersistent(false);
        broker.addConnector("tcp://localhost:61616");
        broker.start();
        assertTrue("has got connection", gotConnection.await(200, TimeUnit.MILLISECONDS));
        broker.stop();
    }
}
View Full Code Here

            ex.printStackTrace();
        }

        stompConnection.sendFrame("DISCONNECT\n\n");
        stompConnection.close();
        broker.stop();

        LOG.info("Total messages received: " + messagesCount);
        assertTrue("Messages received after connection loss: " + messagesCount, messagesCount >= 2000);

        // The first ack messages has no chance complete, so we receiving more
View Full Code Here

        for (int i=0; i<numRestarts; i++) {      
            networkedBroker = createNetworkedBroker();
            networkedBroker.start();
            assertEquals(1, countMbeans(networkedBroker, "NetworkBridge", 2000));
            assertEquals(1, countMbeans(broker, "Connection"));
            networkedBroker.stop();
            networkedBroker.waitUntilStopped();
            assertEquals(0, countMbeans(networkedBroker, "stopped"));
        }
       
        assertEquals(0, countMbeans(networkedBroker, "NetworkBridge"));
View Full Code Here

            broker = createBroker();
            broker.start();
            assertEquals(1, countMbeans(networkedBroker, "NetworkBridge", 5000));
            assertEquals("restart number: " + i, 1, countMbeans(broker, "Connection", 10000));
           
            broker.stop();
            broker.waitUntilStopped();
            assertEquals(0, countMbeans(broker, "stopped"));
        }
       
        //assertEquals(0, countMbeans(networkedBroker, "NetworkBridge"));
View Full Code Here

        assertNotNull(name, broker);
        broker.start();
        try {
            result = verifySslCredentials(broker);
        } finally {
            broker.stop();
        }
        return result;
    }

    private boolean verifySslCredentials(BrokerService broker) throws Exception {
View Full Code Here

        super.tearDown();

        slaveStarted.await(5, TimeUnit.SECONDS);
        BrokerService brokerService = slave.get();
        if( brokerService!=null ) {
            brokerService.stop();
        }
        master.stop();
    }

    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
View Full Code Here

    return new ClassPathXmlApplicationContext("activemq.xml");
  }

  protected void tearDown() throws Exception {
    BrokerService broker = (BrokerService) context.getBean("localbroker");
    broker.stop();
    broker = (BrokerService) context.getBean("default");
    broker.stop();
    super.tearDown();
  }
View Full Code Here

  protected void tearDown() throws Exception {
    BrokerService broker = (BrokerService) context.getBean("localbroker");
    broker.stop();
    broker = (BrokerService) context.getBean("default");
    broker.stop();
    super.tearDown();
  }

  public void testNoFactorySet() throws Exception {
    AmqBrowseCommand command = new AmqBrowseCommand();
View Full Code Here

    return new ClassPathXmlApplicationContext("activemq.xml");
  }

  protected void tearDown() throws Exception {
    BrokerService broker = (BrokerService) context.getBean("localbroker");
    broker.stop();
    broker = (BrokerService) context.getBean("default");
    broker.stop();
    super.tearDown();
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.