DO NOT REPLY [Bug 48155] New: Multiple problems / enhancements with JMS protocol classes.

View: New views
11 Messages — Rating Filter:   Alert me  

DO NOT REPLY [Bug 48155] New: Multiple problems / enhancements with JMS protocol classes.

by Bugzilla from bugzilla@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://issues.apache.org/bugzilla/show_bug.cgi?id=48155

           Summary: Multiple problems / enhancements with JMS protocol
                    classes.
           Product: JMeter
           Version: 2.3.4
          Platform: PC
        OS/Version: Mac OS X 10.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
        AssignedTo: jmeter-dev@...
        ReportedBy: martinrleon@...


1. (ENHANCEMENT) Added method "getMessageHeaders()" to BaseJMSSubscriber class
to create String representation of the JMS Message Header variables.

    /**
     * Returns a String with the JMS Message Header values.
     *
     * @param message JMS Message
     * @return String with message header values.
     */
    public static String getMessageHeaders(Message message) {
        final StringBuffer response = new StringBuffer(256);
        try {
            response.append("JMS Message Header Attributes:");
            response.append("\n   Correlation ID: ");
            response.append(message.getJMSCorrelationID());

            response.append("\n   Delivery Mode: ");
            if (message.getJMSDeliveryMode() == DeliveryMode.PERSISTENT) {
                response.append("PERSISTENT");
            } else {
                response.append("NON-PERSISTENT");
            }

            final Destination destination = message.getJMSDestination();

            response.append("\n   Destination: ");
            response.append((destination == null ? null : destination
                .toString()));

            response.append("\n   Expiration: ");
            response.append(new Date(message.getJMSExpiration()));

            response.append("\n   Message ID: ");
            response.append(message.getJMSMessageID());

            response.append("\n   Priority: ");
            response.append(message.getJMSPriority());

            response.append("\n   Redelivered: ");
            response.append(message.getJMSRedelivered());

            final Destination replyTo = message.getJMSReplyTo();
            response.append("\n   Reply to: ");
            response.append((replyTo == null ? null : replyTo.toString()));

            response.append("\n   Timestamp: ");
            response.append(new Date(message.getJMSTimestamp()));

            response.append("\n   Type: ");
            response.append(message.getJMSType());

            response.append("\n\n");
        } catch (JMSException e) {
            e.printStackTrace();
        }
        return new String(response);
    }

2. (DEFECT) SubscriberSampler.sampleWithListener() does not call

   result.setDataType(SampleResult.TEXT);

so the result data is not displayed in the Response Data pane.

3. (DEFECT) Same problem exists with SubscriberSampler.sampleWithReceive()

4. (ENHANCEMENT) Add call getMessageHeaders() to SubscriberSampler.onMessage()
so that JMS Message Header info can be displayed in Response Data pane:

   this.BUFFER.append(getMessageHeaders(message));
   this.BUFFER.append("JMS Message Text:\n\n");
   this.BUFFER.append(content);

5. (DEFECT) ReceiveSubscriber() constructor is using mix of local and instance
variable to try to create TopicSession and TopicSubscriber resulting in NPE.
Use the instance variables instead, remove the local variables.

6. (ENHANCEMENT) modify ReceiveSubscriber.run() to add JMS Header to data
buffer:

   synchronized (this) {
      this.buffer.append(BaseJMSSampler.getMessageHeaders(message));
      this.buffer.append("JMS Message Text:\n\n");
      this.buffer.append(text);
      count(1);
   }

7 (DEFECT) PublisherSampler.sample() is missing call to
result.setDataType(SampleResult.TEXT) and add calls to set the Request Data and
Result values:

    public SampleResult sample() {
        SampleResult result = new SampleResult();

        // REQUIRED TO DISPLAY IN REQEST / RESPONSE PANES
        result.setDataType(SampleResult.TEXT);
        result.setSampleLabel(getName());
        if (this.PUB == null) {
            this.initClient();
        }
        int loop = this.getIterationCount();
        if (this.PUB != null) {
            result.sampleStart();
            for (int idx = 0; idx < loop; idx++) {
                String tmsg = this.getMessageContent();
                this.PUB.publish(tmsg);
                this.BUFFER.append(tmsg);
            }
            result.sampleEnd();
            String content = this.BUFFER.toString();
            result.setBytes(content.getBytes().length);
            result.setResponseCode("message published successfully");
            result.setResponseMessage(loop + " messages published");
            result.setSuccessful(true);
            // SET RESPONSE PANE DATA TO N/A
            result.setResponseData("Not Applicable".getBytes());
            // SET REQUEST PANE DATA
            result.setSamplerData(content);
            result.setSampleCount(loop);
            this.BUFFER.setLength(0);
        }
        return result;
    }

--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@...
For additional commands, e-mail: jmeter-dev-help@...


DO NOT REPLY [Bug 48155] Multiple problems / enhancements with JMS protocol classes.

by Bugzilla from bugzilla@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://issues.apache.org/bugzilla/show_bug.cgi?id=48155

martinrl <martinrleon@...> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |major

--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@...
For additional commands, e-mail: jmeter-dev-help@...


DO NOT REPLY [Bug 48155] Multiple problems / enhancements with JMS protocol classes.

by Bugzilla from bugzilla@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://issues.apache.org/bugzilla/show_bug.cgi?id=48155

