01: package net.sourceforge.jaxor.db;
02:
03: import net.sourceforge.jaxor.api.ConnectionFactory;
04:
05: import java.sql.Connection;
06:
07: /*
08: * User: Mike
09: * Date: Jul 16, 2003
10: * Time: 5:45:40 PM
11: */
12:
13: /**
14: * Reuses a single connection, always returning the same connection;
15: */
16: public class SingleConnectionFactory implements ConnectionFactory {
17: private transient Connection conn;
18:
19: public SingleConnectionFactory(Connection conn) {
20: this .conn = conn;
21: }
22:
23: public Connection getConnection() {
24: return conn;
25: }
26:
27: }
|