@Override public void stop() throws Exception { super.stop(); exportDestinations(); }
@Override public void start() throws Exception { super.start(); if (location == null) { location = new File(getBrokerService().getBrokerDataDirectory(), "destinations"); } importDestinations(); destinations.addAll(Arrays.asList(getBrokerService().getBroker().getDestinations())); }
protected void importDestinations() throws Exception { BufferedReader reader = null; try { if (location.exists()) { reader = new BufferedReader(new FileReader(location)); String destination; Broker broker = getBrokerService().getBroker(); while ((destination = reader.readLine()) != null) { broker.addDestination(getBrokerService().getAdminConnectionContext(), ActiveMQDestination.createDestination(destination, ActiveMQDestination.QUEUE_TYPE), true); } } } catch (Exception e) { LOG.warn("Exception loading destinations", e); } finally { if (reader != null) { reader.close(); } } }
protected void importDestinations() throws Exception { BufferedReader reader = null; try { if (location.exists()) { reader = new BufferedReader(new FileReader(location)); String destination; Broker broker = getBrokerService().getBroker(); while ((destination = reader.readLine()) != null) { broker.addDestination(getBrokerService().getAdminConnectionContext(), ActiveMQDestination.createDestination(destination, ActiveMQDestination.QUEUE_TYPE), true); } } } catch (Exception e) { LOG.warn("Exception loading destinations", e); } finally { if (reader != null) { reader.close(); } } }
@Override public void start() throws Exception { super.start(); if (location == null) { location = new File(getBrokerService().getBrokerDataDirectory(), "destinations"); } importDestinations(); destinations.addAll(Arrays.asList(getBrokerService().getBroker().getDestinations())); }
@Override public void stop() throws Exception { super.stop(); exportDestinations(); }
protected void importDestinations() throws Exception { BufferedReader reader = null; try { if (location.exists()) { reader = new BufferedReader(new FileReader(location)); String destination; Broker broker = getBrokerService().getBroker(); while ((destination = reader.readLine()) != null) { broker.addDestination(getBrokerService().getAdminConnectionContext(), ActiveMQDestination.createDestination(destination, ActiveMQDestination.QUEUE_TYPE), true); } } } catch (Exception e) { LOG.warn("Exception loading destinations", e); } finally { if (reader != null) { reader.close(); } } }
@Override public void start() throws Exception { super.start(); if (location == null) { location = new File(getBrokerService().getBrokerDataDirectory(), "destinations"); } importDestinations(); destinations.addAll(Arrays.asList(getBrokerService().getBroker().getDestinations())); }
@Override public void stop() throws Exception { super.stop(); exportDestinations(); }
protected void importDestinations() throws Exception { BufferedReader reader = null; try { if (location.exists()) { reader = new BufferedReader(new FileReader(location)); String destination; Broker broker = getBrokerService().getBroker(); while ((destination = reader.readLine()) != null) { broker.addDestination(getBrokerService().getAdminConnectionContext(), ActiveMQDestination.createDestination(destination, ActiveMQDestination.QUEUE_TYPE), true); } } } catch (Exception e) { LOG.warn("Exception loading destinations", e); } finally { if (reader != null) { reader.close(); } } }
@Override public void start() throws Exception { super.start(); if (location == null) { location = new File(getBrokerService().getBrokerDataDirectory(), "destinations"); } importDestinations(); destinations.addAll(Arrays.asList(getBrokerService().getBroker().getDestinations())); }
@Override public void stop() throws Exception { super.stop(); exportDestinations(); }