public class OsgiDataSourceFactory extends Object implements org.osgi.service.jdbc.DataSourceFactory
DataSourceFactory.JDBC_USER
, DataSourceFactory.JDBC_PASSWORD
, DataSourceFactory.JDBC_DESCRIPTION
,
DataSourceFactory.JDBC_DATASOURCE_NAME
, DataSourceFactory.JDBC_NETWORK_PROTOCOL
,
DataSourceFactory.JDBC_URL
, DataSourceFactory.JDBC_SERVER_NAME
, DataSourceFactory.JDBC_PORT_NUMBER
. The
following standard configuration properties are not supported:
DataSourceFactory.JDBC_ROLE_NAME
, DataSourceFactory.JDBC_DATABASE_NAME
,
DataSourceFactory.JDBC_INITIAL_POOL_SIZE
, DataSourceFactory.JDBC_MAX_POOL_SIZE
,
DataSourceFactory.JDBC_MIN_POOL_SIZE
, DataSourceFactory.JDBC_MAX_IDLE_TIME
,
DataSourceFactory.JDBC_MAX_STATEMENTS
, DataSourceFactory.JDBC_PROPERTY_CYCLE
. Any other
property will be treated as a H2 specific option. If the DataSourceFactory.JDBC_URL
property is passed to any of the DataSource factories, the following
properties will be ignored: DataSourceFactory.JDBC_DATASOURCE_NAME
,
DataSourceFactory.JDBC_NETWORK_PROTOCOL
, DataSourceFactory.JDBC_SERVER_NAME
,
DataSourceFactory.JDBC_PORT_NUMBER
.JDBC_DATABASE_NAME, JDBC_DATASOURCE_NAME, JDBC_DESCRIPTION, JDBC_INITIAL_POOL_SIZE, JDBC_MAX_IDLE_TIME, JDBC_MAX_POOL_SIZE, JDBC_MAX_STATEMENTS, JDBC_MIN_POOL_SIZE, JDBC_NETWORK_PROTOCOL, JDBC_PASSWORD, JDBC_PORT_NUMBER, JDBC_PROPERTY_CYCLE, JDBC_ROLE_NAME, JDBC_SERVER_NAME, JDBC_URL, JDBC_USER, OSGI_JDBC_DRIVER_CLASS, OSGI_JDBC_DRIVER_NAME, OSGI_JDBC_DRIVER_VERSION
Constructor and Description |
---|
OsgiDataSourceFactory(Driver driver) |
Modifier and Type | Method and Description |
---|---|
ConnectionPoolDataSource |
createConnectionPoolDataSource(Properties properties)
Creates a pooled data source.
|
DataSource |
createDataSource(Properties properties)
Creates a basic data source.
|
Driver |
createDriver(Properties properties)
Returns a driver.
|
XADataSource |
createXADataSource(Properties properties)
Creates a pooled XA data source.
|
public OsgiDataSourceFactory(Driver driver)
public DataSource createDataSource(Properties properties) throws SQLException
createDataSource
in interface org.osgi.service.jdbc.DataSourceFactory
properties
- the properties for the data source.SQLException
- if unsupported properties are supplied, or if data
source can not be created.public ConnectionPoolDataSource createConnectionPoolDataSource(Properties properties) throws SQLException
createConnectionPoolDataSource
in interface org.osgi.service.jdbc.DataSourceFactory
properties
- the properties for the data source.SQLException
- if unsupported properties are supplied, or if data
source can not be created.public XADataSource createXADataSource(Properties properties) throws SQLException
createXADataSource
in interface org.osgi.service.jdbc.DataSourceFactory
properties
- the properties for the data source.SQLException
- if unsupported properties are supplied, or if data
source can not be created.public Driver createDriver(Properties properties) throws SQLException
createDriver
in interface org.osgi.service.jdbc.DataSourceFactory
properties
- must be null or empty list.SQLException
- if any property is supplied.Copyright © 2017 JBoss by Red Hat. All rights reserved.