org.osgi.service.component.annotations.Activate Java Examples

The following examples show how to use org.osgi.service.component.annotations.Activate. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SAML2ConfigServiceImpl.java    From sling-whiteboard with Apache License 2.0 6 votes vote down vote up
@Activate
protected void activate(final AuthenticationHandlerSAML2Config config, ComponentContext componentContext) {
    this.path = config.path();
    this.saml2SessAttr = config.saml2SessionAttr();
    this.saml2SPEnabled = config.saml2SPEnabled();
    this.saml2IDPDestination = config.saml2IDPDestination();
    this.uidAttrName = config.saml2userIDAttr();
    this.samlUserHome = config.saml2userHome();
    this.groupMembershipName = config.saml2groupMembershipAttr();
    this.entityID = config.entityID();
    this.jksFileLocation = config.jksFileLocation();
    this.jksStorePassword = config.jksStorePassword();
    this.spKeysAlias = config.spKeysAlias();
    this.spKeysPassword = config.spKeysPassword();
    this.idpCertAlias = config.idpCertAlias();
    this.acsPath = config.acsPath();
    this.syncAttrs = config.syncAttrs();
}
 
Example #2
Source File: VotingStatisticScheduler.java    From opencps-v2 with GNU Affero General Public License v3.0 6 votes vote down vote up
/**
	   * activate: Called whenever the properties for the component change (ala Config Admin)
	   * or OSGi is activating the component.
	   * @param properties The properties map from Config Admin.
	   * @throws SchedulerException in case of error.
	   */
	  @Activate
	  @Modified
	  protected void activate(Map<String,Object> properties) throws SchedulerException {
		  String listenerClass = getClass().getName();
		  Trigger jobTrigger = _triggerFactory.createTrigger(listenerClass, listenerClass, new Date(), null, 10, TimeUnit.MINUTE);

		  _schedulerEntryImpl = new SchedulerEntryImpl(getClass().getName(), jobTrigger);
		  _schedulerEntryImpl = new StorageTypeAwareSchedulerEntryImpl(_schedulerEntryImpl, StorageType.MEMORY_CLUSTERED);
		  
//		  _schedulerEntryImpl.setTrigger(jobTrigger);

		  if (_initialized) {
			  deactivate();
		  }

	    _schedulerEngineHelper.register(this, _schedulerEntryImpl, DestinationNames.SCHEDULER_DISPATCH);
	    _initialized = true;
	  }
 
Example #3
Source File: Hourly.java    From opencps-v2 with GNU Affero General Public License v3.0 6 votes vote down vote up
/**
	   * activate: Called whenever the properties for the component change (ala Config Admin)
	   * or OSGi is activating the component.
	   * @param properties The properties map from Config Admin.
	   * @throws SchedulerException in case of error.
	   */
	  @Activate
	  @Modified
	  protected void activate(Map<String,Object> properties) throws SchedulerException {
		  String listenerClass = getClass().getName();
		  Trigger jobTrigger = _triggerFactory.createTrigger(listenerClass, listenerClass, new Date(), null, 1, TimeUnit.HOUR);

		  _schedulerEntryImpl = new SchedulerEntryImpl(getClass().getName(), jobTrigger);
		  _schedulerEntryImpl = new StorageTypeAwareSchedulerEntryImpl(_schedulerEntryImpl, StorageType.MEMORY_CLUSTERED);
		  
//		  _schedulerEntryImpl.setTrigger(jobTrigger);

		  if (_initialized) {
			  deactivate();
		  }

	    _schedulerEngineHelper.register(this, _schedulerEntryImpl, DestinationNames.SCHEDULER_DISPATCH);
	    _initialized = true;
	  }
 
