Required service: this is not dynamic, and so is called before activate

@param ref reference to the service
169071
protected void setSslSupport(SSLSupport service, Map<String, Object> props) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "setSslSupport", service);
        }

        sslSupport = service;
        defaultId = (String) props.get(SSL_CFG_REF);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "setSslSupport", "defaultConfigId=" + defaultId);
        }
    }
589833
@Reference(policy = ReferencePolicy.DYNAMIC, cardinality = ReferenceCardinality.MULTIPLE)
    protected Map<String, Object> setAuthorization(ServiceReference<AuthorizationService> ref) {
        if (hasPropertiesFromFile(ref)) {
            String id = (String) ref.getProperty(KEY_ID);
            if (id != null) {
                authorization.putReference(id, ref);
            } else {
                Tr.error(tc, "SECURITY_SERVICE_REQUIRED_SERVICE_WITHOUT_ID", KEY_AUTHORIZATION);
            }
        } else {
            authorization.putReference(String.valueOf(ref.getProperty(KEY_SERVICE_ID)), ref);
        }

        // determine a new authorization service
        authzService.set(null);
        return getServiceProperties();
    }
592770
protected void setDataSourceFactory(ServiceReference<ResourceFactory> ref) {
        if (tc.isDebugEnabled())
            Tr.debug(tc, "pre-setReference  datasourceFactory ref " + dataSourceFactoryRef);
        dataSourceFactoryRef.setReference(ref);
        if (tc.isDebugEnabled())
            Tr.debug(tc, "post-setReference  datasourceFactory ref " + dataSourceFactoryRef);

        if (!activateHasBeenCalled)
            if (tc.isDebugEnabled())
                Tr.debug(tc, "setDataSourceFactory has been called before activate");

        // If the JTMConfigurationProvider has been activated, we can proceed to set
        // the DataSourceFactory and initiate recovery
        if (_cc != null) {
            if (tc.isDebugEnabled())
                Tr.debug(tc, "setDataSourceFactory and activate have been called, initiate recovery");

            if (tmsRef != null)
                tmsRef.doStartup(this, _isSQLRecoveryLog);
        }
    }
310562
@Reference(service = Controller.class,
               cardinality = ReferenceCardinality.OPTIONAL,
               policy = ReferencePolicy.DYNAMIC,
               policyOption = ReferencePolicyOption.GREEDY)
    protected void setController(ServiceReference<Controller> ref) {
        controllerRef.setReference(ref);
    }
226081
@Reference(service = ServerStarted.class,
               policy = ReferencePolicy.DYNAMIC,
               cardinality = ReferenceCardinality.OPTIONAL,
               policyOption = ReferencePolicyOption.GREEDY)
    protected void setServerStarted(ServiceReference<ServerStarted> ref) {

        // We don't want to start the polling task if we haven't been activated yet.

        // Not starting polling if not executing tasks.  Need to coordinate with activate.
        if (readyForPollingTask.addAndCheckIfReady(PollingManager.SERVER_STARTED))
            startPollingTask(configRef.get());
    }
873264
def try_binding(self):
        
        with self._lock:
            if self.reference is not None:
                # Already bound
                return

            if self._pending_ref is not None:
                # Get the reference we chose to keep this component valid
                ref = self._pending_ref
                self._pending_ref = None
            else:
                # Get the first matching service
                ref = self._context.get_service_reference(
                    self.requirement.specification, self.requirement.filter
                )

            if ref is not None:
                # Found a service
                self.on_service_arrival(ref)
685115
@Reference(name = REFERENCE_BEANVALIDATION_SERVICE, service = BeanValidation.class)
    protected void setBeanValidation(ServiceReference<BeanValidation> ref) {
        this.beanValidation.setReference(ref);
    }
