public interface DataSourceFactory
javax.sql.DataSource
,
javax.sql.ConnectionPoolDataSource
, and
javax.sql.XADataSource
.
DataSource providers should implement this interface and register it as an
OSGi service with the JDBC driver class name in the
OSGI_JDBC_DRIVER_CLASS
property.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
JDBC_DATABASE_NAME
The "databaseName" property that DataSource clients should supply a value
for when calling
createDataSource(Properties) . |
static java.lang.String |
JDBC_DATASOURCE_NAME
The "dataSourceName" property that DataSource clients should supply a
value for when calling
createDataSource(Properties) . |
static java.lang.String |
JDBC_DESCRIPTION
The "description" property that DataSource clients should supply a value
for when calling
createDataSource(Properties) . |
static java.lang.String |
JDBC_INITIAL_POOL_SIZE
The "initialPoolSize" property that ConnectionPoolDataSource and
XADataSource clients may supply a value for when calling
createConnectionPoolDataSource(Properties) or
createXADataSource(Properties) on drivers that support this
property. |
static java.lang.String |
JDBC_MAX_IDLE_TIME
The "maxIdleTime" property that ConnectionPoolDataSource and XADataSource
clients may supply a value for when calling
createConnectionPoolDataSource(Properties) or
createXADataSource(Properties) on drivers that support this
property. |
static java.lang.String |
JDBC_MAX_POOL_SIZE
The "maxPoolSize" property that ConnectionPoolDataSource and XADataSource
clients may supply a value for when calling
createConnectionPoolDataSource(Properties) or
createXADataSource(Properties) on drivers that support this
property. |
static java.lang.String |
JDBC_MAX_STATEMENTS
The "maxStatements" property that ConnectionPoolDataSource and
XADataSource clients may supply a value for when calling
createConnectionPoolDataSource(Properties) or
createXADataSource(Properties) on drivers that support this
property. |
static java.lang.String |
JDBC_MIN_POOL_SIZE
The "minPoolSize" property that ConnectionPoolDataSource and XADataSource
clients may supply a value for when calling
createConnectionPoolDataSource(Properties) or
createXADataSource(Properties) on drivers that support this
property. |
static java.lang.String |
JDBC_NETWORK_PROTOCOL
The "networkProtocol" property that DataSource clients should supply a
value for when calling
createDataSource(Properties) . |
static java.lang.String |
JDBC_PASSWORD
The "password" property that DataSource clients should supply a value for
when calling
createDataSource(Properties) . |
static java.lang.String |
JDBC_PORT_NUMBER
The "portNumber" property that DataSource clients should supply a value
for when calling
createDataSource(Properties) . |
static java.lang.String |
JDBC_PROPERTY_CYCLE
The "propertyCycle" property that ConnectionPoolDataSource and
XADataSource clients may supply a value for when calling
createConnectionPoolDataSource(Properties) or
createXADataSource(Properties) on drivers that support this
property. |
static java.lang.String |
JDBC_ROLE_NAME
The "roleName" property that DataSource clients should supply a value for
when calling
createDataSource(Properties) . |
static java.lang.String |
JDBC_SERVER_NAME
The "serverName" property that DataSource clients should supply a value
for when calling
createDataSource(Properties) . |
static java.lang.String |
JDBC_URL
The "url" property that DataSource clients should supply a value for when
calling
createDataSource(Properties) . |
static java.lang.String |
JDBC_USER
The "user" property that DataSource clients should supply a value for
when calling
createDataSource(Properties) . |
static java.lang.String |
OSGI_JDBC_DRIVER_CLASS
Service property used by a JDBC driver to declare the driver class when
registering a JDBC DataSourceFactory service.
|
static java.lang.String |
OSGI_JDBC_DRIVER_NAME
Service property used by a JDBC driver to declare the driver name when
registering a JDBC DataSourceFactory service.
|
static java.lang.String |
OSGI_JDBC_DRIVER_VERSION
Service property used by a JDBC driver to declare the driver version when
registering a JDBC DataSourceFactory service.
|
Modifier and Type | Method and Description |
---|---|
javax.sql.ConnectionPoolDataSource |
createConnectionPoolDataSource(java.util.Properties props)
Create a new
ConnectionPoolDataSource using the given properties. |
javax.sql.DataSource |
createDataSource(java.util.Properties props)
Create a new
DataSource using the given properties. |
java.sql.Driver |
createDriver(java.util.Properties props)
Create a new
Driver using the given properties. |
javax.sql.XADataSource |
createXADataSource(java.util.Properties props)
Create a new
XADataSource using the given properties. |
static final java.lang.String OSGI_JDBC_DRIVER_CLASS
static final java.lang.String OSGI_JDBC_DRIVER_NAME
static final java.lang.String OSGI_JDBC_DRIVER_VERSION
static final java.lang.String JDBC_DATABASE_NAME
createDataSource(Properties)
.static final java.lang.String JDBC_DATASOURCE_NAME
createDataSource(Properties)
.static final java.lang.String JDBC_DESCRIPTION
createDataSource(Properties)
.static final java.lang.String JDBC_NETWORK_PROTOCOL
createDataSource(Properties)
.static final java.lang.String JDBC_PASSWORD
createDataSource(Properties)
.static final java.lang.String JDBC_PORT_NUMBER
createDataSource(Properties)
.static final java.lang.String JDBC_ROLE_NAME
createDataSource(Properties)
.static final java.lang.String JDBC_SERVER_NAME
createDataSource(Properties)
.static final java.lang.String JDBC_USER
createDataSource(Properties)
.static final java.lang.String JDBC_URL
createDataSource(Properties)
.static final java.lang.String JDBC_INITIAL_POOL_SIZE
createConnectionPoolDataSource(Properties)
or
createXADataSource(Properties)
on drivers that support this
property.static final java.lang.String JDBC_MAX_IDLE_TIME
createConnectionPoolDataSource(Properties)
or
createXADataSource(Properties)
on drivers that support this
property.static final java.lang.String JDBC_MAX_POOL_SIZE
createConnectionPoolDataSource(Properties)
or
createXADataSource(Properties)
on drivers that support this
property.static final java.lang.String JDBC_MAX_STATEMENTS
createConnectionPoolDataSource(Properties)
or
createXADataSource(Properties)
on drivers that support this
property.static final java.lang.String JDBC_MIN_POOL_SIZE
createConnectionPoolDataSource(Properties)
or
createXADataSource(Properties)
on drivers that support this
property.static final java.lang.String JDBC_PROPERTY_CYCLE
createConnectionPoolDataSource(Properties)
or
createXADataSource(Properties)
on drivers that support this
property.javax.sql.DataSource createDataSource(java.util.Properties props) throws java.sql.SQLException
DataSource
using the given properties.props
- The properties used to configure the DataSource
.
null
indicates no properties. If the property cannot be
set on the DataSource
being created then a
SQLException
must be thrown.DataSource
.java.sql.SQLException
- If the DataSource
cannot be created.javax.sql.ConnectionPoolDataSource createConnectionPoolDataSource(java.util.Properties props) throws java.sql.SQLException
ConnectionPoolDataSource
using the given properties.props
- The properties used to configure the
ConnectionPoolDataSource
. null
indicates no
properties. If the property cannot be set on the
ConnectionPoolDataSource
being created then a
SQLException
must be thrown.ConnectionPoolDataSource
.java.sql.SQLException
- If the ConnectionPoolDataSource
cannot be
created.javax.sql.XADataSource createXADataSource(java.util.Properties props) throws java.sql.SQLException
XADataSource
using the given properties.props
- The properties used to configure the XADataSource
.
null
indicates no properties. If the property cannot be
set on the XADataSource
being created then a
SQLException
must be thrown.XADataSource
.java.sql.SQLException
- If the XADataSource
cannot be created.java.sql.Driver createDriver(java.util.Properties props) throws java.sql.SQLException
Driver
using the given properties.props
- The properties used to configure the Driver
.
null
indicates no properties. If the property cannot be
set on the Driver
being created then a
SQLException
must be thrown.Driver
.java.sql.SQLException
- If the Driver
cannot be created.Copyright © OSGi Alliance (2000, 2018). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0