Example #4
Source File: Daily.java    From opencps-v2 with GNU Affero General Public License v3.0 6 votes vote down vote up
/**
	   * activate: Called whenever the properties for the component change (ala Config Admin)
	   * or OSGi is activating the component.
	   * @param properties The properties map from Config Admin.
	   * @throws SchedulerException in case of error.
	   */
	  @Activate
	  @Modified
	  protected void activate(Map<String,Object> properties) throws SchedulerException {
		  String listenerClass = getClass().getName();
		  Trigger jobTrigger = _triggerFactory.createTrigger(listenerClass, listenerClass, new Date(), null, 1, TimeUnit.DAY);

		  _schedulerEntryImpl = new SchedulerEntryImpl(getClass().getName(), jobTrigger);
		  _schedulerEntryImpl = new StorageTypeAwareSchedulerEntryImpl(_schedulerEntryImpl, StorageType.MEMORY_CLUSTERED);
		  
//		  _schedulerEntryImpl.setTrigger(jobTrigger);

		  if (_initialized) {
			  deactivate();
		  }

	    _schedulerEngineHelper.register(this, _schedulerEntryImpl, DestinationNames.SCHEDULER_DISPATCH);
	    _initialized = true;
	  }
 
Example #5
Source File: WebsocketTransportServiceComponent.java    From micro-integrator with Apache License 2.0 6 votes vote down vote up
@Activate
protected void activate(ComponentContext ctxt) {

    WebsocketTransportService WebsocketTransport;
    SecureWebsocketTransportService SecureWebsocketTransport;
    if (log.isDebugEnabled()) {
        log.debug("Websocket Transport bundle is activated");
    }
    try {
        if (contextService == null) {
            throw new Exception("ConfigurationContext is not found while loading websocket transport bundle");
        }

        WebsocketTransport = new WebsocketTransportService();
        SecureWebsocketTransport = new SecureWebsocketTransportService();
        ctxt.getBundleContext().registerService(TransportService.class.getName(), WebsocketTransport, null);
        ctxt.getBundleContext().registerService(TransportService.class.getName(), SecureWebsocketTransport, null);
        if (log.isDebugEnabled()) {
            log.debug("Successfully registered the ws(s) transport service");
        }
    } catch (Throwable e) {
        log.error("Error while activating Websocket transport management bundle", e);
    }
}
 
Example #6
Source File: MediationStatisticsComponent.java    From micro-integrator with Apache License 2.0 6 votes vote down vote up
@Activate
protected void activate(ComponentContext ctxt) {

    this.compCtx = ctxt;
    // Check whether statistic collecting is globally enabled
    checkPublishingEnabled();
    if (!flowStatisticsEnabled) {
        activated = false;
        if (log.isDebugEnabled()) {
            log.debug("DAS Message Flow Publishing Component not-activated");
        }
        return;
    }
    int tenantId = Constants.SUPER_TENANT_ID;
    SynapseEnvironmentService synapseEnvService = synapseEnvServices.get(tenantId);
    // Create observer store for super-tenant
    createStores(synapseEnvService);
    activated = true;
    if (log.isDebugEnabled()) {
        log.debug("DAS Message Flow Publishing Component activate");
    }
}
 
Example #7
Source File: OneMinute.java    From opencps-v2 with GNU Affero General Public License v3.0 6 votes vote down vote up
/**
	   * activate: Called whenever the properties for the component change (ala Config Admin)
	   * or OSGi is activating the component.
	   * @param properties The properties map from Config Admin.
	   * @throws SchedulerException in case of error.
	   */
	  @Activate
	  @Modified
	  protected void activate(Map<String,Object> properties) throws SchedulerException {
		  String listenerClass = getClass().getName();
		  Trigger jobTrigger = _triggerFactory.createTrigger(listenerClass, listenerClass, new Date(), null, 1, TimeUnit.MINUTE);

		  _schedulerEntryImpl = new SchedulerEntryImpl(getClass().getName(), jobTrigger);
		  _schedulerEntryImpl = new StorageTypeAwareSchedulerEntryImpl(_schedulerEntryImpl, StorageType.MEMORY_CLUSTERED);
		  
//		  _schedulerEntryImpl.setTrigger(jobTrigger);

		  if (_initialized) {
			  deactivate();
		  }

	    _schedulerEngineHelper.register(this, _schedulerEntryImpl, DestinationNames.SCHEDULER_DISPATCH);
	    _initialized = true;
	  }
 
