01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: package org.apache.commons.dbcp.cpdsadapter;
19:
20: import java.sql.PreparedStatement;
21: import java.sql.Connection;
22: import java.sql.SQLException;
23: import org.apache.commons.pool.KeyedObjectPool;
24: import org.apache.commons.dbcp.PoolablePreparedStatement;
25:
26: /**
27: * A {@link PoolablePreparedStatement} stub since activate and passivate
28: * are declared protected and we need to be able to call them within this
29: * package.
30: *
31: * @author John D. McNally
32: * @version $Revision: 479137 $ $Date: 2006-11-25 08:51:48 -0700 (Sat, 25 Nov 2006) $
33: */
34: class PoolablePreparedStatementStub extends PoolablePreparedStatement {
35:
36: /**
37: * Constructor
38: * @param stmt my underlying {@link PreparedStatement}
39: * @param key my key" as used by {@link KeyedObjectPool}
40: * @param pool the {@link KeyedObjectPool} from which I was obtained.
41: * @param conn the {@link Connection} from which I was created
42: */
43: public PoolablePreparedStatementStub(PreparedStatement stmt,
44: Object key, KeyedObjectPool pool, Connection conn) {
45: super (stmt, key, pool, conn);
46: }
47:
48: protected void activate() throws SQLException {
49: super .activate();
50: }
51:
52: protected void passivate() throws SQLException {
53: super.passivate();
54: }
55: }
|