JDBC_USER, JDBC_PASSWORD, JDBC_DESCRIPTION,
JDBC_DATASOURCE_NAME, JDBC_NETWORK_PROTOCOL,
JDBC_URL, JDBC_SERVER_NAME, JDBC_PORT_NUMBER. The
following standard configuration properties are not supported:
JDBC_ROLE_NAME, JDBC_DATABASE_NAME,
JDBC_INITIAL_POOL_SIZE, JDBC_MAX_POOL_SIZE,
JDBC_MIN_POOL_SIZE, JDBC_MAX_IDLE_TIME,
JDBC_MAX_STATEMENTS, JDBC_PROPERTY_CYCLE. Any other
property will be treated as a H2 specific option. If the JDBC_URL
property is passed to any of the DataSource factories, the following
properties will be ignored: JDBC_DATASOURCE_NAME,
JDBC_NETWORK_PROTOCOL, JDBC_SERVER_NAME,
JDBC_PORT_NUMBER.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public ConnectionPoolDataSource | Returns: a new data source.the properties for the data source. properties)Implements org. Creates a pooled data source. |
| public DataSource | Returns: a new data source.the properties for the data source. properties)Implements org. Creates a basic data source. |
| public Driver | Returns: a driver.must be null or empty list. properties)Implements org. Returns a driver. |
| public XADataSource | Returns: a new data source.the properties for the data source. properties)Implements org. Creates a pooled XA data source. |
| pack-priv static void | registerService(BundleContext
the bundle context bundleContext, Driver the driver driver)Register the H2 JDBC driver service. |
| private static void | rejectPoolingOptions(Properties
the properties to check p)Checker method that will throw if any pooling related standard OSGi options are present. |
| private static void | rejectUnsupportedOptions(Properties
the properties to check p)Checker method that will throw if any unsupported standard OSGi options is present. |
| private static void | setupH2DataSource(JdbcDataSource
the data source to configure dataSource, Properties the properties to apply to the data source p)Applies common OSGi properties to a H2 data source. |
| driver | back to summary |
|---|---|
| private final Driver driver | |
| OsgiDataSourceFactory | back to summary |
|---|---|
| public OsgiDataSourceFactory(Driver driver) | |
| createConnectionPoolDataSource | back to summary |
|---|---|
| public ConnectionPoolDataSource createConnectionPoolDataSource(Properties properties) throws SQLException Implements org. Creates a pooled data source.
| |
| createDataSource | back to summary |
|---|---|
| public DataSource createDataSource(Properties properties) throws SQLException Implements org. Creates a basic data source.
| |
| createDriver | back to summary |
|---|---|
| public Driver createDriver(Properties properties) throws SQLException Implements org. Returns a driver. The H2 driver does not support any properties.
| |
| createXADataSource | back to summary |
|---|---|
| public XADataSource createXADataSource(Properties properties) throws SQLException Implements org. Creates a pooled XA data source.
| |
| registerService | back to summary |
|---|---|
| pack-priv static void registerService(BundleContext bundleContext, Driver driver) Register the H2 JDBC driver service.
| |
| rejectPoolingOptions | back to summary |
|---|---|
| private static void rejectPoolingOptions(Properties p) throws SQLFeatureNotSupportedException Checker method that will throw if any pooling related standard OSGi options are present.
| |
| rejectUnsupportedOptions | back to summary |
|---|---|
| private static void rejectUnsupportedOptions(Properties p) throws SQLFeatureNotSupportedException Checker method that will throw if any unsupported standard OSGi options is present.
| |
| setupH2DataSource | back to summary |
|---|---|
| private static void setupH2DataSource(JdbcDataSource dataSource, Properties p) Applies common OSGi properties to a H2 data source. Non standard properties will be applied as H2 options.
| |