@Override public void stop() throws Exception { if (started.compareAndSet(true, false)) { ThreadPoolUtils.shutdown(connectionService); connectionService = null; if (foreignConnection.get() != null) { try { foreignConnection.get().close(); } catch (Exception e) { } } if (localConnection.get() != null) { try { localConnection.get().close(); } catch (Exception e) { } } for (DestinationBridge bridge : inboundBridges) { bridge.stop(); } for (DestinationBridge bridge : outboundBridges) { bridge.stop(); } LOG.info("JMS Connector {} stopped", getName()); } }
@Override protected boolean removeEldestEntry(Map.Entry<Destination, DestinationBridge> enty) { if (size() > maxCacheSize) { Iterator<Map.Entry<Destination, DestinationBridge>> iter = entrySet().iterator(); Map.Entry<Destination, DestinationBridge> lru = iter.next(); remove(lru.getKey()); DestinationBridge bridge = lru.getValue(); try { bridge.stop(); LOG.info("Expired bridge: {}", bridge); } catch (Exception e) { LOG.warn("Stopping expired bridge {} caused an exception", bridge, e); } } return false; } };
public void stop() throws Exception { super.stop(); if (consumerSession != null) { consumerSession.close(); } if (producerSession != null) { producerSession.close(); } }
@Override public void stop() throws Exception { super.stop(); if (consumerSession != null) { consumerSession.close(); } if (producerSession != null) { producerSession.close(); } }
public void stop() throws Exception { if (started.compareAndSet(true, false)) { for (int i = 0; i < inboundBridges.size(); i++) { DestinationBridge bridge = inboundBridges.get(i); bridge.stop(); } for (int i = 0; i < outboundBridges.size(); i++) { DestinationBridge bridge = outboundBridges.get(i); bridge.stop(); } LOG.info("JMS Connector " + getName() + " Stopped"); } }
@Override public void stop() throws Exception { if (started.compareAndSet(true, false)) { ThreadPoolUtils.shutdown(connectionService); connectionService = null; if (foreignConnection.get() != null) { try { foreignConnection.get().close(); } catch (Exception e) { } } if (localConnection.get() != null) { try { localConnection.get().close(); } catch (Exception e) { } } for (DestinationBridge bridge : inboundBridges) { bridge.stop(); } for (DestinationBridge bridge : outboundBridges) { bridge.stop(); } LOG.info("JMS Connector {} stopped", getName()); } }
@Override public void stop() throws Exception { if (started.compareAndSet(true, false)) { ThreadPoolUtils.shutdown(connectionService); connectionService = null; if (foreignConnection.get() != null) { try { foreignConnection.get().close(); } catch (Exception e) { } } if (localConnection.get() != null) { try { localConnection.get().close(); } catch (Exception e) { } } for (DestinationBridge bridge : inboundBridges) { bridge.stop(); } for (DestinationBridge bridge : outboundBridges) { bridge.stop(); } LOG.info("JMS Connector {} stopped", getName()); } }
public void stop() throws Exception { super.stop(); if (consumerSession != null) { consumerSession.close(); } if (producerSession != null) { producerSession.close(); } }
protected boolean removeEldestEntry(Map.Entry enty) { if (size() > maxCacheSize) { Iterator iter = entrySet().iterator(); Map.Entry lru = (Map.Entry)iter.next(); remove(lru.getKey()); DestinationBridge bridge = (DestinationBridge)lru.getValue(); try { bridge.stop(); LOG.info("Expired bridge: " + bridge); } catch (Exception e) { LOG.warn("stopping expired bridge" + bridge + " caused an exception", e); } } return false; } };
public void stop() throws Exception { super.stop(); if (consumerSession != null) { consumerSession.close(); } if (producerSession != null) { producerSession.close(); } }
@Override protected boolean removeEldestEntry(Map.Entry<Destination, DestinationBridge> enty) { if (size() > maxCacheSize) { Iterator<Map.Entry<Destination, DestinationBridge>> iter = entrySet().iterator(); Map.Entry<Destination, DestinationBridge> lru = iter.next(); remove(lru.getKey()); DestinationBridge bridge = lru.getValue(); try { bridge.stop(); LOG.info("Expired bridge: {}", bridge); } catch (Exception e) { LOG.warn("Stopping expired bridge {} caused an exception", bridge, e); } } return false; } };
@Override public void stop() throws Exception { super.stop(); if (consumerSession != null) { consumerSession.close(); } if (producerSession != null) { producerSession.close(); } }
@Override protected boolean removeEldestEntry(Map.Entry<Destination, DestinationBridge> enty) { if (size() > maxCacheSize) { Iterator<Map.Entry<Destination, DestinationBridge>> iter = entrySet().iterator(); Map.Entry<Destination, DestinationBridge> lru = iter.next(); remove(lru.getKey()); DestinationBridge bridge = lru.getValue(); try { bridge.stop(); LOG.info("Expired bridge: {}", bridge); } catch (Exception e) { LOG.warn("Stopping expired bridge {} caused an exception", bridge, e); } } return false; } };
@Override protected boolean removeEldestEntry(Map.Entry<Destination, DestinationBridge> enty) { if (size() > maxCacheSize) { Iterator<Map.Entry<Destination, DestinationBridge>> iter = entrySet().iterator(); Map.Entry<Destination, DestinationBridge> lru = iter.next(); remove(lru.getKey()); DestinationBridge bridge = lru.getValue(); try { bridge.stop(); LOG.info("Expired bridge: {}", bridge); } catch (Exception e) { LOG.warn("Stopping expired bridge {} caused an exception", bridge, e); } } return false; } };
@Override public void stop() throws Exception { super.stop(); if (consumerSession != null) { consumerSession.close(); } if (producerSession != null) { producerSession.close(); } }
@Override public void stop() throws Exception { super.stop(); if (consumerSession != null) { consumerSession.close(); } if (producerSession != null) { producerSession.close(); } }
public void stop() throws Exception { super.stop(); if (consumerSession != null) { consumerSession.close(); } if (producerSession != null) { producerSession.close(); } }
public void stop() throws Exception { super.stop(); if (consumerSession != null) { consumerSession.close(); } if (producerSession != null) { producerSession.close(); } }
public void stop() throws Exception { super.stop(); if (consumerSession != null) { consumerSession.close(); } if (producerSession != null) { producerSession.close(); } }