TcpTransportFactory adds LoggingTransport after WireFormatNegotiator
--------------------------------------------------------------------

                 Key: AMQ-985
                 URL: https://issues.apache.org/activemq/browse/AMQ-985
             Project: ActiveMQ
          Issue Type: Improvement
          Components: NMS (C# client)
    Affects Versions: 4.0.2
         Environment: Windows
            Reporter: Rob Lugt
         Assigned To: james strachan
            Priority: Minor


The TcpTransportFactory class will insert a LoggingTransport filter into the 
transport chain if the useLogging=true attribute is set.  However, it currently 
adds the LoggingTransport after the WireFormatNegotiator, which means that the 
wire format negotiation packets are excluded from the log output.  This can be 
simply rectified by adding the LoggingTransport immediately after the 
TcpTransport.  e.g.

  public ITransport CreateTransport(Uri location) 
                {
            // Console.WriteLine("Opening socket to: " + host + " on port: " + 
port);
            Socket socket = Connect(location.Host, location.Port);
            TcpTransport tcpTransport = new TcpTransport(socket);
            ITransport rc = tcpTransport;

                        // At present the URI is parsed for options by the 
ConnectionFactory
                        if (UseLogging)
                        {
                                rc = new LoggingTransport(rc);
                        }

            rc = new WireFormatNegotiator(rc, tcpTransport.Wireformat);
            ...


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to