private boolean startChannelInChain(Channel targetChannel, Chain chain) throws ChannelException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "startChannelInChain");
        }
        // No need to check parameters since this is called from internal only.
        String channelName = targetChannel.getName();
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "channelName=" + channelName + " chainName=" + chain.getName());
        }
        boolean channelStarted = false;
        ChannelContainer channelContainer = channelRunningMap.get(channelName);
        // No need to check returned channelContainer since this is called from
        // internal only.
        RuntimeState channelState = channelContainer.getState();
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Found channel, state: " + channelState.ordinal);
        }
        Channel channel = channelContainer.getChannel();
        if ((RuntimeState.INITIALIZED == channelState) || (RuntimeState.QUIESCED == channelState)) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Starting channel");
            }
            try {
                channel.start();
            } catch (ChannelException ce) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "Channel " + channel + " threw ChannelException " + ce.getMessage());
                }
                throw ce;
            } catch (Throwable e) {
                FFDCFilter.processException(e, getClass().getName() + ".startChannelInChain", "1228", this, new Object[] { channel });
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "Channel " + channel + " threw non-ChannelException " + e.getMessage());
                }
                throw new ChannelException(e);
            }
            channelStarted = true;
            channelContainer.setState(RuntimeState.STARTED);
        } else {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Skip channel start, invalid former state: " + channelState.ordinal);
            }
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "startChannelInChain");
        }
        return channelStarted;
    }
private boolean startChannelInChain ( Channel targetChannel , Chain chain ) throws ChannelException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "startChannelInChain" ) ; } String channelName = targetChannel . getName ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "channelName=" + channelName + " chainName=" + chain . getName ( ) ) ; } boolean channelStarted = false ; ChannelContainer channelContainer = channelRunningMap . get ( channelName ) ; RuntimeState channelState = channelContainer . getState ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Found channel, state: " + channelState . ordinal ) ; } Channel channel = channelContainer . getChannel ( ) ; if ( ( RuntimeState . INITIALIZED == channelState ) || ( RuntimeState . QUIESCED == channelState ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Starting channel" ) ; } try { channel . start ( ) ; } catch ( ChannelException ce ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Channel " + channel + " threw ChannelException " + ce . getMessage ( ) ) ; } throw ce ; } catch ( Throwable e ) { FFDCFilter . processException ( e , getClass ( ) . getName ( ) + ".startChannelInChain" , "1228" , this , new Object [ ] { channel } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Channel " + channel + " threw non-ChannelException " + e . getMessage ( ) ) ; } throw new ChannelException ( e ) ; } channelStarted = true ; channelContainer . setState ( RuntimeState . STARTED ) ; } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Skip channel start, invalid former state: " + channelState . ordinal ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "startChannelInChain" ) ; } return channelStarted ; }
Start the input channel. While it isn't needed yet, the chain from which
the start is coming from is in the parameter list. This method will only
be called from the chain implementation. Regardless of what chains are
referenced by the channel, if the state is initialized or quiesced, then
the channel will be started.

@param targetChannel
being started
@param chain
the channel is in.
@return if the channel was started or not. Note, it may have already been
started.
@throws ChannelException