Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F2987C7EC for ; Fri, 18 May 2012 11:02:36 +0000 (UTC) Received: (qmail 34615 invoked by uid 500); 18 May 2012 11:02:36 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 33920 invoked by uid 500); 18 May 2012 11:02:32 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 33670 invoked by uid 99); 18 May 2012 11:02:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 May 2012 11:02:30 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 May 2012 11:02:28 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id BE8D9CC44 for ; Fri, 18 May 2012 11:02:07 +0000 (UTC) Date: Fri, 18 May 2012 11:02:07 +0000 (UTC) From: "Raul Kripalani (JIRA)" To: dev@activemq.apache.org Message-ID: <1594513275.13564.1337338927790.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1426896135.6740.1335216753911.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (AMQ-3817) Marshalled properties don't get updated if modified during preProcessDispatch (TraceBrokerPathPlugin looks broken) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMQ-3817?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Raul Kripalani updated AMQ-3817: -------------------------------- Attachment: amq-tracebrokerpath-testcase.diff amq-tracebrokerpath-fix.diff Attached test case and fix. > Marshalled properties don't get updated if modified during preProcessDispatch (TraceBrokerPathPlugin looks broken) > ------------------------------------------------------------------------------------------------------------------ > > Key: AMQ-3817 > URL: https://issues.apache.org/jira/browse/AMQ-3817 > Project: ActiveMQ > Issue Type: Bug > Components: Broker > Affects Versions: 5.5.1 > Reporter: Raul Kripalani > Labels: marshaling, openwire, plugin > Attachments: amq-tracebrokerpath-fix.diff, amq-tracebrokerpath-testcase.diff > > > Enabling the TraceBrokerPathPlugin with a custom property name = 'JMSXTrace' sends outdated information to the consumer. When inspecting the property at the consumer code, it has not been updated with the complete broker path. Only the first broker, where the message was produced into, appears. No matter how many brokers are in the route (tested with 4). > Having dug into the code, it looks like marshalledProperties in Message were already set but not dirtied when setProperty was called again from the TraceBrokerPathPlugin. Also, Message.beforeMarshall() assumes that since marshalledProperties is already set, it doesn't need updating. Therefore, the message is dispatched to the consumer with an old version of the properties. > I think Message.setProperty() should check whether marshalledProperties already has a value. If it does, it should re-marshall (i.e. dirty the cache). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira