01: /*
02: * $Id: JDBCConnection.java,v 1.3 2002/09/16 08:05:03 jkl Exp $
03: *
04: * Copyright (c) 2002 Njet Communications Ltd. All Rights Reserved.
05: *
06: * Use is subject to license terms, as defined in
07: * Anvil Sofware License, Version 1.1. See LICENSE
08: * file, or http://njet.org/license-1.1.txt
09: */
10: package anvil.database.jdbc;
11:
12: import java.io.IOException;
13: import java.sql.Connection;
14:
15: import anvil.database.PooledConnection;
16: import anvil.database.ConnectionPool;
17:
18: /**
19: * Concrete class wrapping java.sql.Connection objects.
20: *
21: * @version $Revision: 1.3 $
22: * @author Jani Lehtimäki
23: */
24: public class JDBCConnection extends PooledConnection {
25:
26: private Connection connection;
27:
28: /**
29: * Creates the connection.
30: *
31: * @param myPool Connection pool
32: * @param name Name of connection
33: * @param connection java.sql.Connection
34: */
35: public JDBCConnection(ConnectionPool myPool, String name,
36: Connection connection) {
37: super (myPool, name, connection);
38: this .connection = connection;
39: }
40:
41: protected boolean isConnectionClosed() throws Exception {
42: return connection.isClosed();
43: }
44:
45: protected void closeConnection() throws Exception {
46: connection.close();
47: }
48:
49: }
|