synchronized void activateEndpoint(MessageEndpointFactoryImpl mef) throws ResourceException {
        mef.endpointActivationServiceInfo = createEndpointActivationServiceInfo(mef.getActivationSpecId());
        if (mef.endpointActivationServiceInfo.getAutoStart() == false && mef.shouldActivate == false) {
            Tr.info(tc, "MDB_ENDPOINT_NOT_ACTIVATED_AUTOSTART_CNTR4116I", mef.getJ2EEName().getComponent(), mef.getJ2EEName().getModule(), mef.getJ2EEName().getApplication(),
                    mef.endpointActivationServiceInfo.id);
            return;
        }
        mef.endpointActivationServiceInfo.addReferencingEndpoint(mef);

        String destId = mef.getDestinationId();

        // Process activation-config-properties destination and destinationLookup
        if (destId == null) {
            // If JEE 1.6, only use destination property; ignore destinationLookup.
            if (runtimeVersion.compareTo(DEFAULT_VERSION) == 0) {
                destId = mef.getBeanMetaData().ivActivationConfig.getProperty("destination");
            } else {
                // If JEE 1.7, look for both destinationLookup and destination; destinationLookup gets priority
                // for being the destination passed to the MEF.
                BeanMetaData bmd = mef.getBeanMetaData();
                String destLookup = bmd.ivActivationConfig.getProperty("destinationLookup");

                // If the JNDI name has a scheme, we need to perform a lookup to ensure we can access
                // the object it points to
                if (destLookup != null && JNDIHelper.hasJNDIScheme(destLookup)) {
                    // Perform the lookup, and save off the lookup and its result so
                    // we can refer back to whether it succeeded or not, and try again later.
                    SchemeJndiNameInfo jndiInfo = new SchemeJndiNameInfo(destLookup, bmd);
                    jndiInfo.updateLookupResult();

                    schemeJndiNames.put(bmd.j2eeName, new SchemeJndiNameInfo(destLookup, bmd));
                    mef.schemeJndiNameInfo = schemeJndiNames.get(bmd.j2eeName);
                    mef.schemeJndiNameInfo.addReferencingEndpoint(mef);

                } else if (destLookup != null) {
                    destId = destLookup;
                    mef.getBeanMetaData().ivMessageDestinationJndiName = destLookup;
                }
                // If destination is the only property of the two specified, then use it
                if (destId == null) {
                    destId = mef.getBeanMetaData().ivActivationConfig.getProperty("destination");
                }
            }
        }

        // Only create an admin object service info if the JNDI name did not have a scheme
        if (destId != null && !JNDIHelper.hasJNDIScheme(destId)) {
            mef.adminObjectServiceInfo = createNamedAdminObjectServiceInfo(destId);
            mef.adminObjectServiceInfo.addReferencingEndpoint(mef);
        }

        endpointFactories.add(mef);

        activateEndpointInternal(mef, true);
    }
synchronized void activateEndpoint ( MessageEndpointFactoryImpl mef ) throws ResourceException { mef . endpointActivationServiceInfo = createEndpointActivationServiceInfo ( mef . getActivationSpecId ( ) ) ; if ( mef . endpointActivationServiceInfo . getAutoStart ( ) == false && mef . shouldActivate == false ) { Tr . info ( tc , "MDB_ENDPOINT_NOT_ACTIVATED_AUTOSTART_CNTR4116I" , mef . getJ2EEName ( ) . getComponent ( ) , mef . getJ2EEName ( ) . getModule ( ) , mef . getJ2EEName ( ) . getApplication ( ) , mef . endpointActivationServiceInfo . id ) ; return ; } mef . endpointActivationServiceInfo . addReferencingEndpoint ( mef ) ; String destId = mef . getDestinationId ( ) ; if ( destId == null ) { if ( runtimeVersion . compareTo ( DEFAULT_VERSION ) == 0 ) { destId = mef . getBeanMetaData ( ) . ivActivationConfig . getProperty ( "destination" ) ; } else { BeanMetaData bmd = mef . getBeanMetaData ( ) ; String destLookup = bmd . ivActivationConfig . getProperty ( "destinationLookup" ) ; if ( destLookup != null && JNDIHelper . hasJNDIScheme ( destLookup ) ) { SchemeJndiNameInfo jndiInfo = new SchemeJndiNameInfo ( destLookup , bmd ) ; jndiInfo . updateLookupResult ( ) ; schemeJndiNames . put ( bmd . j2eeName , new SchemeJndiNameInfo ( destLookup , bmd ) ) ; mef . schemeJndiNameInfo = schemeJndiNames . get ( bmd . j2eeName ) ; mef . schemeJndiNameInfo . addReferencingEndpoint ( mef ) ; } else if ( destLookup != null ) { destId = destLookup ; mef . getBeanMetaData ( ) . ivMessageDestinationJndiName = destLookup ; } if ( destId == null ) { destId = mef . getBeanMetaData ( ) . ivActivationConfig . getProperty ( "destination" ) ; } } } if ( destId != null && ! JNDIHelper . hasJNDIScheme ( destId ) ) { mef . adminObjectServiceInfo = createNamedAdminObjectServiceInfo ( destId ) ; mef . adminObjectServiceInfo . addReferencingEndpoint ( mef ) ; } endpointFactories . add ( mef ) ; activateEndpointInternal ( mef , true ) ; }
Coordinates all of the resources necessary for activation of endpoints.
Specifically, an endpoint will be activated when all of the the following
occur:
<ul>
<li> the MessageEndpointFactory has been created
<li> the corresponding admin object service is available if a destination
was specified by the MDB activation configuration
<li> the corresponding endpoint activation service is available
<li> the server has reached the 'started' state
</ul>

When this method is called before all of these have occurred, the
activation of this endpoint will be deferred until all of the
above have occurred. <p>

This method also controls proper synchronization, to insure the necessary
state of all the required resources services.<p>

@param mef message endpoint factory to activate
@throws ResourceException if a failure occurs activating the endpoint