Package org.apache.activemq.broker

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


  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


  }

  protected void tearDown() throws Exception {
    localConnection.close();
    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 {
    localConnection.close();
    BrokerService broker = (BrokerService) context.getBean("localbroker");
    broker.stop();
    broker = (BrokerService) context.getBean("default");
    broker.stop();
    super.tearDown();
  }

  @SuppressWarnings("unchecked")
  public int getMessageCount(QueueBrowser browser, String prefix)
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

       
        assertTrue("Threads are leaking: " + ThreadExplorer.show("active sleep") + ", threadCount=" +threadCountAfterStart + " threadCountAfterSleep=" + threadCountAfterSleep,
                threadCountAfterSleep < threadCountAfterStart + 8);

        connection.close();
        broker.stop();
        broker.waitUntilStopped();

        // testNoDanglingThreadsAfterStop with tcp transport
        broker = new BrokerService();
        broker.setSchedulerSupport(true);
View Full Code Here

        cf = new ActiveMQConnectionFactory("tcp://localhost:61616?wireFormat.maxInactivityDuration=1000&wireFormat.maxInactivityDurationInitalDelay=1000");
        connection = cf.createConnection("system", "manager");
        connection.start();
        connection.close();
        broker.stop();
        broker.waitUntilStopped();

        // must only be called when all brokers and connections are done!
        DefaultThreadPools.shutdown();
View Full Code Here

            } catch (final Throwable t) {
                t.printStackTrace();
            }
            try {
                if (brokerService2 != null) {
                    brokerService2.stop();
                }
            } catch (final Throwable t) {
                t.printStackTrace();
            }
        }
View Full Code Here

                    + broker2Count.get());
        }


        BrokerService broker = BrokerRegistry.getInstance().lookup("one");
        broker.stop();
        broker = BrokerRegistry.getInstance().lookup("two");
        broker.stop();
    }

    // need to ensure broker bridge is alive before starting the consumer
View Full Code Here


        BrokerService broker = BrokerRegistry.getInstance().lookup("one");
        broker.stop();
        broker = BrokerRegistry.getInstance().lookup("two");
        broker.stop();
    }

    // need to ensure broker bridge is alive before starting the consumer
    // peeking at the internals will give us this info
    private void waitForBridgeFormation() throws Exception {
View Full Code Here

        Connection connection = cf.createConnection();
        connection.setClientID("test");
        connection.start();
        producerSomeMessages(connection, 1000);
        connection.close();
        broker.stop();
    }

    private void producerSomeMessages(Connection connection, int numToSend) throws Exception {
        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        Topic topic = session.createTopic("test.topic");
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.