1 45 package org.exolab.jms.client; 46 47 import javax.jms.ConnectionConsumer ; 48 import javax.jms.InvalidSelectorException ; 49 import javax.jms.JMSException ; 50 import javax.jms.ServerSessionPool ; 51 import javax.jms.Topic ; 52 import javax.jms.TopicConnection ; 53 import javax.jms.TopicSession ; 54 55 56 64 class JmsTopicConnection extends JmsConnection implements TopicConnection { 65 66 78 public JmsTopicConnection(JmsConnectionFactory factory, String clientID, 79 String username, String password) 80 throws JMSException { 81 super(factory, clientID, username, password); 82 } 83 84 97 public TopicSession createTopicSession(boolean transacted, int ackMode) 98 throws JMSException { 99 100 ensureOpen(); 101 setModified(); 102 103 JmsTopicSession session = null; 104 105 session = new JmsTopicSession(this, transacted, ackMode); 106 if (!isStopped()) { 107 session.start(); 108 } 109 110 addSession(session); 112 113 return session; 114 } 115 116 130 public ConnectionConsumer createConnectionConsumer(Topic topic, 131 String selector, 132 ServerSessionPool pool, 133 int maxMessages) 134 throws JMSException { 135 return super.createConnectionConsumer(topic, selector, pool, 136 maxMessages); 137 } 138 139 154 public ConnectionConsumer createDurableConnectionConsumer( 155 Topic topic, String subscriptionName, String selector, 156 ServerSessionPool pool, int maxMessages) 157 throws JMSException { 158 return super.createDurableConnectionConsumer(topic, subscriptionName, 159 selector, pool, 160 maxMessages); 161 } 162 163 } 164 | Popular Tags |