1 18 package org.apache.activemq.pool; 19 20 import org.apache.activemq.ActiveMQQueueSender; 21 22 import javax.jms.Destination ; 23 import javax.jms.JMSException ; 24 import javax.jms.Message ; 25 import javax.jms.Queue ; 26 import javax.jms.QueueSender ; 27 28 31 public class PooledQueueSender extends PooledProducer implements QueueSender { 32 33 public PooledQueueSender(ActiveMQQueueSender messageProducer, Destination destination) throws JMSException { 34 super(messageProducer, destination); 35 } 36 37 public void send(Queue queue, Message message, int i, int i1, long l) throws JMSException { 38 getQueueSender().send(queue, message, i, i1, l); 39 } 40 41 public void send(Queue queue, Message message) throws JMSException { 42 getQueueSender().send(queue, message); 43 } 44 45 public Queue getQueue() throws JMSException { 46 return getQueueSender().getQueue(); 47 } 48 49 50 protected ActiveMQQueueSender getQueueSender() { 51 return (ActiveMQQueueSender) getMessageProducer(); 52 } 53 54 } 55 | Popular Tags |