@Override
    public void taskStarting() throws RejectedExecutionException {
        // Deserialization path. By the time we are here the metadata should already be present.
        if (metaDataIdentifier != null && metadataToPropagate == null)
            metadataToPropagate = (ComponentMetaData) jeeMetadataContextProvider.metadataIdentifierService.getMetaData(metaDataIdentifier);

        if (metadataToPropagate == null)
            compMetadataAccessor.beginDefaultContext();
        else {
            for (Iterator<ComponentMetaDataDecorator> it = jeeMetadataContextProvider.componentMetadataDecoratorRefs.getServices(); it.hasNext();) {
                ComponentMetaDataDecorator decorator = it.next();
                ComponentMetaData metadata = decorator.decorate(metadataToPropagate);
                if (metadata != null) {
                    compMetadataAccessor.beginContext(metadata);
                    return;
                }
            }
            compMetadataAccessor.beginContext(metadataToPropagate);
        }
    }
@ Override public void taskStarting ( ) throws RejectedExecutionException { if ( metaDataIdentifier != null && metadataToPropagate == null ) metadataToPropagate = ( ComponentMetaData ) jeeMetadataContextProvider . metadataIdentifierService . getMetaData ( metaDataIdentifier ) ; if ( metadataToPropagate == null ) compMetadataAccessor . beginDefaultContext ( ) ; else { for ( Iterator < ComponentMetaDataDecorator > it = jeeMetadataContextProvider . componentMetadataDecoratorRefs . getServices ( ) ; it . hasNext ( ) ; ) { ComponentMetaDataDecorator decorator = it . next ( ) ; ComponentMetaData metadata = decorator . decorate ( metadataToPropagate ) ; if ( metadata != null ) { compMetadataAccessor . beginContext ( metadata ) ; return ; } } compMetadataAccessor . beginContext ( metadataToPropagate ) ; } }
{@inheritDoc}