Example #8
Source File: StartupAdminServiceComponent.java    From micro-integrator with Apache License 2.0 6 votes vote down vote up
@Activate
protected void activate(ComponentContext context) throws Exception {

    try {
        initialized = true;
        SynapseEnvironmentService synEnvService = synapseEnvironmentServices
                .get(Constants.SUPER_TENANT_ID);
        if (synEnvService != null) {
            context.getBundleContext()
                    .registerService(TaskManagementService.class.getName(), new StartupAdminService(), null);
            registerDeployer(synEnvService.getConfigurationContext().getAxisConfiguration(),
                             synEnvService.getSynapseEnvironment());
        } else {
            log.error("Couldn't initialize the StartupManager, SynapseEnvironment service and/or "
                              + "TaskDescriptionRepositoryService not found");
        }
    } catch (Throwable t) {
        log.error("Couldn't initialize the StartupManager, SynapseEnvironment service and/or "
                          + "TaskDescriptionRepositoryService not found");
    }
}
 
Example #9
Source File: ThirtyMinutes.java    From opencps-v2 with GNU Affero General Public License v3.0 6 votes vote down vote up
/**
	   * activate: Called whenever the properties for the component change (ala Config Admin)
	   * or OSGi is activating the component.
	   * @param properties The properties map from Config Admin.
	   * @throws SchedulerException in case of error.
	   */
	  @Activate
	  @Modified
	  protected void activate(Map<String,Object> properties) throws SchedulerException {
		  String listenerClass = getClass().getName();
		  Trigger jobTrigger = _triggerFactory.createTrigger(listenerClass, listenerClass, new Date(), null, 15, TimeUnit.MINUTE);

		  _schedulerEntryImpl = new SchedulerEntryImpl(getClass().getName(), jobTrigger);
		  _schedulerEntryImpl = new StorageTypeAwareSchedulerEntryImpl(_schedulerEntryImpl, StorageType.MEMORY_CLUSTERED);
		  
//		  _schedulerEntryImpl.setTrigger(jobTrigger);

		  if (_initialized) {
			  deactivate();
		  }

	    _schedulerEngineHelper.register(this, _schedulerEntryImpl, DestinationNames.SCHEDULER_DISPATCH);
	    _initialized = true;
	  }
 
Example #10
Source File: DefaultCryptoProviderComponent.java    From micro-integrator with Apache License 2.0 6 votes vote down vote up
@Activate
public void activate(ComponentContext context) {

    try {
        BundleContext bundleContext = context.getBundleContext();

        if (isCryptoServiceEnabled()) {
            registerServiceImplementations(bundleContext);
        } else {
            if (log.isInfoEnabled()) {
                log.debug("Crypto service is NOT enabled. "
                                  + "Therefore the key resolver and crypto provider implementations will NOT be registered.");
            }
        }

        if (log.isDebugEnabled()) {
            log.debug("'org.wso2.carbon.crypto.provider' bundle has been activated.");
        }

    } catch (Exception e) {
        String errorMessage =
                "An error occurred while activating 'org.wso2.carbon.crypto.provider' " + "component.";
        log.error(errorMessage, e);
    }
}
 
Example #11
Source File: PersonStatisticSheduler.java    From opencps-v2 with GNU Affero General Public License v3.0 6 votes vote down vote up
/**
	   * activate: Called whenever the properties for the component change (ala Config Admin)
	   * or OSGi is activating the component.
	   * @param properties The properties map from Config Admin.
	   * @throws SchedulerException in case of error.
	   */
	  @Activate
	  @Modified
	  protected void activate(Map<String,Object> properties) throws SchedulerException {
		  String listenerClass = getClass().getName();
		  Trigger jobTrigger = _triggerFactory.createTrigger(listenerClass, listenerClass, new Date(), null, 10, TimeUnit.MINUTE);

		  _schedulerEntryImpl = new SchedulerEntryImpl(getClass().getName(), jobTrigger);
		  _schedulerEntryImpl = new StorageTypeAwareSchedulerEntryImpl(_schedulerEntryImpl, StorageType.MEMORY_CLUSTERED);
		  
//		  _schedulerEntryImpl.setTrigger(jobTrigger);

		  if (_initialized) {
			  deactivate();
		  }

	    _schedulerEngineHelper.register(this, _schedulerEntryImpl, DestinationNames.SCHEDULER_DISPATCH);
	    _initialized = true;
	  }
 
