Hiram R. Chirino 2006-06-12 19:42:33 +00:00
parent 7dafbb582f
commit e264e6f9d1
4 changed files with 8 additions and 12 deletions

View File

@ -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();

View File

@ -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;

View File

@ -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);

View File

@ -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 {