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