Example #12
Source File: DossierStatisticEngine.java    From opencps-v2 with GNU Affero General Public License v3.0 6 votes vote down vote up
/**
	   * activate: Called whenever the properties for the component change (ala Config Admin)
	   * or OSGi is activating the component.
	   * @param properties The properties map from Config Admin.
	   * @throws SchedulerException in case of error.
	   */
	  @Activate
	  @Modified
	  protected void activate(Map<String,Object> properties) throws SchedulerException {
		  String listenerClass = getClass().getName();
		  Trigger jobTrigger = _triggerFactory.createTrigger(listenerClass, listenerClass, new Date(), null, 10, TimeUnit.MINUTE);

		  _schedulerEntryImpl = new SchedulerEntryImpl(getClass().getName(), jobTrigger);
		  _schedulerEntryImpl = new StorageTypeAwareSchedulerEntryImpl(_schedulerEntryImpl, StorageType.MEMORY_CLUSTERED);
		  
//		  _schedulerEntryImpl.setTrigger(jobTrigger);

		  if (_initialized) {
			  deactivate();
		  }

	    _schedulerEngineHelper.register(this, _schedulerEntryImpl, DestinationNames.SCHEDULER_DISPATCH);
	    _initialized = true;
	  }
 
Example #13
Source File: BladeCustomJspBag.java    From opencps-v2 with GNU Affero General Public License v3.0 6 votes vote down vote up
/**
 * Adds the URL paths for all custom core JSPs to a list when the module is
 * activated.
 *
 * @param bundleContext the bundle context from which to get the custom
 *        JSP's bundle
 */
@Activate
protected void activate(BundleContext bundleContext) {
	_bundle = bundleContext.getBundle();

	_customJsps = new ArrayList<>();

	Enumeration<URL> entries = _bundle.findEntries(
		getCustomJspDir(), "*.jsp", true);

	while (entries.hasMoreElements()) {
		URL url = entries.nextElement();

		_customJsps.add(url.getPath());
	}
}
 
Example #14
Source File: DataServicesDSComponent.java    From micro-integrator with Apache License 2.0 6 votes vote down vote up
@Activate
    protected void activate(ComponentContext ctxt) {
        try {
            BundleContext bundleContext = ctxt.getBundleContext();
            bundleContext.registerService(Axis2ConfigurationContextObserver.class.getName(),
                                          new DSAxis2ConfigurationContextObserver(), null);
//            bundleContext.registerService(DSDummyService.class.getName(), new DSDummyService(), null);
//            bundleContext.registerService(TransactionManagerDummyService.class.getName(),
//                                          new TransactionManagerDummyService(), null);

            log.debug("Data Services bundle is activated ");
        } catch (Throwable e) {
            log.error(e.getMessage(), e);
            /* don't throw exception */
        }
    }
 
Example #15
Source File: MainComponent.java    From onos-p4-tutorial with Apache License 2.0 6 votes vote down vote up
@Activate
protected void activate() {
    appId = coreService.registerApplication(APP_NAME);

    // Wait to remove flow and groups from previous executions.
    waitPreviousCleanup();

    compCfgService.preSetProperty("org.onosproject.net.flow.impl.FlowRuleManager",
                                  "fallbackFlowPollFrequency", "4", false);
    compCfgService.preSetProperty("org.onosproject.net.group.impl.GroupManager",
                                  "fallbackGroupPollFrequency", "3", false);
    compCfgService.preSetProperty("org.onosproject.provider.host.impl.HostLocationProvider",
                                  "requestIpv6ND", "true", false);

    configRegistry.registerConfigFactory(srv6ConfigFactory);
    log.info("Started");
}
 
