Examples of stop()


Examples of org.apache.activemq.apollo.broker.Broker.stop()

        System.out.println("Stopping the broker.");
       
        //
        // The broker stops asynchronously. The runnable is invoked once
        // the broker if fully stopped.
        broker.stop(new Runnable(){
            public void run() {
                System.out.println("The broker has now stopped.");
            }
        });
       
View Full Code Here

Examples of org.apache.activemq.apollo.transport.Transport.stop()

  public void autoCreateBroker() throws Exception {
    Transport connect = TransportFactory.connect("vm://test1");
        connect.setDispatchQueue(Dispatch.createQueue());
    connect.start();
    assertNotNull(connect);
    connect.stop();
  }
 
  @Test(expected=IOException.class)
  public void noAutoCreateBroker() throws Exception {
    TransportFactory.connect("vm://test2?create=false");
View Full Code Here

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

    public synchronized void doStop() throws Exception {
        if (brokerService != null) {
            BrokerService temp = brokerService;
            brokerService = null;
            try {
                temp.stop();
            } catch (JMSException ignored) {
                // just a lame exception ActiveMQ likes to throw on shutdown
                if (!(ignored.getCause() instanceof TransportDisposedIOException)) {
                    throw ignored;
                }
View Full Code Here

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

                LOG.warn("Stealing link for clientId {} From Connection {}", clientId, oldContext.getConnection());
                if (connection instanceof TransportConnection) {
                    TransportConnection transportConnection = (TransportConnection) connection;
                    transportConnection.stopAsync();
                } else {
                    connection.stop();
                }
            } else {
                LOG.error("No Connection found for {}", oldContext);
            }
        }
View Full Code Here

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

        // Close the consumer on the remote broker
        connection2.send(consumerInfo3.createRemoveCommand());
       
        connection1.stop();
        connection2.stop();
    }
   
    protected BrokerService createBroker() throws Exception {
        localBroker = new BrokerService();
        localBroker.setBrokerName("localhost");
View Full Code Here

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

    public synchronized void doStop() throws Exception {
        if (transportConnector != null) {
            TransportConnector temp = transportConnector;
            transportConnector = null;
            temp.stop();
        }
    }

    public synchronized void doFail() {
        if (transportConnector != null) {
View Full Code Here

Examples of org.apache.activemq.camel.component.ActiveMQComponent.stop()

            route.getConsumer().stop();
            route.getEndpoint().stop();
          }

          ActiveMQComponent amqc = (ActiveMQComponent) context.getComponent("activemq");
          amqc.stop();
          amqc.shutdown();

          if (logger == null) {
            System.out.println("Stopping Camel Context");
          } else {
View Full Code Here

Examples of org.apache.activemq.leveldb.replicated.ElectingLevelDBStore.stop()

                LOG.info("Checking master state");
                assertEquals(expected_list, getMessages(ms));

                // mid way, lets kill the master..
                LOG.info("Killing Master.");
                master.stop();

                // At least one of the remaining stores should complete starting.
                LOG.info("Waiting for slave takeover...");
                f = waitFor(60 * 1000, pending_starts.toArray(new CountDownFuture[pending_starts.size()]));
                assertTrue(f!=null);
View Full Code Here

Examples of org.apache.activemq.leveldb.replicated.MasterLevelDBStore.stop()

        // Restart and the op should complete.
        slave = createSlave(master, slaveDir);
        slave.start();
        assertTrue(f.await(2, TimeUnit.SECONDS));

        master.stop();
        slave.stop();

    }

    private CountDownFuture asyncAddMessage(final MessageStore ms, final String body) {
View Full Code Here

Examples of org.apache.activemq.leveldb.replicated.SlaveLevelDBStore.stop()

        CountDownFuture f = asyncAddMessage(ms, "m1");
        assertTrue(f.await(1, TimeUnit.SECONDS));

        // If the slave goes offline, then updates should once again
        // not complete.
        slave.stop();

        f = asyncAddMessage(ms, "m2");
        assertFalse(f.await(2, TimeUnit.SECONDS));

        // Restart and the op should complete.
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.