org.jpox.c3p0
Class C3P0DataSourceFactory

java.lang.Object
  extended byorg.jpox.c3p0.C3P0DataSourceFactory

public class C3P0DataSourceFactory
extends java.lang.Object

Plugin for the creation of a C3P0 connection pool. Note that all C3P0 classes are named explicitly in the code to avoid loading them at class initialisation. See http://www.mchange.com/projects/c3p0/index.html See http://www.sf.net/projects/c3p0

Version:
$Revision: 1.8 $

Field Summary
protected static org.jpox.util.Localiser LOCALISER
          Localisation of messages.
 
Constructor Summary
C3P0DataSourceFactory()
           
 
Method Summary
static javax.sql.DataSource makePooledDataSource(java.lang.String dbDriver, java.lang.String dbURL, java.lang.String dbUser, java.lang.String dbPassword, java.lang.String configFile)
          Method to make a C3P0 DataSource for use internally in JPOX.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOCALISER

protected static final org.jpox.util.Localiser LOCALISER
Localisation of messages.

Constructor Detail

C3P0DataSourceFactory

public C3P0DataSourceFactory()
Method Detail

makePooledDataSource

public static javax.sql.DataSource makePooledDataSource(java.lang.String dbDriver,
                                                        java.lang.String dbURL,
                                                        java.lang.String dbUser,
                                                        java.lang.String dbPassword,
                                                        java.lang.String configFile)
Method to make a C3P0 DataSource for use internally in JPOX.

Parameters:
dbDriver - The database driver name
dbURL - The database URL
dbUser - The database username
dbPassword - The database password
configFile - Location of any config properties file
Returns:
The DataSource
Throws:
java.lang.Exception - Thrown if an error occurs during creation


Copyright © 2003-2007 Java Persistent Objects (JPOX). All Rights Reserved.