Package org.apache.openjpa.jdbc.schema
Class DataSourceFactory
java.lang.Object
org.apache.openjpa.jdbc.schema.DataSourceFactory
Factory for
DataSource objects. The factory uses the supplied
configuration to obtain a 3rd-party datasource or to create one, and
to setup prepared statement caching.- Author:
- Abe White
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidClose the given data source.static DecoratingDataSourcedecorateDataSource(DataSource ds, JDBCConfiguration conf, boolean factory2) Install listeners and base decorators.static DataSourcedefaultsDataSource(DataSource ds, String user, String pass) Return a data source with the given user name and password pre-configured as the defaults whenDataSource.getConnection()is called.static DecoratingDataSourceinstallDBDictionary(DBDictionary dict, DecoratingDataSource ds, JDBCConfiguration conf, boolean factory2) Install things deferred until the DBDictionary instance is available.static DataSourcenewDataSource(JDBCConfiguration conf, boolean factory2) Create a datasource using the given configuration.
-
Field Details
-
_eloc
-
-
Constructor Details
-
DataSourceFactory
public DataSourceFactory()
-
-
Method Details
-
newDataSource
Create a datasource using the given configuration. -
decorateDataSource
public static DecoratingDataSource decorateDataSource(DataSource ds, JDBCConfiguration conf, boolean factory2) Install listeners and base decorators. -
installDBDictionary
public static DecoratingDataSource installDBDictionary(DBDictionary dict, DecoratingDataSource ds, JDBCConfiguration conf, boolean factory2) Install things deferred until the DBDictionary instance is available. -
defaultsDataSource
Return a data source with the given user name and password pre-configured as the defaults whenDataSource.getConnection()is called. -
closeDataSource
Close the given data source.
-