org.postgresql.osgi
Class PGDataSourceFactory

java.lang.Object
  extended by 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
PGDataSourceFactory()
           
 
Method Summary
 ConnectionPoolDataSource createConnectionPoolDataSource(Properties props)
           
 DataSource createDataSource(Properties props)
          Will create and return either a SimpleDataSource or a PoolingDataSource depending on the presence in the supplied properties of any pool-related property (eg.: JDBC_INITIAL_POOL_SIZE or JDBC_MAX_POOL_SIZE)
 Driver createDriver(Properties props)
           
 XADataSource createXADataSource(Properties props)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PGDataSourceFactory

public PGDataSourceFactory()
Method Detail

createDriver

public Driver createDriver(Properties props)
                    throws SQLException
Specified by:
createDriver in interface org.osgi.service.jdbc.DataSourceFactory
Throws:
SQLException

createDataSource

public DataSource createDataSource(Properties props)
                            throws SQLException
Will create and return either a SimpleDataSource or a PoolingDataSource depending on the presence in the supplied properties of any pool-related property (eg.: JDBC_INITIAL_POOL_SIZE or JDBC_MAX_POOL_SIZE)

Specified by:
createDataSource in interface org.osgi.service.jdbc.DataSourceFactory
Throws:
SQLException

createConnectionPoolDataSource

public ConnectionPoolDataSource createConnectionPoolDataSource(Properties props)
                                                        throws SQLException
Specified by:
createConnectionPoolDataSource in interface org.osgi.service.jdbc.DataSourceFactory
Throws:
SQLException

createXADataSource

public XADataSource createXADataSource(Properties props)
                                throws SQLException
Specified by:
createXADataSource in interface org.osgi.service.jdbc.DataSourceFactory
Throws:
SQLException


Copyright © 2016 PostgreSQL Global Development Group. All rights reserved.