Package org.postgresql.osgi
Class PGDataSourceFactory
- java.lang.Object
-
- org.postgresql.osgi.PGDataSourceFactory
-
- All Implemented Interfaces:
org.osgi.service.jdbc.DataSourceFactory
public class PGDataSourceFactory extends Object implements org.osgi.service.jdbc.DataSourceFactory
This factory service is designed to be used in OSGi Enterprise environments to create and configure JDBC data-sources.
-
-
Field Summary
-
Fields inherited from interface org.osgi.service.jdbc.DataSourceFactory
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 Summary
Constructors Constructor Description PGDataSourceFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectionPoolDataSourcecreateConnectionPoolDataSource(Properties props)DataSourcecreateDataSource(Properties props)Will create and return either aSimpleDataSourceor aPoolingDataSourcedepending on the presence in the supplied properties of any pool-related property (eg.:JDBC_INITIAL_POOL_SIZEorJDBC_MAX_POOL_SIZE).DrivercreateDriver(Properties props)XADataSourcecreateXADataSource(Properties props)
-
-
-
Method Detail
-
createDriver
public Driver createDriver(Properties props) throws SQLException
- Specified by:
createDriverin interfaceorg.osgi.service.jdbc.DataSourceFactory- Throws:
SQLException
-
createDataSource
public DataSource createDataSource(Properties props) throws SQLException
Will create and return either aSimpleDataSourceor aPoolingDataSourcedepending on the presence in the supplied properties of any pool-related property (eg.:JDBC_INITIAL_POOL_SIZEorJDBC_MAX_POOL_SIZE).- Specified by:
createDataSourcein interfaceorg.osgi.service.jdbc.DataSourceFactory- Throws:
SQLException
-
createConnectionPoolDataSource
public ConnectionPoolDataSource createConnectionPoolDataSource(Properties props) throws SQLException
- Specified by:
createConnectionPoolDataSourcein interfaceorg.osgi.service.jdbc.DataSourceFactory- Throws:
SQLException
-
createXADataSource
public XADataSource createXADataSource(Properties props) throws SQLException
- Specified by:
createXADataSourcein interfaceorg.osgi.service.jdbc.DataSourceFactory- Throws:
SQLException
-
-