1. /*
  2. * Copyright 1999-2004 The Apache Software Foundation.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  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.apache.commons.dbcp.cpdsadapter;
  17. import java.sql.PreparedStatement;
  18. import java.sql.Connection;
  19. import java.sql.SQLException;
  20. import org.apache.commons.pool.KeyedObjectPool;
  21. import org.apache.commons.dbcp.PoolablePreparedStatement;
  22. /**
  23. * A {@link PoolablePreparedStatement} stub since activate and passivate
  24. * are declared protected and we need to be able to call them within this
  25. * package.
  26. *
  27. * @author John D. McNally
  28. * @version $Revision: 1.8 $ $Date: 2004/02/28 12:18:17 $
  29. */
  30. class PoolablePreparedStatementStub extends PoolablePreparedStatement {
  31. /**
  32. * Constructor
  33. * @param stmt my underlying {@link PreparedStatement}
  34. * @param key my key" as used by {@link KeyedObjectPool}
  35. * @param pool the {@link KeyedObjectPool} from which I was obtained.
  36. * @param conn the {@link Connection} from which I was created
  37. */
  38. public PoolablePreparedStatementStub(PreparedStatement stmt, Object key,
  39. KeyedObjectPool pool, Connection conn) {
  40. super(stmt, key, pool, conn);
  41. }
  42. protected void activate() throws SQLException {
  43. super.activate();
  44. }
  45. protected void passivate() throws SQLException {
  46. super.passivate();
  47. }
  48. }