KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > lutris > appserver > server > sql > oracle > OracleConnectionAllocator


1 /*
2  * Enhydra Java Application Server Project
3  *
4  * The contents of this file are subject to the Enhydra Public License
5  * Version 1.1 (the "License"); you may not use this file except in
6  * compliance with the License. You may obtain a copy of the License on
7  * the Enhydra web site ( http://www.enhydra.org/ ).
8  *
9  * Software distributed under the License is distributed on an "AS IS"
10  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
11  * the License for the specific terms governing rights and limitations
12  * under the License.
13  *
14  * The Initial Developer of the Enhydra Application Server is Lutris
15  * Technologies, Inc. The Enhydra Application Server and portions created
16  * by Lutris Technologies, Inc. are Copyright Lutris Technologies, Inc.
17  * All Rights Reserved.
18  *
19  * Contributor(s):
20  *
21  * $Id: OracleConnectionAllocator.java,v 1.1 2004/09/03 13:42:52 sinisa Exp $
22  */

23 package com.lutris.appserver.server.sql.oracle;
24
25 import java.sql.SQLException JavaDoc;
26 import com.lutris.appserver.server.sql.DBConnection;
27 import com.lutris.appserver.server.sql.standard.StandardConnectionAllocator;
28 import com.lutris.util.Config;
29 import com.lutris.util.ConfigException;
30
31 /**
32  * An Oracle database connection allocator used by the Oracle logical
33  * database.
34  *
35  * @see StandardConnectionAllocator
36  * @author Paul Morgan
37  * @since LBS1.8
38  * @version $Revision: 1.1 $
39  */

40 public class OracleConnectionAllocator extends StandardConnectionAllocator {
41
42     /**
43      * Creates an Oracle database connection allocator.
44      *
45      * @see StandardConnectionAllocator#StandardConnectionAllocator
46      * @param logicalDatabase
47      * the logical Oracle database for which connections are pooled.
48      * @param connectionConfig
49      * configuration parameters for the database connections. There
50      * are no Informix specific configuration data.
51      * @exception ConfigException
52      * If bad configuration information is given in the config file.
53      */

54     protected OracleConnectionAllocator(OracleLogicalDatabase logicalDatabase,
55             Config connectionConfig)
56         throws ConfigException {
57         super(logicalDatabase, connectionConfig);
58     }
59
60     /**
61      * Creates a new Oracle connection to be added to the connection pool.
62      *
63      * @exception SQLException If a SQL error occures.
64      */

65     protected DBConnection createConnection()
66         throws SQLException JavaDoc {
67         return new OracleDBConnection(this, url, user, password,
68                 maxPreparedStatements, sqlLogging, generation);
69     }
70 }
71
Popular Tags