@Override
    public DestinationConfiguration getDestinationConfiguration(SIDestinationAddress destAddr)

                    throws SIConnectionUnavailableException, SIConnectionDroppedException,
                    SIErrorException,
                    SIIncorrectCallException,
                    SITemporaryDestinationNotFoundException, SIResourceException, SINotPossibleInCurrentConfigurationException
    {
        if (TraceComponent.isAnyTracingEnabled() && CoreSPIConnection.tc.isEntryEnabled())
            SibTr.entry(CoreSPIConnection.tc, "getDestinationConfiguration",
                        new Object[] { this, destAddr });

        // See if this connection has been closed
        checkNotClosed();

        if (destAddr == null)
        {
            if (TraceComponent.isAnyTracingEnabled() && CoreSPIConnection.tc.isEntryEnabled())
                SibTr.exit(CoreSPIConnection.tc, "getDestinationConfiguration", "SIIncorrectCallException - null destAddr");
            throw new SIIncorrectCallException(
                            nls_cwsir.getFormattedMessage(
                                                          "GET_DEST_CONFIG_CWSIR0081",
                                                          null,
                                                          null));
        }

        DestinationConfiguration dc = null;

        DestinationHandler dh = _destinationManager.getDestination((JsDestinationAddress) destAddr, false);

        // If the destination is temporary then create a destionationConfiguration with
        //  what we have and know.
        if (destAddr.isTemporary())
        {
            DestinationType destinationType = DestinationType.QUEUE;
            if (destAddr.getDestinationName().startsWith(SIMPConstants.TEMPORARY_PUBSUB_DESTINATION_PREFIX))
            {
                destinationType = DestinationType.TOPICSPACE;
            }

            // Handle the case where the destination is foreign temporary
            boolean foreignTempDestination = false;
            String busName = destAddr.getBusName();
            if ((busName != null) &&
                !(busName.equals(_messageProcessor.getMessagingEngineBus())))
            {
                foreignTempDestination = true;
            }

            // Check authority to inquire on the destination
            // If security is disabled then we'll bypass the check
            if (_isBusSecure)
            {
                SecurityContext secContext = new SecurityContext(this._subject,
                                null, // alternateUser 
                                null,
                                _messageProcessor.getAuthorisationUtils());

                // Check authority to inquire on the temp destination
                if (!foreignTempDestination)
                {
                    checkInquireAuthority(dh,
                                          destAddr.getDestinationName(),
                                          null, // home bus,
                                          secContext,
                                          true);
                }
                else
                {
                    // Need foreign bus style processing
                    checkInquireAuthority(dh,
                                          null, // null for this style of access check
                                          busName, // home bus,
                                          secContext,
                                          false);
                }
            }

            dc =
                            new DestinationConfigurationImpl(0,
                                            Reliability.EXPRESS_NONPERSISTENT,
                                            null,
                                            null,
                                            destinationType,
                                            null,
                                            0,
                                            Reliability.EXPRESS_NONPERSISTENT,
                                            destAddr.getDestinationName(),
                                            null,
                                            false,
                                            true,
                                            true,
                                            true,
                                            null,
                                            null,
                                            false);
        }
        else if (dh.isForeignBus())
        {
            // Check authority to inquire on the destination
            // If security is disabled then we'll bypass the check
            if (_isBusSecure)
            {
                SecurityContext secContext = new SecurityContext(this._subject,
                                null, // alternateUser 
                                null,
                                _messageProcessor.getAuthorisationUtils());

                String busName = dh.getName();

                // Check authority to inquire on the foreign bus
                checkInquireAuthority(dh,
                                      null, // null for this style of access check
                                      busName,
                                      secContext,
                                      false);

            }

            // If this is a foreign bus - then there will be no definition associated with the 
            // destination handler, so construct one based on the BusHandler.
            dc =
                            new DestinationConfigurationImpl(dh.getDefaultPriority(),
                                            dh.getDefaultReliability(),
                                            dh.getDescription(),
                                            ((BusHandler) dh).getDestinationContext(),
                                            dh.getDestinationType(),
                                            dh.getExceptionDestination(),
                                            dh.getMaxFailedDeliveries(),
                                            dh.getMaxReliability(),
                                            dh.getName(),
                                            dh.getUuid().toString(),
                                            dh.isOverrideOfQOSByProducerAllowed(),
                                            dh.isReceiveAllowed(),
                                            dh.isReceiveExclusive(),
                                            dh.isSendAllowed(),
                                            dh.getDefaultForwardRoutingPath(),
                                            dh.getReplyDestination(),
                                            dh.isOrdered());

        }
        else
        {
            // For non-local destinations, will throw SIDestinationNotFoundException
            // In later milestone, Admin will provide i/f for us to query both
            // local and remove destination configurations  
            BaseDestinationDefinition baseDefinition = dh.getDefinition();
            if (dh.isAlias())
            {
                //see defect 296430
                //we resolve alias destinations to their real destinations
                baseDefinition = ((AliasDestinationHandler) dh).getResolvedDestinationHandler().getDefinition();
            }
            DestinationDefinition definition = (DestinationDefinition) baseDefinition;

            // Check authority to inquire on the destination
            // If security is disabled then we'll bypass the check
            if (_isBusSecure)
            {
                SecurityContext secContext = new SecurityContext(this._subject,
                                null, // alternateUser 
                                null,
                                _messageProcessor.getAuthorisationUtils());

                String destinationName = destAddr.getDestinationName();

                // Check authority to inquire on this destination
                checkInquireAuthority(dh,
                                      destinationName,
                                      null, // home bus
                                      secContext,
                                      false);
            }

            dc =
                            new DestinationConfigurationImpl(definition.getDefaultPriority(),
                                            definition.getDefaultReliability(),
                                            definition.getDescription(),
                                            definition.getDestinationContext(),
                                            definition.getDestinationType(),
                                            definition.getExceptionDestination(),
                                            definition.getMaxFailedDeliveries(),
                                            definition.getMaxReliability(),
                                            definition.getName(),
                                            definition.getUUID().toString(),
                                            definition.isOverrideOfQOSByProducerAllowed(),
                                            definition.isReceiveAllowed(),
                                            definition.isReceiveExclusive(),
                                            definition.isSendAllowed(),
                                            dh.getDefaultForwardRoutingPath(),
                                            dh.getReplyDestination(),
                                            dh.isOrdered());
        }

        if (TraceComponent.isAnyTracingEnabled() && CoreSPIConnection.tc.isEntryEnabled())
            SibTr.exit(CoreSPIConnection.tc, "getDestinationConfiguration", dc);
        return dc;
    }
