You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Ben Reif (JIRA)" <ji...@apache.org> on 2008/12/23 21:10:44 UTC

[jira] Created: (AXIS2-4188) JMSSender not extendable

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.4, 1.4.1, 1.5
         Environment: All
            Reporter: Ben Reif


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 this method protected in the next release:

JMSSender - 

protected Message createJMSMessage(MessageContext msgContext, Session session)  throws JMSException {
}
 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AXIS2-4188) JMSSender not extendable

Posted by "Ben Reif (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713944#action_12713944 ] 

Ben Reif commented on AXIS2-4188:
---------------------------------

Thanks for the information. Is this in a new version of Axis2? I'm using Axis2 1.4, and I don't see where the JMSSender looks for the MessageContext.TRANSPORT_HEADERS property to set values 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.


[jira] Commented: (AXIS2-4188) JMSSender not extendable

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12658954#action_12658954 ] 

Andreas Veithen commented on AXIS2-4188:
----------------------------------------

Ben,

I understand your point of view very well. However I cannot agree with it. The reason is that from a developer's perspective, having a class with lots of protected methods makes it extremely hazardous to modify the code because you never know if by changing (or removing) a protected method you break existing code in other projects [BTW: in the current version of JMSSender, the signature of createJMSMessage has already changed compared to the version you are referring to]. Excessive usage of protected methods is therefore an impediment to innovation and quality improvement. In my opinion (and I'm not alone) the best practice is to make methods private or final unless they are specifically intended to be overridden.

I agree with David that if you have specific needs, we will be very happy either to integrate new functionalities into the code base, to define extension points that you can use or to refactor some private methods into public static methods in a utility class.

> 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
>   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.


[jira] Commented: (AXIS2-4188) JMSSender not extendable

Posted by "David Illsley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12658950#action_12658950 ] 

David Illsley commented on AXIS2-4188:
--------------------------------------

I could claim that it's that way to encourage you to contribute your changes back to the community. I doubt it is, but it's a nice thought.

Could you expand on what you need to do so we can see if we should add it to common version of the class or simply make the class more extensible like you suggest? Would a map of customer properties you could add as a specific property on the message context meet all your needs?

> 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
>   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.


[jira] Commented: (AXIS2-4188) JMSSender not extendable

Posted by "Ben Reif (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12714375#action_12714375 ] 

Ben Reif commented on AXIS2-4188:
---------------------------------

Ok, for now we'll keep our temporary solution of making the methods protected and extending the JMSSender. When we upgrade we'll take a look changing our code to use what ever the latest code base has. Thanks for all of your help.

> 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.


[jira] Updated: (AXIS2-4188) JMSSender not extendable

Posted by "Ben Reif (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ben Reif updated AXIS2-4188:
----------------------------

    Description: 
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) {
}
 

  was:
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 this method protected in the next release:

JMSSender - 

protected Message createJMSMessage(MessageContext msgContext, Session session)  throws JMSException {
}
 


> 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
>   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.


[jira] Commented: (AXIS2-4188) JMSSender not extendable

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12714198#action_12714198 ] 

Andreas Veithen commented on AXIS2-4188:
----------------------------------------

I'm not familiar with the code of the JMS transport in version 1.4, so it's possible that it doesn't support TRANSPORT_HEADERS. What happened is that the JMS transport has been maintained during some time under the Apache Synapse project. The original implementation (i.e. the one in 1.4 and before) has been discontinued and there is now a single "official" version in the WS-Commons Transport project. This will be released some time after the Axis2 1.5 release.

> 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.


[jira] Commented: (AXIS2-4188) JMSSender not extendable

Posted by "Andreas Veithen (JIRA)" <ji...@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.


[jira] Commented: (AXIS2-4188) JMSSender not extendable

Posted by "Ben Reif (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713601#action_12713601 ] 

Ben Reif commented on AXIS2-4188:
---------------------------------

Sorry to reply so late, I got pulled onto some other projects. We just needed a way to include additional custom properties onto the JMSMessage, so I was thinking that simply making those methods protected might be the easiest way to go about it. I do see your point about changing protected methods and potentially breaking other code. Any of the suggested solutions above (putting things into a Map in the MessageContext, or simply refactoring the code to provide extension points) would be an improvement and would probably meet our needs. I'd be happy to contribute a patch, but at the moment I think all we did was just updated the class files and made those methods protected so that we could override them in our implementation. It sounds like that's not the ideal solution though, so we'll probably have to revisit that approach if one of the above suggestions is implemented. 

One thing that could be done (I think this is one option suggested above) is to add a new value in JMSConstants:

public static final String JMS_MESSAGE_PROPERTIES_PREFIX  = "JMS_MESSAGE_PROPERTIES_PREFIX_";

Then in createJMSMessage() do this before returning the JMS Message:

for(String key:msgContext.getProperties().keySet()){
   if(key.startsWith(JMSConstants.JMS_MESSAGE_PROPERTIES_PREFIX)){
      setProperty(message, msgContext, key.replaceFirst(JMSConstants.JMS_MESSAGE_PROPERTIES_PREFIX, ""));
   }
}

By adding a value in the MessageContext that begins with JMS_MESSAGE_PROPERTIES_PREFIX, it will automatically get included in the JMS Message. The bad thing is that you have to iterate through all of the MessageContext Properties, but at least you don't have to make those methods protected. Anyway, just one idea.

> 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.


[jira] Resolved: (AXIS2-4188) JMSSender not extendable

Posted by "Asankha C. Perera (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Asankha C. Perera resolved AXIS2-4188.
--------------------------------------

    Resolution: Won't Fix
      Assignee: Asankha C. Perera

If a patch is contributed, we could consider for inclusion into the new WS-Commons JMS transport

> 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.