protected void activate(ComponentContext componentContext) {
    if (log.isDebugEnabled()) {
      log.debug("RSS Cluster tools Admin bundle is activated.");
    }
    try {
      BundleContext bundleContext = componentContext.getBundleContext();
      PrivilegedCarbonContext.startTenantFlow();
      PrivilegedCarbonContext.getThreadLocalCarbonContext()
          .setTenantId(MultitenantConstants.SUPER_TENANT_ID);

      bundleContext.registerService(
          TransactionManagerDummyService.class.getName(),
          new TransactionManagerDummyService(),
          null);
      UsageManagerDataHolder.getInstance().initTransactionManager();

      // initialize configurations
      StorageMetaDataConfig.getInstance().init();
      StorageDataPublishManager.getInstance().init(taskService, secretCallbackHandlerService);
      UsageManagerDataHolder.getInstance().setRSSManagerService(this.RSSManagerService);
      UsageManagerDataHolder.getInstance().setRealmService(realmService);

    } catch (Exception e) {
      log.error(e);
      if (log.isDebugEnabled()) {
        log.debug("Error while initializing configurations ", e);
      }
    } finally {
      PrivilegedCarbonContext.endTenantFlow();
    }
  }
 protected void deactivate(ComponentContext componentContext) {
   if (log.isDebugEnabled()) {
     log.debug("RSS Cluster tools Admin bundle is deactivated.");
   }
   StorageDataPublishManager.getInstance().destroy();
   StorageMetaDataConfig.getInstance().destroy();
   UsageManagerDataHolder.getInstance().setRSSManagerService(null);
 }