public class DataSourceFactory extends Object
DataSource
objects. The factory uses the supplied
configuration to obtain a 3rd-party datasource or to create one, and
to setup prepared statement caching.Constructor and Description |
---|
DataSourceFactory() |
Modifier and Type | Method and Description |
---|---|
static void |
closeDataSource(DataSource ds)
Close the given data source.
|
static DecoratingDataSource |
decorateDataSource(DataSource ds,
JDBCConfiguration conf,
boolean factory2)
Install listeners and base decorators.
|
static DataSource |
defaultsDataSource(DataSource ds,
String user,
String pass)
Return a data source with the given user name and password
pre-configured as the defaults when
DataSource.getConnection()
is called. |
static DecoratingDataSource |
installDBDictionary(DBDictionary dict,
DecoratingDataSource ds,
JDBCConfiguration conf,
boolean factory2)
Install things deferred until the DBDictionary instance is available.
|
static DataSource |
newDataSource(JDBCConfiguration conf,
boolean factory2)
Create a datasource using the given configuration.
|
protected static Localizer _eloc
public static DataSource newDataSource(JDBCConfiguration conf, boolean factory2)
public static DecoratingDataSource decorateDataSource(DataSource ds, JDBCConfiguration conf, boolean factory2)
public static DecoratingDataSource installDBDictionary(DBDictionary dict, DecoratingDataSource ds, JDBCConfiguration conf, boolean factory2)
public static DataSource defaultsDataSource(DataSource ds, String user, String pass)
DataSource.getConnection()
is called.public static void closeDataSource(DataSource ds)
Copyright © 2006–2017 Apache Software Foundation. All rights reserved.