Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package pt.webdetails.cda;
 
 
 import  org.apache.commons.logging.Log;
 import  org.apache.commons.logging.LogFactory;
 import  org.pentaho.platform.api.engine.IPluginLifecycleListener;
 import  org.pentaho.platform.api.engine.PluginLifecycleException;
import  org.pentaho.reporting.engine.classic.core.metadata.DefaultDataFactoryMetaData;
import  org.pentaho.reporting.engine.classic.core.metadata.DataFactoryRegistry;
import  org.pentaho.reporting.engine.classic.core.metadata.DefaultDataFactoryCore;


This class inits Cda plugin within the bi-platform

Author(s):
gorman
public class CdaLifecycleListener implements IPluginLifecycleListener
  static Log logger = LogFactory.getLog(CacheScheduleManager.class);
  public void init() throws PluginLifecycleException
  {
    // boot cda
    CdaBoot.getInstance().start();
    PluginHibernateUtil.initialize();
    Class yourDataFactoryClass = CompactBandedMDXDataFactory.class// CHANGE ME!
    DefaultDataFactoryMetaData dmd = new DefaultDataFactoryMetaData
            (yourDataFactoryClass.getName(), """"truefalsetruefalsefalsefalsefalsefalsenew DefaultDataFactoryCore(), 0);
    DataFactoryRegistry.getInstance().register(dmd);
  }
  public void loaded() throws PluginLifecycleException
  {
    ClassLoader contextCL = Thread.currentThread().getContextClassLoader();
    try
    {
      CdaBoot.getInstance().getGlobalConfig(); //Load configuration to ensure class loader is correct
      //CacheScheduleManager.getInstance().coldInit();
    }
    catch (Exception e)
    {
      .error(Util.getExceptionDescription(e));
    }
    finally
    {
      Thread.currentThread().setContextClassLoader(contextCL);
    }
  }
  public void unLoaded() throws PluginLifecycleException
  {
  }
New to GrepCode? Check out our FAQ X