From e264e6f9d1e8e5bcea7d1e30df8793731c608451 Mon Sep 17 00:00:00 2001 From: "Hiram R. Chirino" Date: Mon, 12 Jun 2006 19:42:33 +0000 Subject: [PATCH] http://issues.apache.org/activemq/browse/AMQ-682 git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@413733 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/activemq/openwire/OpenWireFormat.java | 4 ++-- .../activemq/openwire/OpenWireFormatFactory.java | 2 +- .../activemq/transport/WireFormatNegotiator.java | 2 +- .../transport/stomp/StompSubscriptionRemoveTest.java | 12 ++++-------- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java b/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java index 63846ae50e..49600f7355 100755 --- a/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java @@ -561,10 +561,10 @@ final public class OpenWireFormat implements WireFormat { return preferedWireFormatInfo; } - public void renegociatWireFormat(WireFormatInfo info) throws IOException { + public void renegotiateWireFormat(WireFormatInfo info) throws IOException { if( preferedWireFormatInfo==null ) - throw new IllegalStateException("Wireformat cannot not be renegociated."); + throw new IllegalStateException("Wireformat cannot not be renegotiated."); this.setVersion(Math.max(preferedWireFormatInfo.getVersion(), info.getVersion()) ); this.stackTraceEnabled = info.isStackTraceEnabled() && preferedWireFormatInfo.isStackTraceEnabled(); diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormatFactory.java b/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormatFactory.java index 530c75fb19..5b3af8ee50 100755 --- a/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormatFactory.java +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormatFactory.java @@ -26,7 +26,7 @@ import org.apache.activemq.command.WireFormatInfo; public class OpenWireFormatFactory implements WireFormatFactory { // - // The default values here are what the wireformat chanages to after a default negociation. + // The default values here are what the wire format changes to after a default negotiation. // private int version=1; diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/WireFormatNegotiator.java b/activemq-core/src/main/java/org/apache/activemq/transport/WireFormatNegotiator.java index 0ab2ec7d97..90a6848a01 100755 --- a/activemq-core/src/main/java/org/apache/activemq/transport/WireFormatNegotiator.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/WireFormatNegotiator.java @@ -97,7 +97,7 @@ public class WireFormatNegotiator extends TransportFilter { onException(new IOException("Remote wire format ("+info.getVersion()+") is lower the minimum version required ("+minimumVersion+")")); } - wireFormat.renegociatWireFormat(info); + wireFormat.renegotiateWireFormat(info); if (log.isDebugEnabled()) { log.debug(this + " after negotiation: " + wireFormat); diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompSubscriptionRemoveTest.java b/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompSubscriptionRemoveTest.java index f07dd97f9e..b291ebc323 100644 --- a/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompSubscriptionRemoveTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompSubscriptionRemoveTest.java @@ -27,18 +27,14 @@ import java.net.Socket; import javax.jms.Connection; import javax.jms.Message; -import javax.jms.MessageConsumer; import javax.jms.MessageProducer; import javax.jms.Session; import junit.framework.TestCase; import org.apache.activemq.ActiveMQConnectionFactory; -import org.apache.activemq.broker.Broker; import org.apache.activemq.broker.BrokerService; -import org.apache.activemq.broker.region.RegionBroker; import org.apache.activemq.command.ActiveMQQueue; -import org.apache.activemq.transport.stomp.Stomp; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -183,14 +179,14 @@ public class StompSubscriptionRemoveTest extends TestCase { } stompSocket.close(); broker.stop(); - log.info("Total messages receved: " + messagesCount); - assertTrue("Messages receved after connection loss: " + messagesCount, messagesCount >= 2000); + log.info("Total messages received: " + messagesCount); + assertTrue("Messages received after connection loss: " + messagesCount, messagesCount >= 2000); // The first ack messages has no chance complete, so we receiving more messages // Don't know how to list subscriptions for the broker. Currently you - // can check using jmx console. You'll see - // Subscription whithout any connections + // can check using JMX console. You'll see + // Subscription without any connections } public void sendFrame(String data) throws Exception {