1 46 package org.mr.api.jms; 47 48 49 import java.io.Serializable ; 50 51 import javax.jms.ConnectionConsumer ; 52 import javax.jms.IllegalStateException ; 53 import javax.jms.JMSException ; 54 import javax.jms.QueueSession ; 55 import javax.jms.ServerSessionPool ; 56 import javax.jms.Topic ; 57 58 59 86 public class MantaQueueConnection extends MantaConnection implements Serializable , javax.jms.QueueConnection { 87 88 95 MantaQueueConnection(MantaConnectionFactory factory) throws JMSException { 96 super(factory); 97 } 99 107 MantaQueueConnection(MantaConnectionFactory factory, String userName, String password) throws JMSException { 108 super(factory, userName, password); 109 } 111 114 public QueueSession createQueueSession(boolean trx, int acknowledgeMode) throws JMSException { 115 checkLegalOperation(); 116 117 MantaQueueSession sess = new MantaQueueSession(messageChannel.getMessageId(),this, 118 trx,acknowledgeMode); 119 addSession(sess); 120 return sess; 121 } 122 128 public ConnectionConsumer createDurableConnectionConsumer(Topic topic, String subscriptionName, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException { 129 throw new IllegalStateException ("MNJMS00018 : CAN NOT CREATE A DURABLE SUBSCRIPTION ON A QUEUE. FAILED IN METHOD createDurableConnectionConsumer()"); 130 } 131 132 133 } | Popular Tags |