Repository: activemq-artemis Updated Branches: refs/heads/master 970623f52 -> 87ba02b9e
Use more versioned STOMP frames rather than generic Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/ebcf0c00 Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/ebcf0c00 Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/ebcf0c00 Branch: refs/heads/master Commit: ebcf0c0080f43e1d276fe4d83bc44a0c968285c3 Parents: 970623f Author: Ville Skyttä <[email protected]> Authored: Fri Jul 10 12:06:48 2015 +0300 Committer: Ville Skyttä <[email protected]> Committed: Fri Jul 10 12:06:48 2015 +0300 ---------------------------------------------------------------------- .../artemis/core/protocol/stomp/VersionedStompFrameHandler.java | 2 +- .../artemis/core/protocol/stomp/v11/StompFrameHandlerV11.java | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ebcf0c00/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/VersionedStompFrameHandler.java ---------------------------------------------------------------------- diff --git a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/VersionedStompFrameHandler.java b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/VersionedStompFrameHandler.java index c689104..2bed68c 100644 --- a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/VersionedStompFrameHandler.java +++ b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/VersionedStompFrameHandler.java @@ -165,7 +165,7 @@ public abstract class VersionedStompFrameHandler public StompFrame handleReceipt(String receiptID) { - StompFrame receipt = new StompFrame(Stomp.Responses.RECEIPT); + StompFrame receipt = createStompFrame(Stomp.Responses.RECEIPT); receipt.addHeader(Stomp.Headers.Response.RECEIPT_ID, receiptID); return receipt; http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ebcf0c00/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/v11/StompFrameHandlerV11.java ---------------------------------------------------------------------- diff --git a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/v11/StompFrameHandlerV11.java b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/v11/StompFrameHandlerV11.java index 5384277..656ed8d 100644 --- a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/v11/StompFrameHandlerV11.java +++ b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/v11/StompFrameHandlerV11.java @@ -103,7 +103,8 @@ public class StompFrameHandlerV11 extends VersionedStompFrameHandler implements else { // not valid - response = new StompFrame(Stomp.Responses.ERROR, true); + response = createStompFrame(Stomp.Responses.ERROR); + response.setNeedsDisconnect(true); response.addHeader(Stomp.Headers.Error.MESSAGE, "Failed to connect"); response.setBody("The login account is not valid."); } @@ -268,7 +269,7 @@ public class StompFrameHandlerV11 extends VersionedStompFrameHandler implements public StompFrame createPingFrame() { - StompFrame frame = new StompFrame(Stomp.Commands.STOMP); + StompFrame frame = createStompFrame(Stomp.Commands.STOMP); frame.setPing(true); return frame; }
