Package org.postgresql.osgi
Class PGDataSourceFactory
- java.lang.Object
-
- org.postgresql.osgi.PGDataSourceFactory
-
public class PGDataSourceFactory extends java.lang.Object
This factory service is designed to be used in OSGi Enterprise environments to create and configure JDBC data-sources.
-
-
Constructor Summary
Constructors Constructor Description PGDataSourceFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.sql.ConnectionPoolDataSource
createConnectionPoolDataSource(java.util.Properties props)
javax.sql.DataSource
createDataSource(java.util.Properties props)
Will create and return either aSimpleDataSource
or aPoolingDataSource
depending on the presence in the supplied properties of any pool-related property (eg.:JDBC_INITIAL_POOL_SIZE
orJDBC_MAX_POOL_SIZE
).java.sql.Driver
createDriver(java.util.Properties props)
javax.sql.XADataSource
createXADataSource(java.util.Properties props)
-
-
-
Method Detail
-
createDriver
public java.sql.Driver createDriver(java.util.Properties props) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
createDataSource
public javax.sql.DataSource createDataSource(java.util.Properties props) throws java.sql.SQLException
Will create and return either aSimpleDataSource
or aPoolingDataSource
depending on the presence in the supplied properties of any pool-related property (eg.:JDBC_INITIAL_POOL_SIZE
orJDBC_MAX_POOL_SIZE
).- Throws:
java.sql.SQLException
-
createConnectionPoolDataSource
public javax.sql.ConnectionPoolDataSource createConnectionPoolDataSource(java.util.Properties props) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
createXADataSource
public javax.sql.XADataSource createXADataSource(java.util.Properties props) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
-