Class IdmLightSimpleConnectionProvider

java.lang.Object
org.opendaylight.aaa.datastore.h2.IdmLightSimpleConnectionProvider
All Implemented Interfaces:
ConnectionProvider

public class IdmLightSimpleConnectionProvider extends Object implements ConnectionProvider
Simple Provider of JDBC Connections, based on an IdmLightConfig and DriverManager.
Author:
Michael Vorburger
  • Constructor Details

    • IdmLightSimpleConnectionProvider

      public IdmLightSimpleConnectionProvider(IdmLightConfig config)
  • Method Details

    • getConnection

      public Connection getConnection() throws StoreException
      Get an SQL Connection.
      Specified by:
      getConnection in interface ConnectionProvider
      Returns:
      a connection from this Factory; it may be a brand new one obtained from the JDBC Driver, or an existing open one, if it has not previously been closed
      Throws:
      StoreException - if no Connection could be obtained
      Implementation Requirements:
      This implementation always opens a new connection. FIXME: Integrate a JdbcConnectionPool, as config is guaranteed to be constant. This is needlessly heavy, as we are locating the driver.