01: package org.mockejb.jms;
02:
03: import javax.jms.*;
04:
05: /**
06: * <code>TopicConnectionFactory</code> implementation.
07: * @author Dimitar Gospodinov
08: */
09: public class TopicConnectionFactoryImpl implements
10: TopicConnectionFactory {
11:
12: private static int clientIdSequence = 1;
13:
14: public Connection createConnection() throws JMSException {
15: return createTopicConnection();
16: }
17:
18: public Connection createConnection(String userName, String password)
19: throws JMSException {
20: return createTopicConnection(userName, password);
21: }
22:
23: public TopicConnection createTopicConnection(String userName,
24: String password) throws JMSException {
25: return createTopicConnection();
26: }
27:
28: public TopicConnection createTopicConnection() throws JMSException {
29: return new TopicConnectionImpl(clientIdSequence++);
30: }
31: }
|