@ Override public DestinationConfiguration getDestinationConfiguration ( SIDestinationAddress destAddr ) throws SIConnectionUnavailableException , SIConnectionDroppedException , SIErrorException , SIIncorrectCallException , SITemporaryDestinationNotFoundException , SIResourceException , SINotPossibleInCurrentConfigurationException { if ( TraceComponent . isAnyTracingEnabled ( ) && CoreSPIConnection . tc . isEntryEnabled ( ) ) SibTr . entry ( CoreSPIConnection . tc , "getDestinationConfiguration" , new Object [ ] { this , destAddr } ) ; checkNotClosed ( ) ; if ( destAddr == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && CoreSPIConnection . tc . isEntryEnabled ( ) ) SibTr . exit ( CoreSPIConnection . tc , "getDestinationConfiguration" , "SIIncorrectCallException - null destAddr" ) ; throw new SIIncorrectCallException ( nls_cwsir . getFormattedMessage ( "GET_DEST_CONFIG_CWSIR0081" , null , null ) ) ; } DestinationConfiguration dc = null ; DestinationHandler dh = _destinationManager . getDestination ( ( JsDestinationAddress ) destAddr , false ) ; if ( destAddr . isTemporary ( ) ) { DestinationType destinationType = DestinationType . QUEUE ; if ( destAddr . getDestinationName ( ) . startsWith ( SIMPConstants . TEMPORARY_PUBSUB_DESTINATION_PREFIX ) ) { destinationType = DestinationType . TOPICSPACE ; } boolean foreignTempDestination = false ; String busName = destAddr . getBusName ( ) ; if ( ( busName != null ) && ! ( busName . equals ( _messageProcessor . getMessagingEngineBus ( ) ) ) ) { foreignTempDestination = true ; } if ( _isBusSecure ) { SecurityContext secContext = new SecurityContext ( this . _subject , null , null , _messageProcessor . getAuthorisationUtils ( ) ) ; if ( ! foreignTempDestination ) { checkInquireAuthority ( dh , destAddr . getDestinationName ( ) , null , secContext , true ) ; } else { checkInquireAuthority ( dh , null , busName , secContext , false ) ; } } dc = new DestinationConfigurationImpl ( 0 , Reliability . EXPRESS_NONPERSISTENT , null , null , destinationType , null , 0 , Reliability . EXPRESS_NONPERSISTENT , destAddr . getDestinationName ( ) , null , false , true , true , true , null , null , false ) ; } else if ( dh . isForeignBus ( ) ) { if ( _isBusSecure ) { SecurityContext secContext = new SecurityContext ( this . _subject , null , null , _messageProcessor . getAuthorisationUtils ( ) ) ; String busName = dh . getName ( ) ; checkInquireAuthority ( dh , null , busName , secContext , false ) ; } dc = new DestinationConfigurationImpl ( dh . getDefaultPriority ( ) , dh . getDefaultReliability ( ) , dh . getDescription ( ) , ( ( BusHandler ) dh ) . getDestinationContext ( ) , dh . getDestinationType ( ) , dh . getExceptionDestination ( ) , dh . getMaxFailedDeliveries ( ) , dh . getMaxReliability ( ) , dh . getName ( ) , dh . getUuid ( ) . toString ( ) , dh . isOverrideOfQOSByProducerAllowed ( ) , dh . isReceiveAllowed ( ) , dh . isReceiveExclusive ( ) , dh . isSendAllowed ( ) , dh . getDefaultForwardRoutingPath ( ) , dh . getReplyDestination ( ) , dh . isOrdered ( ) ) ; } else { BaseDestinationDefinition baseDefinition = dh . getDefinition ( ) ; if ( dh . isAlias ( ) ) { baseDefinition = ( ( AliasDestinationHandler ) dh ) . getResolvedDestinationHandler ( ) . getDefinition ( ) ; } DestinationDefinition definition = ( DestinationDefinition ) baseDefinition ; if ( _isBusSecure ) { SecurityContext secContext = new SecurityContext ( this . _subject , null , null , _messageProcessor . getAuthorisationUtils ( ) ) ; String destinationName = destAddr . getDestinationName ( ) ; checkInquireAuthority ( dh , destinationName , null , secContext , false ) ; } dc = new DestinationConfigurationImpl ( definition . getDefaultPriority ( ) , definition . getDefaultReliability ( ) , definition . getDescription ( ) , definition . getDestinationContext ( ) , definition . getDestinationType ( ) , definition . getExceptionDestination ( ) , definition . getMaxFailedDeliveries ( ) , definition . getMaxReliability ( ) , definition . getName ( ) , definition . getUUID ( ) . toString ( ) , definition . isOverrideOfQOSByProducerAllowed ( ) , definition . isReceiveAllowed ( ) , definition . isReceiveExclusive ( ) , definition . isSendAllowed ( ) , dh . getDefaultForwardRoutingPath ( ) , dh . getReplyDestination ( ) , dh . isOrdered ( ) ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && CoreSPIConnection . tc . isEntryEnabled ( ) ) SibTr . exit ( CoreSPIConnection . tc , "getDestinationConfiguration" , dc ) ; return dc ; }
/*
(non-Javadoc)

@see com.ibm.wsspi.sib.core.SICoreConnection#getDestinationConfiguration(com.ibm.websphere.sib.SIDestinationAddress)