Attempt to activate an endpoint if all its services are available.

@param explicit true if {@link #activateEndpoint} was called
@see #activateEndpoint
508053
private void activateEndpointInternal(MessageEndpointFactoryImpl mef, boolean explicit) throws ResourceException {
        // Wait for the destination if specified by the MDB.  If it is instead
        // specified on the activationSpec, then the EndpointActivationService
        // won't be registered until the destination is available, so we
        // implicitly wait for the destination anyway.  If the destination isn't
        // specified at all, then the activation will fail.

        if (mef.adminObjectServiceInfo != null && mef.adminObjectServiceInfo.serviceRef == null) {
            if (explicit) {
                Tr.warning(tc, "MDB_DESTINATION_NOT_FOUND_CNTR4016W", mef.getJ2EEName().getComponent(), mef.adminObjectServiceInfo.id);
            }
            return;
        }

        if (mef.schemeJndiNameInfo != null && !mef.schemeJndiNameInfo.lookupSucceeded()) {
            if (explicit) {
                Tr.warning(tc, "MDB_DESTINATION_NOT_FOUND_CNTR4016W", mef.getJ2EEName().getComponent(), mef.schemeJndiNameInfo.getJndiName());
            }
        }

        EndpointActivationService eas = mef.endpointActivationServiceInfo.getService();
        if (eas == null) {
            if (explicit) {
                Tr.warning(tc, "MDB_ACTIVATION_SPEC_NOT_FOUND_CNTR4015W", mef.getJ2EEName().getComponent(), mef.endpointActivationServiceInfo.id);
            }
            return;
        }

        if (!isServerStarted) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "server is not started");
            }
            return;
        }

        mef.activateEndpointInternal(eas,
                                     mef.endpointActivationServiceInfo.getMaxEndpoints(),
                                     mef.adminObjectServiceInfo == null ? null :
                                                     (AdminObjectService) context.locateService("adminObjectServices", mef.adminObjectServiceInfo.serviceRef)
                        );
        mef.runtimeActivated = true;
    }
378453
def activateAaPdpContextRequest(AccessPointName_presence=0,
                                ProtocolConfigurationOptions_presence=0,
                                GprsTimer_presence=0):
    """"""
    a = TpPd(pd=0x8)
    b = MessageType(mesType=0x50)  # 01010000
    c = NetworkServiceAccessPointIdentifier()
    d = LlcServiceAccessPointIdentifier()
    e = QualityOfService()
    f = PacketDataProtocolAddress()
    packet = a / b / c / d / e / f
    if AccessPointName_presence is 1:
        g = AccessPointName(ieiAPN=0x28)
        packet = packet / g
    if ProtocolConfigurationOptions_presence is 1:
        h = ProtocolConfigurationOptions(ieiPCO=0x27)
        packet = packet / h
    if GprsTimer_presence is 1:
        i = GprsTimer(ieiGT=0x29)
        packet = packet / i
    return packet
1095464
@Override
    public void unregisterEndpoint(QName serviceName, String endpointURL)
            throws ServiceLocatorFault, InterruptedExceptionFault {
        if (LOG.isLoggable(Level.FINE)) {
            LOG.fine("Unregistering endpoint " + endpointURL + " for service "
                    + serviceName + "...");
        }
        try {
            initLocator();
            locatorClient.unregister(serviceName, endpointURL);
        } catch (ServiceLocatorException e) {
            ServiceLocatorFaultDetail serviceFaultDetail = new ServiceLocatorFaultDetail();
            serviceFaultDetail.setLocatorFaultDetail(serviceName.toString()
                    + "throws ServiceLocatorFault");
            throw new ServiceLocatorFault(e.getMessage(), serviceFaultDetail);
        } catch (InterruptedException e) {
            InterruptionFaultDetail interruptionFaultDetail = new InterruptionFaultDetail();
            interruptionFaultDetail.setInterruptionDetail(serviceName
                    .toString() + "throws InterruptionFault");
            throw new InterruptedExceptionFault(e.getMessage(),
                    interruptionFaultDetail);
        }
    }