--- Comment #1 from martinrl <martinrleon@...> 2009-11-06 19:19:13 UTC ---
Created an attachment (id=24503)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24503)
Proposed patches

--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@...
For additional commands, e-mail: jmeter-dev-help@...


DO NOT REPLY [Bug 48155] Multiple problems / enhancements with JMS protocol classes.

by Bugzilla from bugzilla@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://issues.apache.org/bugzilla/show_bug.cgi?id=48155

Sebb <sebb@...> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #2 from Sebb <sebb@...> 2009-11-13 14:41:29 UTC ---
Thanks for the suggestions.

Unfortunately they cannot be applied as they stand, as the source code has
changed, and the changes are provided as full source files which no longer
provide sensible differences.

Please can you provide the changes as patches in unified difference format?

Ideally against the current version in SVN, but even differences from the
source you based your changes on would probably be OK.

--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@...
For additional commands, e-mail: jmeter-dev-help@...


DO NOT REPLY [Bug 48155] Multiple problems / enhancements with JMS protocol classes.

by Bugzilla from bugzilla@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://issues.apache.org/bugzilla/show_bug.cgi?id=48155

--- Comment #3 from martinrl <martinrleon@...> 2009-11-13 17:12:23 UTC ---
I'm a newbie to submitting patch suggestions.  I am attaching a ZIP file with
the original and fixed files in separate folders.  If you need me to do more,
please let me know.  I want to contribute in whatever way I can.  Thank you for
such a great tool!  I am still learning it, but I see it as a very valuable
tool, thank you very much!

--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@...
For additional commands, e-mail: jmeter-dev-help@...


DO NOT REPLY [Bug 48155] Multiple problems / enhancements with JMS protocol classes.

by Bugzilla from bugzilla@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://issues.apache.org/bugzilla/show_bug.cgi?id=48155

--- Comment #4 from martinrl <martinrleon@...> 2009-11-13 17:13:50 UTC ---
Created an attachment (id=24531)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24531)
Patches with original source

--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@...
For additional commands, e-mail: jmeter-dev-help@...


DO NOT REPLY [Bug 48155] Multiple problems / enhancements with JMS protocol classes.

by Bugzilla from bugzilla@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://issues.apache.org/bugzilla/show_bug.cgi?id=48155

--- Comment #5 from martinrl <martinrleon@...> 2009-11-13 17:23:00 UTC ---
I re-read your response, what is a "unified different format"?  Can you point
me to a URL explaining how to do this?

The files I provided can be "diff"d against each other.  They are the original
2.3.4 source and the fixed source files.

Please let me know if you want me to do something different.

--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@...
For additional commands, e-mail: jmeter-dev-help@...


DO NOT REPLY [Bug 48155] Multiple problems / enhancements with JMS protocol classes.

by Bugzilla from bugzilla@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://issues.apache.org/bugzilla/show_bug.cgi?id=48155

Sebb <sebb@...> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #6 from Sebb <sebb@...> 2009-11-13 18:50:47 UTC ---
(In reply to comment #5)
> I re-read your response, what is a "unified different format"?  Can you point
> me to a URL explaining how to do this?

http://www.apache.org/dev/contributors.html#patches

--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@...
For additional commands, e-mail: jmeter-dev-help@...


DO NOT REPLY [Bug 48155] Multiple problems / enhancements with JMS protocol classes.

by Bugzilla from bugzilla@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://issues.apache.org/bugzilla/show_bug.cgi?id=48155

martinrl <martinrleon@...> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #24503|0                           |1
        is obsolete|                            |
  Attachment #24531|0                           |1
        is obsolete|                            |

--- Comment #7 from martinrl <martinrleon@...> 2009-11-13 19:50:25 UTC ---
Created an attachment (id=24532)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24532)
Proposed patches

Thanks for guide on patches.  Here's the resulting patch file.

--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@...
For additional commands, e-mail: jmeter-dev-help@...


DO NOT REPLY [Bug 48155] Multiple problems / enhancements with JMS protocol classes.

by Bugzilla from bugzilla@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://issues.apache.org/bugzilla/show_bug.cgi?id=48155

Sebb <sebb@...> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #8 from Sebb <sebb@...> 2009-11-14 14:09:36 UTC ---
(In reply to comment #7)
> Created an attachment (id=24532)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24532) [details]
> Proposed patches
>
> Thanks for guide on patches.  Here's the resulting patch file.

Unfortunately the patch appears to have been made by comparing your version
against the current code in trunk. As your changes were not made to the current
code, this means that several recent changes would be lost if the patches were
applied.

What's needed is a patch file showing exactly what you changed, i.e. the
changes need to be against whatever you started with, which I think was 2.3.4?

Alternatively, redo your changes to the current code in trunk, and produce a
new patch for that.

--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@...
For additional commands, e-mail: jmeter-dev-help@...


DO NOT REPLY [Bug 48155] Multiple problems / enhancements with JMS protocol classes.

by Bugzilla from bugzilla@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://issues.apache.org/bugzilla/show_bug.cgi?id=48155

martinrl <martinrleon@...> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #24532|0                           |1
        is obsolete|                            |

--- Comment #9 from martinrl <martinrleon@...> 2009-11-14 15:26:49 UTC ---
Created an attachment (id=24538)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24538)
Proposed patches against current revision

One more time....  Thanks for your patience with a rookie!

--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@...
For additional commands, e-mail: jmeter-dev-help@...