Example #16
Source File: TimerScheduler.java    From opencps-v2 with GNU Affero General Public License v3.0 6 votes vote down vote up
@Activate
	  @Modified
	  protected void activate(Map<String,Object> properties) throws SchedulerException {
		  String listenerClass = getClass().getName();
		  Trigger jobTrigger = _triggerFactory.createTrigger(listenerClass, listenerClass, new Date(), null, 10, TimeUnit.MINUTE);

		  _schedulerEntryImpl = new SchedulerEntryImpl(getClass().getName(), jobTrigger);
		  _schedulerEntryImpl = new StorageTypeAwareSchedulerEntryImpl(_schedulerEntryImpl, StorageType.MEMORY_CLUSTERED);
		  
//		  _schedulerEntryImpl.setTrigger(jobTrigger);

		  if (_initialized) {
			  deactivate();
		  }

	    _schedulerEngineHelper.register(this, _schedulerEntryImpl, DestinationNames.SCHEDULER_DISPATCH);
	    _initialized = true;
	  }
 
Example #17
Source File: DossierSyncProcessingScheduler.java    From opencps-v2 with GNU Affero General Public License v3.0 6 votes vote down vote up
@Activate
	  @Modified
	  protected void activate(Map<String,Object> properties) throws SchedulerException {
		  String listenerClass = getClass().getName();
		  Trigger jobTrigger = _triggerFactory.createTrigger(listenerClass, listenerClass, new Date(), null, 45, TimeUnit.SECOND);

		  _schedulerEntryImpl = new SchedulerEntryImpl(getClass().getName(), jobTrigger);
		  _schedulerEntryImpl = new StorageTypeAwareSchedulerEntryImpl(_schedulerEntryImpl, StorageType.MEMORY_CLUSTERED);
		  
//		  _schedulerEntryImpl.setTrigger(jobTrigger);

		  if (_initialized) {
			  deactivate();
		  }

	    _schedulerEngineHelper.register(this, _schedulerEntryImpl, DestinationNames.SCHEDULER_DISPATCH);
	    _initialized = true;
	  }
 
Example #18
Source File: GarbageCollectorScheduler.java    From opencps-v2 with GNU Affero General Public License v3.0 6 votes vote down vote up
@Activate
	  @Modified
	  protected void activate(Map<String,Object> properties) throws SchedulerException {
		  String listenerClass = getClass().getName();
		  Trigger jobTrigger = _triggerFactory.createTrigger(listenerClass, listenerClass, new Date(), null, 1, TimeUnit.DAY);

		  _schedulerEntryImpl = new SchedulerEntryImpl(getClass().getName(), jobTrigger);
		  _schedulerEntryImpl = new StorageTypeAwareSchedulerEntryImpl(_schedulerEntryImpl, StorageType.MEMORY_CLUSTERED);
		  
//		  _schedulerEntryImpl.setTrigger(jobTrigger);

		  if (_initialized) {
			  deactivate();
		  }

	    _schedulerEngineHelper.register(this, _schedulerEntryImpl, DestinationNames.SCHEDULER_DISPATCH);
	    _initialized = true;
	  }
 
Example #19
Source File: GarbageGroupDossierScheduler.java    From opencps-v2 with GNU Affero General Public License v3.0 6 votes vote down vote up
@Activate
	  @Modified
	  protected void activate(Map<String,Object> properties) throws SchedulerException {
		  String listenerClass = getClass().getName();
		  Trigger jobTrigger = _triggerFactory.createTrigger(listenerClass, listenerClass, new Date(), null, 4, TimeUnit.HOUR);

		  _schedulerEntryImpl = new SchedulerEntryImpl(getClass().getName(), jobTrigger);
		  _schedulerEntryImpl = new StorageTypeAwareSchedulerEntryImpl(_schedulerEntryImpl, StorageType.MEMORY_CLUSTERED);
		  
//		  _schedulerEntryImpl.setTrigger(jobTrigger);

		  if (_initialized) {
			  deactivate();
		  }

	    _schedulerEngineHelper.register(this, _schedulerEntryImpl, DestinationNames.SCHEDULER_DISPATCH);
	    _initialized = true;
	  }
 
