Class AGConnectionPoolDataSource

java.lang.Object
net.bitnine.agensgraph.ds.common.BaseDataSource
net.bitnine.agensgraph.ds.AGConnectionPoolDataSource
All Implemented Interfaces:
Serializable, Referenceable, CommonDataSource, ConnectionPoolDataSource

public class AGConnectionPoolDataSource extends BaseDataSource implements ConnectionPoolDataSource, Serializable
See Also:
  • Constructor Details

    • AGConnectionPoolDataSource

      public AGConnectionPoolDataSource()
  • Method Details

    • getDescription

      public String getDescription()
      Gets a description of this DataSource.
      Specified by:
      getDescription in class BaseDataSource
      Returns:
      description of this DataSource-ish thing
    • getPooledConnection

      public PooledConnection getPooledConnection() throws SQLException
      Gets a connection which may be pooled by the app server or middleware implementation of DataSource.
      Specified by:
      getPooledConnection in interface ConnectionPoolDataSource
      Throws:
      SQLException - Occurs when the physical database connection cannot be established.
    • getPooledConnection

      public PooledConnection getPooledConnection(String user, String password) throws SQLException
      Gets a connection which may be pooled by the app server or middleware implementation of DataSource.
      Specified by:
      getPooledConnection in interface ConnectionPoolDataSource
      Throws:
      SQLException - Occurs when the physical database connection cannot be established.
    • isDefaultAutoCommit

      public boolean isDefaultAutoCommit()
      Gets whether connections supplied by this pool will have autoCommit turned on by default. The default value is true, so that autoCommit will be turned on by default.
      Returns:
      true if connections supplied by this pool will have autoCommit
    • setDefaultAutoCommit

      public void setDefaultAutoCommit(boolean defaultAutoCommit)
      Sets whether connections supplied by this pool will have autoCommit turned on by default. The default value is true, so that autoCommit will be turned on by default.
      Parameters:
      defaultAutoCommit - whether connections supplied by this pool will have autoCommit