Interface GcJdbcConnectionProvider

All Known Implementing Classes:
NonPooledConnectionProvider

public interface GcJdbcConnectionProvider
gives connections and allows returns. e.b. dbcp pooling, c3p0 pooling, grouper built in db
  • Method Details

    • requiresJdbcConfigInSourcesXml

      boolean requiresJdbcConfigInSourcesXml()
      if the provider requires jdbc data in the subject.properties
      Returns:
      true if provider requires data in subject.properties
    • init

      void init(Properties properties, String sourceId, String driver, Integer maxActive, int defaultMaxActive, Integer maxIdle, int defaultMaxIdle, Integer maxWaitSeconds, int defaultMaxWaitSeconds, String dbUrl, String dbUser, String dbPassword, Boolean readOnly, boolean readOnlyDefault, String jdbcConfigId)
      init the pool
      Parameters:
      properties -
      sourceId - mainly for logging
      driver - driver
      maxActive - max active connection if pool
      defaultMaxActive - if max active is needed, and blank, then use this
      maxIdle - max idle connections if pool
      defaultMaxIdle - if max is needed, and blank, then use this
      maxWaitSeconds - max wait if pool empty in seconds. -1 means long time
      defaultMaxWaitSeconds - if max wait is needed, and blank, then use this, -1 mean long time
      dbUrl - jdbc url of the database
      dbUser - user to login to the database
      dbPassword - password for the database (unencrypted)
      readOnly - if conn should be readonly
      readOnlyDefault - default if not specified and needed
      jdbcConfigId - if blank or "grouper" then its the grouper database, otherwise its the configId in the grouper-loader.properties database entry
      Throws:
      SourceUnavailableException - if something is not right or not available
    • connectionBean

      GcJdbcConnectionBean connectionBean() throws SQLException
      get a connection (dont close this when done, just call "doneWithConnection()"
      Returns:
      the connection
      Throws:
      SQLException - if there is a problem