Package org.apache.activemq.broker

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


            assertTrue("Should have created a journal directory at " + journalFile.getAbsolutePath(), journalFile.exists());

            log.info("Success");
        } finally {
            if (broker != null) {
                broker.stop();
            }
        }
    }

    /*
 
View Full Code Here


            assertTrue("Should have not created a journal directory at " + journalFile.getAbsolutePath(), !journalFile.exists());

            log.info("Success");
        } finally {
            if (broker != null) {
                broker.stop();
            }
        }

    }
View Full Code Here

        broker = createBroker(new FileSystemResource(CONF_ROOT + "memory-example.xml"));
        try {
            assertEquals("Broker Config Error (brokerName)", "brokerMemoryConfigTest", broker.getBrokerName());
        } finally {
            if (broker != null) {
                broker.stop();
            }
        }

        broker = createBroker("org/apache/activemq/config/config.xml");
        try {
View Full Code Here

        assertXAConnection(connection);
       
        assertNotNull(connection);
        connection.close();
       
        broker.stop();
    }

    private void assertXAConnection(Connection connection) {
        assertTrue("Should be an XAConnection", connection instanceof XAConnection);
        assertTrue("Should be an XATopicConnection", connection instanceof XATopicConnection);
View Full Code Here

                synchronized (this) {
                    while (!shutdownBroker) {
                        wait(1000);
                    }
                }               
                broker.stop();             
                broker = null;               
            } catch (Exception e) {
                exception = e;
                e.printStackTrace();
            }
View Full Code Here

        System.out.println("Node started - Press enter to shutdown.");
        System.in.read();

        node.stop();
        jmsBroker.stop();
    }
}
View Full Code Here

    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

    public synchronized void doFail() {
        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)) {
                    log.warn("Caught while closing due to failure: " + ignored, ignored);
                }
View Full Code Here

      Future<?> f1 = executor.submit(client1);
      Future<?> f2 = executor.submit(client2);
      f1.get();
      f2.get();
      executor.shutdownNow();
      broker2.stop();
      broker.stop();
  }
 
  public void testAggregateHttpTunnelling() throws Exception {
    System.out.println("-------------- testAggregateHttpTunnelling -------------");
View Full Code Here

          cas.release();
        }
      }
      uimaAsEngine.stop();
      super.cleanBroker(broker2);
      broker2.stop();
      synchronized(this) {
        wait(3000);   // allow broker some time to stop 
      }
  }
 
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.