https://issues.apache.org/jira/browse/AMQ-3236 - preserve store compatability with new ack attribute. Only use version 7 openwire on the wire, persist using version 6 format. New ack cause attribute does not need to persist as it gets set in a DLQ message property. resolve regression - org.apache.activemq.store.amq.reader.AMQReaderTest.testIterateArchive

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1086277 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2011-03-28 15:41:18 +00:00
parent d3676e4bc8
commit 8443bd188a
3 changed files with 8 additions and 3 deletions

View File

@ -26,6 +26,10 @@ public interface CommandTypes {
// What is the latest version of the openwire protocol
byte PROTOCOL_VERSION = 7;
// What is the latest version of the openwire protocol used in the stores
byte PROTOCOL_STORE_VERSION = 6;
// A marshaling layer can use this type to specify a null object.
byte NULL = 0;

View File

@ -38,7 +38,7 @@ import org.apache.activemq.wireformat.WireFormat;
*/
public final class OpenWireFormat implements WireFormat {
public static final int DEFAULT_VERSION = CommandTypes.PROTOCOL_VERSION;
public static final int DEFAULT_VERSION = CommandTypes.PROTOCOL_STORE_VERSION;
static final byte NULL_TYPE = CommandTypes.NULL;
private static final int MARSHAL_CACHE_SIZE = Short.MAX_VALUE / 2;

View File

@ -16,6 +16,7 @@
*/
package org.apache.activemq.openwire;
import org.apache.activemq.command.CommandTypes;
import org.apache.activemq.command.WireFormatInfo;
import org.apache.activemq.wireformat.WireFormat;
import org.apache.activemq.wireformat.WireFormatFactory;
@ -30,7 +31,7 @@ public class OpenWireFormatFactory implements WireFormatFactory {
// default negotiation.
//
private int version = OpenWireFormat.DEFAULT_VERSION;
private int version = CommandTypes.PROTOCOL_VERSION;
private boolean stackTraceEnabled = true;
private boolean tcpNoDelayEnabled = true;
private boolean cacheEnabled = true;
@ -59,7 +60,7 @@ public class OpenWireFormatFactory implements WireFormatFactory {
throw ise;
}
OpenWireFormat f = new OpenWireFormat();
OpenWireFormat f = new OpenWireFormat(version);
f.setPreferedWireFormatInfo(info);
return f;
}