/** * Create a message producer * * @param destination The destination * @return The message producer * @throws JMSException Thrown if an error occurs */ @Override public MessageProducer createProducer(final Destination destination) throws JMSException { lock(); try { Session session = getSessionInternal(); if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("createProducer " + session + " dest=" + destination); } MessageProducer result = session.createProducer(destination); result = new ActiveMQRAMessageProducer(result, this); if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("createdProducer " + session + " producer=" + result); } addProducer(result); return result; } finally { unlock(); } }
/** * Create a message producer * * @param destination The destination * @return The message producer * @throws JMSException Thrown if an error occurs */ @Override public MessageProducer createProducer(final Destination destination) throws JMSException { lock(); try { Session session = getSessionInternal(); if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("createProducer " + session + " dest=" + destination); } MessageProducer result = session.createProducer(destination); result = new ActiveMQRAMessageProducer(result, this); if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("createdProducer " + session + " producer=" + result); } addProducer(result); return result; } finally { unlock(); } }
/** * Create a topic publisher * * @param topic The topic * @return The publisher * @throws JMSException Thrown if an error occurs */ @Override public TopicPublisher createPublisher(final Topic topic) throws JMSException { lock(); try { TopicSession session = getTopicSessionInternal(); if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("createPublisher " + session + " topic=" + topic); } TopicPublisher result = session.createPublisher(topic); result = new ActiveMQRATopicPublisher(result, this); if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("createdPublisher " + session + " publisher=" + result); } addProducer(result); return result; } finally { unlock(); } }
/** * Create a queue sender * * @param queue The queue * @return The queue sender * @throws JMSException Thrown if an error occurs */ @Override public QueueSender createSender(final Queue queue) throws JMSException { lock(); try { QueueSession session = getQueueSessionInternal(); if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("createSender " + session + " queue=" + queue); } QueueSender result = session.createSender(queue); result = new ActiveMQRAQueueSender(result, this); if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("createdSender " + session + " sender=" + result); } addProducer(result); return result; } finally { unlock(); } }
/** * Create a topic publisher * * @param topic The topic * @return The publisher * @throws JMSException Thrown if an error occurs */ @Override public TopicPublisher createPublisher(final Topic topic) throws JMSException { lock(); try { TopicSession session = getTopicSessionInternal(); if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("createPublisher " + session + " topic=" + topic); } TopicPublisher result = session.createPublisher(topic); result = new ActiveMQRATopicPublisher(result, this); if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("createdPublisher " + session + " publisher=" + result); } addProducer(result); return result; } finally { unlock(); } }
/** * Create a queue sender * * @param queue The queue * @return The queue sender * @throws JMSException Thrown if an error occurs */ @Override public QueueSender createSender(final Queue queue) throws JMSException { lock(); try { QueueSession session = getQueueSessionInternal(); if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("createSender " + session + " queue=" + queue); } QueueSender result = session.createSender(queue); result = new ActiveMQRAQueueSender(result, this); if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("createdSender " + session + " sender=" + result); } addProducer(result); return result; } finally { unlock(); } }