400991
protected void activate(ComponentContext compcontext) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Activating " + this.getClass().getName());
        }
        this.unauthenticatedSubjectServiceRef.activate(compcontext);
    }
14487
protected void activate(ComponentContext compcontext) {
        if (TC.isDebugEnabled()) {
            Tr.debug(TC, "Activating " + this.getClass().getName());
        }
        this.userTransaction.activate(compcontext);
        this.transactionManager.activate(compcontext);
    }
853326
protected void activateDestination(DestinationHandler dh)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "activateDestination", dh);

        if (dh.isLink())
        {
            linkIndex.create(dh);
        }
        else
        {
            destinationIndex.create(dh);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "activateDestination");
    }
496206
@Activate
    protected void activate(Map<String, Object> properties) throws Exception {
        this.host = (String) properties.get("host");
        Integer iiopPort = (Integer) properties.get("iiopPort");
        this.iiopPort = iiopPort == null ? -1 : iiopPort;

        iiopsOptions = Nester.nest("iiopsOptions", properties);
    }
3724
@Deactivate
    protected void deactivate(ComponentContext context) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.event(this, tc, "Deactivating");
        }
        instance.get().compareAndSet(this, null);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.event(this, tc, "Destroying all endpoints");
        }
        EndPointMgrImpl.destroyEndpoints();

        try {
            this.chfw.destroy();
        } catch (Throwable t) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(this, tc, "Error destroying framework: " + t);
            }
        }

        this.chfw.deregisterFactory("TCPChannel");
        this.chfw.deregisterFactory("UDPChannel");
    }
1250308
public <T> T executeInApplicationContext(Callable<T> callable) throws Exception {
        ApplicationContext context = (ApplicationContext) getScopedContext(ApplicationScoped.class);
        boolean activatedByUs = false;
        try {
            if (!context.isActive()) {
                context.activate();
                activatedByUs = true;
            }
            return callable.call();
        } finally {
            if (activatedByUs && context.isActive()) {
                context.deactivate();
            }
        }
    }
955363
protected void activate(Map<String, Object> properties, ComponentContext context) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "activate");

        _sslOptions.activate(context);
        _sslFactoryProvider.activate(context);

        _isSSLChain = MetatypeUtils.parseBoolean(_OutboundChain_ConfigAlias, "useSSL", properties.get("useSSL"), false);

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            SibTr.debug(tc, "Chain is configured for  " + (_isSSLChain ? "Secure " : "Non-Secure"));

        String Outboundname = (String) properties.get("id");

        _chainName = Outboundname;
        _tcpChannelName = Outboundname + "_JfapTcp";
        _sslChannelName = Outboundname + "_JfapSsl";
        _jfapChannelName = Outboundname + "_JfapJfap";

        //if chain is started first destroy then create it freshly
        if (_isChainStarted)
            performAction(destroyChainAction);
        performAction(createChainAction);

        _isActivated = true;

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "activate");
    }
887931
protected void activate(ComponentContext context, Map<String, Object> properties) {
        if (TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, "activate", "context=" + context);
            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, "activate", "properties=" + properties);
        }
        embeddableWebSphereTransactionManagerRef.activate(context);
        localTransactionCurrentRef.activate(context);
        resourceConfigFactoryRef.activate(context);
        dataSourceFactoryRef.activate(context);
        uowCurrentRef.activate(context);
        userTransactionRef.activate(context);
        serializationServiceRef.activate(context);
        configurationProperties = properties;

    }
774889
private EndpointActivationServiceInfo createEndpointActivationServiceInfo(String id) {
        EndpointActivationServiceInfo easInfo = endpointActivationServices.get(id);
        if (easInfo == null) {
            easInfo = new EndpointActivationServiceInfo(id);
            endpointActivationServices.put(id, easInfo);
        }
        return easInfo;
    }