572894
public Object addingService(ServiceReference reference)
    {
        HttpService httpService = (HttpService) context.getService(reference);

        this.properties = this.updateDictionaryConfig(this.properties, true);
        try {
            String alias = this.getAlias();
            String servicePid = this.properties.get(BundleConstants.SERVICE_PID);
            if (servlet == null)
            {
                servlet = this.makeServlet(alias, this.properties);
                if (servlet instanceof WebappServlet)
                    ((WebappServlet) servlet).init(context, servicePid, this.properties);
            }
            else
                if (servlet instanceof WebappServlet)
                    ((WebappServlet) servlet).setProperties(properties);
            if (servicePid != null)   // Listen for configuration changes
                serviceRegistration = context.registerService(ManagedService.class.getName(), new HttpConfigurator(context, servicePid), this.properties);

            httpService.registerServlet(alias, servlet, this.properties, httpContext);
        } catch (Exception e) {
            e.printStackTrace();
        }

        return httpService;
    }
205947
@Reference(name = "userTransaction", service = UserTransaction.class, policy = ReferencePolicy.DYNAMIC)
    protected void setUserTransaction(ServiceReference<UserTransaction> ref) {
        this.userTransaction.setReference(ref);
    }
1212820
protected void setJaasLoginContextEntry(ServiceReference<?> ref) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(this, tc, "setJaasLoginContextEntry", ref);
        }

        if (ref != null) {
            jaasLoginContextEntryName = (String) ref.getProperty("name");
        }
    }
1362258
@Trivial
    protected void setSslSupport(ServiceReference<ChannelFactoryProvider> ref) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.entry(this, tc, "setSslSupport", new Object[] { ref.getProperty("type"), ref });
        }

        // If sslsupport is bound then set it to true 
        _isSSLEnabled = true;

        // bind can get called before unbind for new config/ modify.Hence the precaution
        if (_sslFactoryProvider.getReference() != null) { // existing chain is still there so destroy 
            if (_isChainStarted)
                performAction(destroyChainAction);
        }

        _sslFactoryProvider.setReference(ref);
        // we will only invoke createchain if 
        // 1) activate() is complete
        // this is because bind method get called first before activate and without activate we don't have any properties
        // 2) if useSSL is set in config 
        if (_isActivated && _isSSLChain) {
            //TODO: when executor service is used for performaction() make sure about sequence of destroy and create chain
            //Now currently its not threaded
            if (_isChainStarted)
                performAction(destroyChainAction);
            performAction(createChainAction);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "setSslSupport", _isSSLEnabled);
        }
    }
1063603
@Trivial
    public void unsetSslSupport(ServiceReference<ChannelFactoryProvider> ref) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.entry(this, tc, "unsetSslSupport", new Object[] { ref.getProperty("type"), ref });
        }
        // see if its for the same service ref, if yes then destroy
        if (_sslFactoryProvider.getReference() == ref)
        {
            if (_isSSLChain) {
                if (_isChainStarted)
                    performAction(destroyChainAction);
            }

        }
        if (_sslFactoryProvider.unsetReference(ref)) {
            _isSSLEnabled = false;
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "unsetSslSupport", _isSSLEnabled);
        }

    }
454064
protected void setUserTransaction(ServiceReference<UserTransaction> ref) {
        if (TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, "setUserTransaction", "setting " + ref);
        }
        userTransactionRef.setReference(ref);
    }
332576
void maybePrepareCall(Reference ref) {
    CallSiteType callSiteType = classifyCallSite(ref);
    callSiteType.prepare(this, ref);
  }
1128333
protected void unsetAuthDataService(ServiceReference<AuthDataService> ref) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "unsetAuthDataService", ref);
        authDataServiceRef.unsetReference(ref);
    }
1267893
protected void unsetContextProvider(ServiceReference<JCAContextProvider> ref) {
        contextProviders.removeReference((String) ref.getProperty(JCAContextProvider.TYPE), ref);
    }
1199988
protected boolean setVisited(PRIndirectReference ref) {
        IntHashtable refs = (IntHashtable)visited.get(ref.getReader());
        if (refs != null)
        	return (refs.put(ref.getNumber(), 1) != 0);
        else
        	return false;
    }