Uploaded image for project: 'Tuscany'
  1. Tuscany
  2. TUSCANY-2836

DEFAULT_DESTINATION is not a Destination

    XMLWordPrintableJSON

Details

    Description

      I suggest that the JMSBindingConstants DEFAULT_DESTINATION_NAME and DEFAULT_RESPONSE_DESTINATION_NAME should be removed.

      String DEFAULT_DESTINATION_NAME = "NODESTINATION";
      String DEFAULT_RESPONSE_DESTINATION_NAME = "NORESPONSEDESTINATION";

      They are not really default destination names, but rather indicators that the Destination is unspecified. This can lead to confusing code and bugs if one assumes that a destination should be null if it has not been specified.

      The values in JMSBindingImpl.destinationName and JMSBinding.responseDestinationName should be null upon construction.

      Then the following would most likely be null checks instead of equals():
      ./org/apache/tuscany/sca/binding/jms/provider/JMSBindingInvoker.java:
      if (JMSBindingConstants.DEFAULT_RESPONSE_DESTINATION_NAME.equals(queueName)) {
      ./org/apache/tuscany/sca/binding/jms/provider/JMSBindingReferenceBindingProvider.java:
      if (jmsBinding.getDestinationName().equals(JMSBindingConstants.DEFAULT_DESTINATION_NAME)) {
      ./org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java:
      if (jmsBinding.getDestinationName().equals(JMSBindingConstants.DEFAULT_DESTINATION_NAME)) {
      ./org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java:
      if (service.isCallback() && JMSBindingConstants.DEFAULT_DESTINATION_NAME
      ./org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactoryImpl.java:
      if (JMSBindingConstants.DEFAULT_DESTINATION_NAME.equals(destName)) {
      ./org/apache/tuscany/sca/binding/jms/provider/RRBJMSBindingInvoker.java:
      if (JMSBindingConstants.DEFAULT_RESPONSE_DESTINATION_NAME.equals(queueName)) {

      There are probably other ramifications which i haven't fully explored...
      thanks,
      Tom

      Attachments

        Activity

          People

            simonslaws Simon Laws
            tsee Tom Seelbach
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: