Class 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.
    • 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 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).
      java.sql.Driver createDriver​(java.util.Properties props)  
      javax.sql.XADataSource createXADataSource​(java.util.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 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 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).
        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