@Override public void start() throws Exception { if (started.compareAndSet(false, true)) { init(); for (DestinationBridge bridge : inboundBridges) { bridge.start(); } for (DestinationBridge bridge : outboundBridges) { bridge.start(); } LOG.info("JMS Connector {} started", 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()); } }
protected void registerJmsConnectorMBean(JmsConnector connector) throws IOException { JmsConnectorView view = new JmsConnectorView(connector); try { ObjectName objectName = BrokerMBeanSupport.createNetworkConnectorName(getBrokerObjectName(), "jmsConnectors", connector.getName()); AnnotatedMBean.registerMBean(getManagementContext(), view, objectName); } catch (Throwable e) { throw IOExceptionSupport.create("Broker could not be registered in JMX: " + e.getMessage(), e); } }
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"); } }
public void start() throws Exception { init(); if (started.compareAndSet(false, true)) { for (int i = 0; i < inboundBridges.size(); i++) { DestinationBridge bridge = inboundBridges.get(i); bridge.start(); } for (int i = 0; i < outboundBridges.size(); i++) { DestinationBridge bridge = outboundBridges.get(i); bridge.start(); } LOG.info("JMS Connector " + getName() + " Started"); } }
@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 start() throws Exception { if (started.compareAndSet(false, true)) { init(); for (DestinationBridge bridge : inboundBridges) { bridge.start(); } for (DestinationBridge bridge : outboundBridges) { bridge.start(); } LOG.info("JMS Connector {} started", getName()); } }
@Override public void start() throws Exception { if (started.compareAndSet(false, true)) { init(); for (DestinationBridge bridge : inboundBridges) { bridge.start(); } for (DestinationBridge bridge : outboundBridges) { bridge.start(); } LOG.info("JMS Connector {} started", getName()); } }
@Override public void start() throws Exception { if (started.compareAndSet(false, true)) { init(); for (DestinationBridge bridge : inboundBridges) { bridge.start(); } for (DestinationBridge bridge : outboundBridges) { bridge.start(); } LOG.info("JMS Connector {} started", 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()); } }
@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()); } }
protected void registerJmsConnectorMBean(JmsConnector connector) throws IOException { JmsConnectorView view = new JmsConnectorView(connector); try { ObjectName objectName = BrokerMBeanSupport.createNetworkConnectorName(getBrokerObjectName(), "jmsConnectors", connector.getName()); AnnotatedMBean.registerMBean(getManagementContext(), view, objectName); } catch (Throwable e) { throw IOExceptionSupport.create("Broker could not be registered in JMX: " + e.getMessage(), e); } }
protected void registerJmsConnectorMBean(JmsConnector connector) throws IOException { JmsConnectorView view = new JmsConnectorView(connector); try { ObjectName objectName = BrokerMBeanSupport.createNetworkConnectorName(getBrokerObjectName(), "jmsConnectors", connector.getName()); AnnotatedMBean.registerMBean(getManagementContext(), view, objectName); } catch (Throwable e) { throw IOExceptionSupport.create("Broker could not be registered in JMX: " + e.getMessage(), e); } }
protected void registerJmsConnectorMBean(JmsConnector connector) throws IOException { JmsConnectorView view = new JmsConnectorView(connector); try { ObjectName objectName = BrokerMBeanSupport.createNetworkConnectorName(getBrokerObjectName(), "jmsConnectors", connector.getName()); AnnotatedMBean.registerMBean(getManagementContext(), view, objectName); } catch (Throwable e) { throw IOExceptionSupport.create("Broker could not be registered in JMX: " + e.getMessage(), e); } }
protected void registerJmsConnectorMBean(JmsConnector connector) throws IOException { JmsConnectorView view = new JmsConnectorView(connector); try { ObjectName objectName = new ObjectName(getManagementContext().getJmxDomainName() + ":" + "BrokerName=" + JMXSupport.encodeObjectNamePart(getBrokerName()) + "," + "Type=JmsConnector," + "JmsConnectorName=" + JMXSupport.encodeObjectNamePart(connector.getName())); AnnotatedMBean.registerMBean(getManagementContext(), view, objectName); } catch (Throwable e) { throw IOExceptionSupport.create("Broker could not be registered in JMX: " + e.getMessage(), e); } }