org.jaffa.persistence.engines.jdbcengine.datasource
Class DataSourceFactory

java.lang.Object
  extended byorg.jaffa.persistence.engines.jdbcengine.datasource.DataSourceFactory

public class DataSourceFactory
extends Object

Factory implementation for making us DataSource objects to execute DDL against. This uses a Connection pool to create DataSource objects.


Method Summary
static void freeDataSource(DataSource ds)
          Free up the DataSource.
static DataSource getDataSource(Database database)
          Returns a new DataSource instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDataSource

public static DataSource getDataSource(Database database)
                                throws DataSourceCreationException
Returns a new DataSource instance.

Parameters:
database - the configuration information for the data source.
Returns:
the DataSource.
Throws:
DataSourceCreationException - if the connection could not be acquired.

freeDataSource

public static void freeDataSource(DataSource ds)
Free up the DataSource. This will free up the underlying pooled connection.

Parameters:
ds - the DataSource.


Copyright © 2002-2004 JAFFA Project.