1 45 package org.exolab.jms.client; 46 47 48 import javax.jms.ConnectionConsumer ; 49 import javax.jms.InvalidSelectorException ; 50 import javax.jms.JMSException ; 51 import javax.jms.Queue ; 52 import javax.jms.QueueConnection ; 53 import javax.jms.QueueSession ; 54 import javax.jms.ServerSessionPool ; 55 import javax.jms.Topic ; 56 57 58 67 class JmsQueueConnection extends JmsConnection implements QueueConnection { 68 69 81 public JmsQueueConnection(JmsConnectionFactory factory, String clientID, 82 String username, String password) 83 throws JMSException { 84 super(factory, clientID, username, password); 85 } 86 87 100 public QueueSession createQueueSession(boolean transacted, int ackMode) 101 throws JMSException { 102 103 ensureOpen(); 104 setModified(); 105 106 JmsQueueSession session = new JmsQueueSession(this, transacted, 107 ackMode); 108 109 if (!isStopped()) { 111 session.start(); 112 } 113 114 addSession(session); 116 117 return session; 118 } 119 120 134 public ConnectionConsumer createConnectionConsumer(Queue queue, 135 String selector, 136 ServerSessionPool pool, 137 int maxMessages) 138 throws JMSException { 139 return super.createConnectionConsumer(queue, selector, pool, 140 maxMessages); 141 } 142 143 149 public ConnectionConsumer createDurableConnectionConsumer( 150 Topic topic, String subscriptionName, String messageSelector, 151 ServerSessionPool sessionPool, int maxMessages) 152 throws JMSException { 153 throw new IllegalStateException ("Invalid operation for QueueConnection"); 154 } 155 156 } 157 | Popular Tags |