@Override
    public SICoreConnectionListener[] getConnectionListeners()
                    throws SIConnectionUnavailableException, SIConnectionDroppedException
    {
        if (TraceComponent.isAnyTracingEnabled() && CoreSPIConnection.tc.isEntryEnabled())
            SibTr.entry(CoreSPIConnection.tc, "getConnectionListeners", this);

        checkNotClosed();

        SICoreConnectionListener[] array = null;
        synchronized (_connectionListeners)
        {
            //convert our linked list to an array
            //create a new array of the correct runtime type
            SICoreConnectionListener[] resultArray =
                            new SICoreConnectionListener[_connectionListeners.size()];
            //populate a new array of the right type
            array =
                            _connectionListeners.toArray(
                                            resultArray);
        }
        if (TraceComponent.isAnyTracingEnabled() && CoreSPIConnection.tc.isEntryEnabled())
            SibTr.exit(CoreSPIConnection.tc, "getConnectionListeners", array);

        return array;
    }
@ Override public SICoreConnectionListener [ ] getConnectionListeners ( ) throws SIConnectionUnavailableException , SIConnectionDroppedException { if ( TraceComponent . isAnyTracingEnabled ( ) && CoreSPIConnection . tc . isEntryEnabled ( ) ) SibTr . entry ( CoreSPIConnection . tc , "getConnectionListeners" , this ) ; checkNotClosed ( ) ; SICoreConnectionListener [ ] array = null ; synchronized ( _connectionListeners ) { SICoreConnectionListener [ ] resultArray = new SICoreConnectionListener [ _connectionListeners . size ( ) ] ; array = _connectionListeners . toArray ( resultArray ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && CoreSPIConnection . tc . isEntryEnabled ( ) ) SibTr . exit ( CoreSPIConnection . tc , "getConnectionListeners" , array ) ; return array ; }
/*
(non-Javadoc)

@see com.ibm.wsspi.sib.core.SICoreConnection#getConnectionListeners()

The synchronization of this method is purely around the
connectionListeners object. This is because of a timing problem
between an asynch consumer processing an error and the server shutting
down. As this doesn't have any close checking, not synchronizing on the
*this* object won't matter.