Example #20
Source File: MainComponent.java    From onos-p4-tutorial with Apache License 2.0 6 votes vote down vote up
@Activate
protected void activate() {
    appId = coreService.registerApplication(APP_NAME);

    // Wait to remove flow and groups from previous executions.
    waitPreviousCleanup();

    compCfgService.preSetProperty("org.onosproject.net.flow.impl.FlowRuleManager",
                                  "fallbackFlowPollFrequency", "4", false);
    compCfgService.preSetProperty("org.onosproject.net.group.impl.GroupManager",
                                  "fallbackGroupPollFrequency", "3", false);
    compCfgService.preSetProperty("org.onosproject.provider.host.impl.HostLocationProvider",
                                  "requestIpv6ND", "true", false);

    configRegistry.registerConfigFactory(srv6ConfigFactory);
    log.info("Started");
}
 
Example #21
Source File: VnPostScheduler.java    From opencps-v2 with GNU Affero General Public License v3.0 6 votes vote down vote up
@Activate
	  @Modified
	  protected void activate(Map<String,Object> properties) throws SchedulerException {
		  String listenerClass = getClass().getName();
		  Trigger jobTrigger = _triggerFactory.createTrigger(listenerClass, listenerClass, new Date(), null, 12, TimeUnit.HOUR);

		  _schedulerEntryImpl = new SchedulerEntryImpl(getClass().getName(), jobTrigger);
		  _schedulerEntryImpl = new StorageTypeAwareSchedulerEntryImpl(_schedulerEntryImpl, StorageType.MEMORY_CLUSTERED);
		  
//		  _schedulerEntryImpl.setTrigger(jobTrigger);

		  if (_initialized) {
			  deactivate();
		  }

	    _schedulerEngineHelper.register(this, _schedulerEntryImpl, DestinationNames.SCHEDULER_DISPATCH);
	    _initialized = true;
	  }
 
Example #22
Source File: StatisticsReportScheduler.java    From opencps-v2 with GNU Affero General Public License v3.0 6 votes vote down vote up
@Activate
	  @Modified
	  protected void activate(Map<String,Object> properties) throws SchedulerException {
		  String listenerClass = getClass().getName();
		  Trigger jobTrigger = _triggerFactory.createTrigger(listenerClass, listenerClass, new Date(), null, 10, TimeUnit.MINUTE);

		  _schedulerEntryImpl = new SchedulerEntryImpl(getClass().getName(), jobTrigger);
		  _schedulerEntryImpl = new StorageTypeAwareSchedulerEntryImpl(_schedulerEntryImpl, StorageType.MEMORY_CLUSTERED);
		  
//		  _schedulerEntryImpl.setTrigger(jobTrigger);

		  if (_initialized) {
			  deactivate();
		  }

	    _schedulerEngineHelper.register(this, _schedulerEntryImpl, DestinationNames.SCHEDULER_DISPATCH);
	    _initialized = true;
	  }
 
Example #23
Source File: ActionOverdueScheduler.java    From opencps-v2 with GNU Affero General Public License v3.0 6 votes vote down vote up
@Activate
	  @Modified
	  protected void activate(Map<String,Object> properties) throws SchedulerException {
		  String listenerClass = getClass().getName();
		  Trigger jobTrigger = _triggerFactory.createTrigger(listenerClass, listenerClass, new Date(), null, 1, TimeUnit.DAY);

		  _schedulerEntryImpl = new SchedulerEntryImpl(getClass().getName(), jobTrigger);
		  _schedulerEntryImpl = new StorageTypeAwareSchedulerEntryImpl(_schedulerEntryImpl, StorageType.MEMORY_CLUSTERED);
//		  _schedulerEntryImpl.setTrigger(jobTrigger);

		  if (_initialized) {
			  deactivate();
		  }

	    _schedulerEngineHelper.register(this, _schedulerEntryImpl, DestinationNames.SCHEDULER_DISPATCH);
	    _initialized = true;
	  }
 
