KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > lutris > appserver > server > sql > DataSourceDBConnectionFactory


1 /*
2  * Created on Jun 7, 2004
3  *
4  */

5 package com.lutris.appserver.server.sql;
6
7 import javax.sql.DataSource JavaDoc;
8 import com.lutris.appserver.server.sql.datasource.DataSourceDBConnection;
9
10 /**
11  *
12  */

13 public class DataSourceDBConnectionFactory implements AbstractDBConnectionFactory{
14
15     /**
16      *
17      */

18     public DBConnection createConnection(ConnectionAllocator connectionAllocatorObj,
19            String JavaDoc url, String JavaDoc user, String JavaDoc password, int maxPreparedStatements, boolean logging, int generation)
20     throws java.sql.SQLException JavaDoc{
21          DBConnection dbConnection = new DataSourceDBConnection(connectionAllocatorObj,
22                                          url,user,password,maxPreparedStatements,logging,generation);
23          return dbConnection;
24     }
25     /**
26      *
27      */

28     public DBConnection createConnection(ConnectionAllocator connectionAllocatorObj,
29            DataSource JavaDoc dataSource, int maxPreparedStatements, boolean logging, int generation)
30     throws java.sql.SQLException JavaDoc{
31          DBConnection dbConnection = new DataSourceDBConnection(connectionAllocatorObj,
32                                         dataSource ,maxPreparedStatements,logging,generation);
33          return dbConnection;
34     }
35 }
36
Popular Tags