use of org.pentaho.platform.api.engine.PluginLifecycleException in project pdi-platform-plugin by pentaho.
the class PdiLifecycleListener method init.
public void init() throws PluginLifecycleException {
try {
KettleSystemListener.environmentInit(null);
KettleLogStore.getAppender().addLoggingEventListener(new Slf4jLoggingEventListener());
} catch (KettleException e) {
throw new PluginLifecycleException(e);
}
}
use of org.pentaho.platform.api.engine.PluginLifecycleException in project data-access by pentaho.
the class DataAccessLifecycleListener method ready.
@Override
public void ready() throws PluginLifecycleException {
// the platform is booted, spring initialized, all plugins init and loaded
boolean enableAgilemartDatasource = false;
try {
IPluginResourceLoader resLoader = PentahoSystem.get(IPluginResourceLoader.class, null);
enableAgilemartDatasource = Boolean.parseBoolean(resLoader.getPluginSetting(DataAccessLifecycleListener.class, ENABLE_AGILEMART_DATASOURCE, "false"));
} catch (Throwable t) {
log.warn(t.getMessage(), t);
}
if (enableAgilemartDatasource) {
try {
SecurityHelper.getInstance().runAsSystem(new Callable<Void>() {
public Void call() throws Exception {
AgileMartDatasourceLifecycleManager.getInstance().startup();
return null;
}
});
} catch (Exception e) {
log.warn(e.getMessage(), e);
}
DelegatingBackingRepositoryLifecycleManager manager = PentahoSystem.get(DelegatingBackingRepositoryLifecycleManager.class, "backingRepositoryLifecycleManager", null);
manager.addLifeCycleManager(AgileMartDatasourceLifecycleManager.getInstance());
}
}
Aggregations