org.dbmaintain.datasource
Class SimpleDataSource

java.lang.Object
  extended by org.dbmaintain.datasource.SimpleDataSource

public class SimpleDataSource
extends Object

Factory class for a very simple DataSource that provides access to a database without any connection pooling facilities. Only the parameterless getConnection() method is implemented.

Since:
3-jan-2009
Author:
Filip Neven, Tim Ducheyne

Nested Class Summary
protected static class SimpleDataSource.SimpleDataSourceInvocationHandler
          Invocation handler for a dynamic proxy that implements the javax.sql.DataSource interface.
 
Constructor Summary
SimpleDataSource()
           
 
Method Summary
static DataSource createDataSource(DatabaseInfo databaseInfo)
          Static factory that returns a data source providing access to the database using the driver with the given driver class name, the given connection url, user name and password
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleDataSource

public SimpleDataSource()
Method Detail

createDataSource

public static DataSource createDataSource(DatabaseInfo databaseInfo)
Static factory that returns a data source providing access to the database using the driver with the given driver class name, the given connection url, user name and password

Parameters:
databaseInfo - The database connection parameters, not null
Returns:
a DataSource that gives access to the database


Copyright © 2011. All Rights Reserved.