Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 63286 invoked from network); 28 May 2009 08:22:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 May 2009 08:22:56 -0000 Received: (qmail 91457 invoked by uid 500); 28 May 2009 08:23:08 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 91348 invoked by uid 500); 28 May 2009 08:23:08 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 91339 invoked by uid 99); 28 May 2009 08:23:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 May 2009 08:23:07 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 May 2009 08:23:05 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id A1699234C04B for ; Thu, 28 May 2009 01:22:45 -0700 (PDT) Message-ID: <503827335.1243498965660.JavaMail.jira@brutus> Date: Thu, 28 May 2009 01:22:45 -0700 (PDT) From: "Andreas Veithen (JIRA)" To: axis-dev@ws.apache.org Subject: [jira] Commented: (AXIS2-4188) JMSSender not extendable In-Reply-To: <599838022.1230063044229.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/AXIS2-4188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713904#action_12713904 ] Andreas Veithen commented on AXIS2-4188: ---------------------------------------- Adding custom properties to outgoing JMS messages is exactly the purpose of the TRANSPORT_HEADERS message context property. Set this property with a map and all entries will be added as properties on the JMS message. > JMSSender not extendable > ------------------------ > > Key: AXIS2-4188 > URL: https://issues.apache.org/jira/browse/AXIS2-4188 > Project: Axis 2.0 (Axis2) > Issue Type: Improvement > Components: transports > Affects Versions: 1.5, 1.4.1, 1.4 > Environment: All > Reporter: Ben Reif > Assignee: Asankha C. Perera > Original Estimate: 0.03h > Remaining Estimate: 0.03h > > We need to extend the org.apache.axis2.transport.jms.JMSSender class so that we can add some custom properties to the JMS Message (most likely via the MessageContext. However, the class is full of private methods which must be copied into a sub-class, and it also uses other classes such as JMSOutTransportInfo that only have package protected constructors. > This class is clearly meant to be extended because you can redefine the implementation class in the axis2.xml. But rather then just extending it and overridding a method, you have to jump through hoops and copy a bunch of code to do so. > In my opinion this is one of the most frustrating things about using open source code. Many Apache (and Sun projects as well) have a bad habit of coding everything private, package protected, or sometimes even making things final! Most open source projects these days are designed to be extended, but coding things in this way defeats that purpose. > Sorry for the long rant and rave, overall I think Axis2 is really great, but could you keep this in mind moving forward :) , and at least maybe make these methods protected in the next release: > JMSSender - > private Message createJMSMessage(MessageContext msgContext, Session session) throws JMSException { > } > private void setProperty(Message message, MessageContext msgCtx, String key){ > } > private String getProperty(MessageContext mc, String key) { > } > private static void handleException(String s) { > } > private static void handleException(String s, Exception e) { > } > -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.