mirror of https://github.com/apache/activemq.git
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:
parent
d3676e4bc8
commit
8443bd188a
|
@ -26,6 +26,10 @@ public interface CommandTypes {
|
||||||
// What is the latest version of the openwire protocol
|
// What is the latest version of the openwire protocol
|
||||||
byte PROTOCOL_VERSION = 7;
|
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.
|
// A marshaling layer can use this type to specify a null object.
|
||||||
byte NULL = 0;
|
byte NULL = 0;
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ import org.apache.activemq.wireformat.WireFormat;
|
||||||
*/
|
*/
|
||||||
public final class OpenWireFormat implements 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;
|
static final byte NULL_TYPE = CommandTypes.NULL;
|
||||||
private static final int MARSHAL_CACHE_SIZE = Short.MAX_VALUE / 2;
|
private static final int MARSHAL_CACHE_SIZE = Short.MAX_VALUE / 2;
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.activemq.openwire;
|
package org.apache.activemq.openwire;
|
||||||
|
|
||||||
|
import org.apache.activemq.command.CommandTypes;
|
||||||
import org.apache.activemq.command.WireFormatInfo;
|
import org.apache.activemq.command.WireFormatInfo;
|
||||||
import org.apache.activemq.wireformat.WireFormat;
|
import org.apache.activemq.wireformat.WireFormat;
|
||||||
import org.apache.activemq.wireformat.WireFormatFactory;
|
import org.apache.activemq.wireformat.WireFormatFactory;
|
||||||
|
@ -30,7 +31,7 @@ public class OpenWireFormatFactory implements WireFormatFactory {
|
||||||
// default negotiation.
|
// default negotiation.
|
||||||
//
|
//
|
||||||
|
|
||||||
private int version = OpenWireFormat.DEFAULT_VERSION;
|
private int version = CommandTypes.PROTOCOL_VERSION;
|
||||||
private boolean stackTraceEnabled = true;
|
private boolean stackTraceEnabled = true;
|
||||||
private boolean tcpNoDelayEnabled = true;
|
private boolean tcpNoDelayEnabled = true;
|
||||||
private boolean cacheEnabled = true;
|
private boolean cacheEnabled = true;
|
||||||
|
@ -59,7 +60,7 @@ public class OpenWireFormatFactory implements WireFormatFactory {
|
||||||
throw ise;
|
throw ise;
|
||||||
}
|
}
|
||||||
|
|
||||||
OpenWireFormat f = new OpenWireFormat();
|
OpenWireFormat f = new OpenWireFormat(version);
|
||||||
f.setPreferedWireFormatInfo(info);
|
f.setPreferedWireFormatInfo(info);
|
||||||
return f;
|
return f;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue