Search in sources :

Example 1 with PooledDatasourceSystemListener

use of org.pentaho.platform.engine.services.connection.datasource.dbcp.PooledDatasourceSystemListener in project pentaho-platform by pentaho.

the class PentahoBoot method enablePooledDatasources.

/**
 * Enables the pooled datasources
 */
public void enablePooledDatasources() {
    IPentahoObjectFactory objectFactory = getFactory();
    if (objectFactory instanceof IPentahoDefinableObjectFactory) {
        define(IDBDatasourceService.class, PooledOrJndiDatasourceService.class, Scope.LOCAL);
        define(IPooledDatasourceService.class, PooledDatasourceService.class, Scope.LOCAL);
        define(IJndiDatasourceService.class, JndiDatasourceService.class, Scope.LOCAL);
    }
    addLifecycleListener(new PooledDatasourceSystemListener());
}
Also used : IPentahoDefinableObjectFactory(org.pentaho.platform.api.engine.IPentahoDefinableObjectFactory) IPentahoObjectFactory(org.pentaho.platform.api.engine.IPentahoObjectFactory) PooledDatasourceSystemListener(org.pentaho.platform.engine.services.connection.datasource.dbcp.PooledDatasourceSystemListener)

Aggregations

IPentahoDefinableObjectFactory (org.pentaho.platform.api.engine.IPentahoDefinableObjectFactory)1 IPentahoObjectFactory (org.pentaho.platform.api.engine.IPentahoObjectFactory)1 PooledDatasourceSystemListener (org.pentaho.platform.engine.services.connection.datasource.dbcp.PooledDatasourceSystemListener)1