01: /*
02: * Copyright 2005 Joe Walker
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.directwebremoting.jms;
17:
18: import javax.jms.ConnectionFactory;
19: import javax.jms.JMSException;
20:
21: import org.apache.commons.logging.Log;
22: import org.apache.commons.logging.LogFactory;
23:
24: /**
25: * An implementation of {@link ConnectionFactory} for DWR
26: * @author Joe Walker [joe at getahead dot ltd dot uk]
27: */
28: public class DwrConnectionFactory implements ConnectionFactory {
29: /* (non-Javadoc)
30: * @see javax.jms.ConnectionFactory#createConnection()
31: */
32: public DwrConnection createConnection() throws JMSException {
33: return new DwrConnection();
34: }
35:
36: /* (non-Javadoc)
37: * @see javax.jms.ConnectionFactory#createConnection(java.lang.String, java.lang.String)
38: */
39: public DwrConnection createConnection(String username,
40: String password) throws JMSException {
41: log
42: .debug("DwrConnectionFactory.createConnection(username, password) is provided for convenience only. No passwords are used by DWR");
43: return new DwrConnection();
44: }
45:
46: /**
47: * The log stream
48: */
49: private static final Log log = LogFactory
50: .getLog(DwrConnectionFactory.class);
51: }
|