Queue replyToConsumerQueue = replyToConsumerSession.createTemporaryQueue(); replyToConsumerSession.close(); bridge.setConsumerQueue(replyToConsumerQueue); bridge.setProducerQueue(replyToProducerQueue); bridge.setProducerConnection((QueueConnection)replyToProducerConnection); bridge.setConsumerConnection((QueueConnection)replyToConsumerConnection); bridge.setDoHandleReplyTo(false); if (bridge.getJmsMessageConvertor() == null) { bridge.setJmsMessageConvertor(getOutboundMessageConvertor()); bridge.setJmsConnector(this); bridge.start(); LOG.info("Created replyTo bridge for {}", replyToProducerQueue); } catch (Exception e) { return bridge.getConsumerQueue();
protected void initializeOutboundDestinationBridgesLocalSide(QueueConnection connection) throws JMSException { if (outboundQueueBridges != null) { QueueSession localSession = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); for (OutboundQueueBridge bridge : outboundQueueBridges) { String localQueueName = bridge.getLocalQueueName(); Queue activemqQueue = createActiveMQQueue(localSession, localQueueName); bridge.setConsumer(null); bridge.setConsumerQueue(activemqQueue); bridge.setConsumerConnection(connection); bridge.setJmsConnector(this); addOutboundBridge(bridge); } localSession.close(); } }
protected void initializeOutboundDestinationBridgesOutboundSide(QueueConnection connection) throws JMSException { if (outboundQueueBridges != null) { QueueSession outboundSession = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); for (OutboundQueueBridge bridge : outboundQueueBridges) { String queueName = bridge.getOutboundQueueName(); Queue foreignQueue = createForeignQueue(outboundSession, queueName); bridge.setProducerQueue(foreignQueue); bridge.setProducerConnection(connection); if (bridge.getJmsMessageConvertor() == null) { bridge.setJmsMessageConvertor(getOutboundMessageConvertor()); } bridge.setJmsConnector(this); addOutboundBridge(bridge); } outboundSession.close(); } }
protected void initializeOutboundQueueBridges() throws JMSException { if (outboundQueueBridges != null) { QueueSession outboundSession = outboundQueueConnection .createQueueSession(false, Session.AUTO_ACKNOWLEDGE); QueueSession localSession = localQueueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); for (int i = 0; i < outboundQueueBridges.length; i++) { OutboundQueueBridge bridge = outboundQueueBridges[i]; String localQueueName = bridge.getLocalQueueName(); Queue activemqQueue = createActiveMQQueue(localSession, localQueueName); String queueName = bridge.getOutboundQueueName(); Queue foreignQueue = createForeignQueue(outboundSession, queueName); bridge.setConsumerQueue(activemqQueue); bridge.setProducerQueue(foreignQueue); bridge.setProducerConnection(outboundQueueConnection); bridge.setConsumerConnection(localQueueConnection); if (bridge.getJmsMessageConvertor() == null) { bridge.setJmsMessageConvertor(getOutboundMessageConvertor()); } bridge.setJmsConnector(this); addOutboundBridge(bridge); } outboundSession.close(); localSession.close(); } }
public void restartProducerConnection() throws NamingException, JMSException { outboundQueueConnection = null; initializeForeignQueueConnection(); // the outboundQueueConnection was reestablished - publish the new connection to the bridges if (inboundQueueBridges != null) { for (int i = 0; i < inboundQueueBridges.length; i++) { InboundQueueBridge bridge = inboundQueueBridges[i]; bridge.setConsumerConnection(outboundQueueConnection); } } if (outboundQueueBridges != null) { for (int i = 0; i < outboundQueueBridges.length; i++) { OutboundQueueBridge bridge = outboundQueueBridges[i]; bridge.setProducerConnection(outboundQueueConnection); } } }
Queue replyToConsumerQueue = replyToConsumerSession.createTemporaryQueue(); replyToConsumerSession.close(); bridge.setConsumerQueue(replyToConsumerQueue); bridge.setProducerQueue(replyToProducerQueue); bridge.setProducerConnection((QueueConnection)replyToProducerConnection); bridge.setConsumerConnection((QueueConnection)replyToConsumerConnection); bridge.setDoHandleReplyTo(false); if (bridge.getJmsMessageConvertor() == null) { bridge.setJmsMessageConvertor(getOutboundMessageConvertor()); bridge.setJmsConnector(this); bridge.start(); LOG.info("Created replyTo bridge for {}", replyToProducerQueue); } catch (Exception e) { return bridge.getConsumerQueue();
protected void initializeOutboundDestinationBridgesOutboundSide(QueueConnection connection) throws JMSException { if (outboundQueueBridges != null) { QueueSession outboundSession = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); for (OutboundQueueBridge bridge : outboundQueueBridges) { String queueName = bridge.getOutboundQueueName(); Queue foreignQueue = createForeignQueue(outboundSession, queueName); bridge.setProducerQueue(foreignQueue); bridge.setProducerConnection(connection); if (bridge.getJmsMessageConvertor() == null) { bridge.setJmsMessageConvertor(getOutboundMessageConvertor()); } bridge.setJmsConnector(this); addOutboundBridge(bridge); } outboundSession.close(); } }
protected void initializeOutboundDestinationBridgesLocalSide(QueueConnection connection) throws JMSException { if (outboundQueueBridges != null) { QueueSession localSession = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); for (OutboundQueueBridge bridge : outboundQueueBridges) { String localQueueName = bridge.getLocalQueueName(); Queue activemqQueue = createActiveMQQueue(localSession, localQueueName); bridge.setConsumer(null); bridge.setConsumerQueue(activemqQueue); bridge.setConsumerConnection(connection); bridge.setJmsConnector(this); addOutboundBridge(bridge); } localSession.close(); } }
Queue replyToConsumerQueue = replyToConsumerSession.createTemporaryQueue(); replyToConsumerSession.close(); bridge.setConsumerQueue(replyToConsumerQueue); bridge.setProducerQueue(replyToProducerQueue); bridge.setProducerConnection((QueueConnection)replyToProducerConnection); bridge.setConsumerConnection((QueueConnection)replyToConsumerConnection); bridge.setDoHandleReplyTo(false); if (bridge.getJmsMessageConvertor() == null) { bridge.setJmsMessageConvertor(getOutboundMessageConvertor()); bridge.setJmsConnector(this); bridge.start(); LOG.info("Created replyTo bridge for {}", replyToProducerQueue); } catch (Exception e) { return bridge.getConsumerQueue();
protected void initializeOutboundDestinationBridgesOutboundSide(QueueConnection connection) throws JMSException { if (outboundQueueBridges != null) { QueueSession outboundSession = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); for (OutboundQueueBridge bridge : outboundQueueBridges) { String queueName = bridge.getOutboundQueueName(); Queue foreignQueue = createForeignQueue(outboundSession, queueName); bridge.setProducerQueue(foreignQueue); bridge.setProducerConnection(connection); if (bridge.getJmsMessageConvertor() == null) { bridge.setJmsMessageConvertor(getOutboundMessageConvertor()); } bridge.setJmsConnector(this); addOutboundBridge(bridge); } outboundSession.close(); } }
protected void initializeOutboundDestinationBridgesLocalSide(QueueConnection connection) throws JMSException { if (outboundQueueBridges != null) { QueueSession localSession = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); for (OutboundQueueBridge bridge : outboundQueueBridges) { String localQueueName = bridge.getLocalQueueName(); Queue activemqQueue = createActiveMQQueue(localSession, localQueueName); bridge.setConsumer(null); bridge.setConsumerQueue(activemqQueue); bridge.setConsumerConnection(connection); bridge.setJmsConnector(this); addOutboundBridge(bridge); } localSession.close(); } }
Queue replyToConsumerQueue = replyToConsumerSession.createTemporaryQueue(); replyToConsumerSession.close(); bridge.setConsumerQueue(replyToConsumerQueue); bridge.setProducerQueue(replyToProducerQueue); bridge.setProducerConnection((QueueConnection)replyToProducerConnection); bridge.setConsumerConnection((QueueConnection)replyToConsumerConnection); bridge.setDoHandleReplyTo(false); if (bridge.getJmsMessageConvertor() == null) { bridge.setJmsMessageConvertor(getOutboundMessageConvertor()); bridge.setJmsConnector(this); bridge.start(); LOG.info("Created replyTo bridge for " + replyToProducerQueue); } catch (Exception e) { return bridge.getConsumerQueue();
protected void initializeOutboundDestinationBridgesOutboundSide(QueueConnection connection) throws JMSException { if (outboundQueueBridges != null) { QueueSession outboundSession = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); for (OutboundQueueBridge bridge : outboundQueueBridges) { String queueName = bridge.getOutboundQueueName(); Queue foreignQueue = createForeignQueue(outboundSession, queueName); bridge.setProducerQueue(foreignQueue); bridge.setProducerConnection(connection); if (bridge.getJmsMessageConvertor() == null) { bridge.setJmsMessageConvertor(getOutboundMessageConvertor()); } bridge.setJmsConnector(this); addOutboundBridge(bridge); } outboundSession.close(); } }
protected void initializeOutboundDestinationBridgesLocalSide(QueueConnection connection) throws JMSException { if (outboundQueueBridges != null) { QueueSession localSession = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); for (OutboundQueueBridge bridge : outboundQueueBridges) { String localQueueName = bridge.getLocalQueueName(); Queue activemqQueue = createActiveMQQueue(localSession, localQueueName); bridge.setConsumer(null); bridge.setConsumerQueue(activemqQueue); bridge.setConsumerConnection(connection); bridge.setJmsConnector(this); addOutboundBridge(bridge); } localSession.close(); } }
Queue replyToConsumerQueue = replyToConsumerSession.createTemporaryQueue(); replyToConsumerSession.close(); bridge.setConsumerQueue(replyToConsumerQueue); bridge.setProducerQueue(replyToProducerQueue); bridge.setProducerConnection((QueueConnection)replyToProducerConnection); bridge.setConsumerConnection((QueueConnection)replyToConsumerConnection); bridge.setDoHandleReplyTo(false); if (bridge.getJmsMessageConvertor() == null) { bridge.setJmsMessageConvertor(getOutboundMessageConvertor()); bridge.setJmsConnector(this); bridge.start(); LOG.info("Created replyTo bridge for {}", replyToProducerQueue); } catch (Exception e) { return bridge.getConsumerQueue();