01: /*
02: * Copyright 2004-2005 OpenSymphony
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License"); you may not
05: * use this file except in compliance with the License. You may obtain a copy
06: * 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, WITHOUT
12: * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13: * License for the specific language governing permissions and limitations
14: * under the License.
15: *
16: */
17:
18: /*
19: * Previously Copyright (c) 2001-2004 James House
20: */
21: package org.quartz.utils;
22:
23: import java.sql.Connection;
24: import java.sql.SQLException;
25:
26: /**
27: * Implementations of this interface used by <code>DBConnectionManager</code>
28: * to provide connections from various sources.
29: *
30: * @see DBConnectionManager
31: * @see PoolingConnectionProvider
32: * @see JNDIConnectionProvider
33: * @see org.quartz.utils.weblogic.WeblogicConnectionProvider
34: *
35: * @author Mohammad Rezaei
36: */
37: public interface ConnectionProvider {
38: /*
39: * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
40: *
41: * Interface.
42: *
43: * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
44: */
45:
46: /**
47: * @return connection managed by this provider
48: * @throws SQLException
49: */
50: Connection getConnection() throws SQLException;
51:
52: void shutdown() throws SQLException;
53: }
|