KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > logicalcobwebs > proxool > DefaultConnectionBuilder


1 /*
2  * This software is released under a licence similar to the Apache Software Licence.
3  * See org.logicalcobwebs.proxool.package.html for details.
4  * The latest version is available at http://proxool.sourceforge.net
5  */

6 package org.logicalcobwebs.proxool;
7
8 import java.sql.Connection JavaDoc;
9 import java.sql.DriverManager JavaDoc;
10 import java.sql.SQLException JavaDoc;
11 import java.util.Properties JavaDoc;
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     //
28
// -- ConnectionBuilderIF interface implementation ----------------------
29
//
30

31     /* (non-Javadoc)
32      * @see org.logicalcobwebs.proxool.ConnectionBuilderIF#buildConnection(org.logicalcobwebs.proxool.ConnectionPoolDefinitionIF)
33      */

34     public Connection JavaDoc buildConnection(ConnectionPoolDefinitionIF cpd) throws SQLException JavaDoc {
35         Connection JavaDoc realConnection = null;
36         final String JavaDoc url = cpd.getUrl();
37
38         Properties JavaDoc 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  */

52
Popular Tags