Example #24
Source File: MainComponent.java    From ngsdn-tutorial with Apache License 2.0 6 votes vote down vote up
@Activate
protected void activate() {
    appId = coreService.registerApplication(APP_NAME);

    // Wait to remove flow and groups from previous executions.
    waitPreviousCleanup();

    compCfgService.preSetProperty("org.onosproject.net.flow.impl.FlowRuleManager",
                                  "fallbackFlowPollFrequency", "4", false);
    compCfgService.preSetProperty("org.onosproject.net.group.impl.GroupManager",
                                  "fallbackGroupPollFrequency", "3", false);
    compCfgService.preSetProperty("org.onosproject.provider.host.impl.HostLocationProvider",
                                  "requestIpv6ND", "true", false);
    compCfgService.preSetProperty("org.onosproject.provider.lldp.impl.LldpLinkProvider",
                                  "useBddp", "false", false);

    configRegistry.registerConfigFactory(fabricConfigFactory);
    log.info("Started");
}
 
Example #25
Source File: ServiceComponent.java    From micro-integrator with Apache License 2.0 5 votes vote down vote up
@Activate
protected void activate(ComponentContext ctxt) {
    try {
        engagePoxSecurity();
        String lazyInit = System.getProperty(SecurityConstants.MI_SECURITY_USERMGT_LAZY_INIT);
        if (lazyInit == null || Boolean.parseBoolean(lazyInit)) {
            log.debug("Initializing Security parameters lazily");
        } else {
            log.debug("Initializing Security parameters eagerly");
            initSecurityParams();
        }
    } catch (Throwable e) {
        log.error("Failed to activate Micro Integrator security bundle ", e);
    }
}
 
Example #26
Source File: SyncQueueProcessScheduler.java    From opencps-v2 with GNU Affero General Public License v3.0 5 votes vote down vote up
@Activate
@Modified
protected void activate() {
	schedulerEntryImpl.setTrigger(
			TriggerFactoryUtil.createTrigger(getEventListenerClass(), getEventListenerClass(), 15, TimeUnit.SECOND));
	_schedulerEngineHelper.register(this, schedulerEntryImpl, DestinationNames.SCHEDULER_DISPATCH);
}
 
Example #27
Source File: SetupService.java    From sling-samples with Apache License 2.0 5 votes vote down vote up
@Activate
protected void activate(final BundleContext bc) throws IOException, LoginException, PersistenceException, RepositoryException {
    logger.info("Setting up SlingShot...");
    ResourceResolver resolver = null;
    try {
        resolver = this.factory.getServiceResourceResolver(null);
        setupContent(resolver);
    } finally {
        if ( resolver != null ) {
            resolver.close();
        }
    }
    logger.info("Finished setting up SlingShot");
}
 
Example #28
Source File: DictItemSyncScheduler.java    From opencps-v2 with GNU Affero General Public License v3.0 5 votes vote down vote up
@Activate
@Modified
protected void activate() {
	schedulerEntryImpl.setTrigger(
			TriggerFactoryUtil.createTrigger(getEventListenerClass(), getEventListenerClass(), 1, TimeUnit.SECOND));
	_schedulerEngineHelper.register(this, schedulerEntryImpl, DestinationNames.SCHEDULER_DISPATCH);
}
 
Example #29
Source File: SampleOsgiServiceImpl.java    From aem-osgi-annotation-demo with Apache License 2.0 5 votes vote down vote up
@Activate
@Modified
protected final void activate(Configuration config) {
    booleanProp = config.servicename_propertyname_boolean();
    stringProp = config.servicename_propertyname_string();
    dropdownProp = config.servicename_propertyname_dropdown();
    stringArrayProp = config.servicename_propertyname_string_array();
    passwordProp = config.servicename_propertyname_password().toCharArray();
    longProp = config.servicename_propertyname_long();
}
 
Example #30
Source File: OneMinute.java    From opencps-v2 with GNU Affero General Public License v3.0 5 votes vote down vote up
@Activate
@Modified
protected void activate() {
	schedulerEntryImpl.setTrigger(
			TriggerFactoryUtil.createTrigger(getEventListenerClass(), getEventListenerClass(), 1, TimeUnit.MINUTE));
	_schedulerEngineHelper.register(this, schedulerEntryImpl, DestinationNames.SCHEDULER_DISPATCH);
}