242527
public void activate() {
        // Notify ActivationListeners
    	SipApplicationSessionEvent event = null;
    	if(sipApplicationSessionAttributeMap != null) {
	        Set<String> keySet = sipApplicationSessionAttributeMap.keySet();
	        for (String key : keySet) {
	        	Object attribute = sipApplicationSessionAttributeMap.get(key);
	            if (attribute instanceof SipApplicationSessionActivationListener) {
	                if (event == null)
	                	event = new SipApplicationSessionActivationEvent(this, SessionActivationNotificationCause.ACTIVATION);
	                try {
	                    ((SipApplicationSessionActivationListener)attribute)
	                        .sessionDidActivate(event);
	                } catch (Throwable t) {
	                    logger.error("SipApplicationSessionActivationListener threw exception", t);
	                }
	            }
			}
	    }
    }
485000
@Activate
    protected void activate(ComponentContext context) {
        Dictionary properties = context.getProperties();
        name = (String) properties.get("name");
        filter = ResourceFilterMapping.fromString((String) properties.get("filter"));
    }
1280904
private void processEndpointDeActivation()
    {
        final String methodName = "processEndpointDeActivation";
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, methodName, new Object[] {});
        }

        String endpointName = null;
        if (_messageEndpointFactory instanceof MDBMessageEndpointFactory)
        {
            try {
                endpointName = ((MDBMessageEndpointFactory) _messageEndpointFactory).getMDBKey().toString();
            } catch (Exception e) {
                FFDCFilter.processException(e,
                                            "com.ibm.ws.sib.ra.inbound.impl.SibRaListener",
                                            "1059", this);
            }

            // Output a message that we are about to pause the endpoint
            SibTr.warning(TRACE, "MESSAGE_ENDPOINT_PAUSED_AUTONOMICALLY_CWSIV0902",
                          new Object[] { endpointName, _destinationAddress });

            // call bus sec action
            try
            {
                // Use reflection here as the class should not be loaded for the stand alone
                // RA (this method should not be driven by the standalone RA and calling it
                // may invoke the use of BusSecurityAction which is not bundled with the stand alone
                // RA.
                Class<?> busAction = Class.forName("com.ibm.ws.sib.ra.inbound.impl.SibRaBusSecurityAction");
                Method performBusSecurityAction = busAction.getDeclaredMethod("performBusSecurityAction",
                                                                              new Class[] { String.class, SIDestinationAddress.class });
                performBusSecurityAction.invoke(null, new Object[] { endpointName, _destinationAddress });
            } catch (Exception ex)
            {
                FFDCFilter.processException(ex, CLASS_NAME + "." + methodName, "1:1128:1.68");
                SibTr.error(TRACE, "INVOKE_MBEAN_EXCEPTION__CWSIV0903",
                            new Object[] { endpointName, _destinationAddress, ex });
            }

        }

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, methodName);
        }
    }
949151
@Reference(name = REFERENCE_ENDPOINT_ACTIVATION_SERVICES,
               service = EndpointActivationService.class,
               policy = ReferencePolicy.DYNAMIC,
               cardinality = ReferenceCardinality.MULTIPLE)
    protected synchronized void addEndPointActivationService(ServiceReference<EndpointActivationService> reference) {
        String activationSvcId = (String) reference.getProperty(ACT_SPEC_CFG_ID);
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "activationSvcId : " + activationSvcId);
        }

        EndpointActivationServiceInfo easInfo = createEndpointActivationServiceInfo(activationSvcId);

        // Deactivate any endpoints that were using the old service.
        if (easInfo.service != null) {
            deactivateEndpoints(easInfo.endpointFactories);
        }

        // Activate any endpoints with the new service.
        easInfo.setReference(reference);
        activateDeferredEndpoints(easInfo.endpointFactories);
    }
342719
public void changeEndpoint(String endpoint) throws ConnectionEndpointArray.UnknownSchemeException {
        if (endpoint != null && !endpoint.isEmpty()) {
            modules.getApiModule().changeEndpoint(endpoint);
        } else {
            modules.getApiModule().resetToDefaultEndpoints();
        }
    }