public int sendMessage(Message message)
    {
        BaseMessageHeader messageHeader = ((BaseMessage)message).getMessageHeader();
        String strQueueType = messageHeader.getQueueType();
        String strQueueName = messageHeader.getQueueName();
        MessageSender sender = this.getMessageQueue(strQueueName, strQueueType).getMessageSender();
        if (sender != null)
            sender.sendMessage(message);
        else
            return Constant.ERROR_RETURN;  // Queue doesn't exist
        return Constant.NORMAL_RETURN;
    }
public int sendMessage ( Message message ) { BaseMessageHeader messageHeader = ( ( BaseMessage ) message ) . getMessageHeader ( ) ; String strQueueType = messageHeader . getQueueType ( ) ; String strQueueName = messageHeader . getQueueName ( ) ; MessageSender sender = this . getMessageQueue ( strQueueName , strQueueType ) . getMessageSender ( ) ; if ( sender != null ) sender . sendMessage ( message ) ; else return Constant . ERROR_RETURN ; return Constant . NORMAL_RETURN ; }
Send this message to the appropriate queue.
The message's message header has the queue name and type.
@param The message to send.
@return An error code.