01: /*
02: * This software is released under a licence similar to the Apache Software Licence.
03: * See org.logicalcobwebs.proxool.package.html for details.
04: * The latest version is available at http://proxool.sourceforge.net
05: */
06: package org.logicalcobwebs.proxool;
07:
08: import java.sql.Connection;
09: import java.sql.DriverManager;
10: import java.sql.SQLException;
11: import java.util.Properties;
12:
13: /**
14: * @author Bertrand Renuart
15: *
16: */
17: public class DefaultConnectionBuilder implements ConnectionBuilderIF {
18:
19: /**
20: *
21: */
22: public DefaultConnectionBuilder() {
23: super ();
24: }
25:
26: //
27: // -- ConnectionBuilderIF interface implementation ----------------------
28: //
29:
30: /* (non-Javadoc)
31: * @see org.logicalcobwebs.proxool.ConnectionBuilderIF#buildConnection(org.logicalcobwebs.proxool.ConnectionPoolDefinitionIF)
32: */
33: public Connection buildConnection(ConnectionPoolDefinitionIF cpd)
34: throws SQLException {
35: Connection realConnection = null;
36: final String url = cpd.getUrl();
37:
38: Properties info = cpd.getDelegateProperties();
39: return DriverManager.getConnection(url, info);
40: }
41:
42: }
43:
44: /*
45: Revision history:
46: $Log: DefaultConnectionBuilder.java,v $
47: Revision 1.1 2004/03/25 22:02:15 brenuart
48: First step towards pluggable ConnectionBuilderIF & ConnectionValidatorIF.
49: Include some minor refactoring that lead to deprecation of some PrototyperController methods.
50:
51: */
|