diff options
author | Robert Greig <rgreig@apache.org> | 2007-01-16 17:29:24 +0000 |
---|---|---|
committer | Robert Greig <rgreig@apache.org> | 2007-01-16 17:29:24 +0000 |
commit | 469be448d433c6cb81c498aae56207adfafee866 (patch) | |
tree | 73e2f2f1c76fb26ed8f9e75b2262bd13d5ebdca3 /java | |
parent | 6bd699c9e392eb83f837c4863989c32e7afcf3fe (diff) | |
download | qpid-python-469be448d433c6cb81c498aae56207adfafee866.tar.gz |
QPID-245 reverted interop changes for the sake of JMS compliance.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@496785 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
3 files changed, 24 insertions, 21 deletions
diff --git a/java/broker/etc/log4j.xml b/java/broker/etc/log4j.xml index 9be428fbbd..0cf2579137 100644 --- a/java/broker/etc/log4j.xml +++ b/java/broker/etc/log4j.xml @@ -8,9 +8,9 @@ - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - + - - http://www.apache.org/licenses/LICENSE-2.0 - - + - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -39,8 +39,15 @@ <!--<category name="org.apache.qpid.server.store"> <priority value="debug"/> - </category>--> + </category> + <category name="org.apache.qpid.server.queue"> + <priority value="debug"/> + </category> + + <category name="org.apache.qpid.server.txn"> + <priority value="debug"/> + </category>--> <root> <priority value="info"/> <appender-ref ref="STDOUT"/> diff --git a/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer.java b/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer.java index 56b8f44e56..d531c9eef2 100644 --- a/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer.java +++ b/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer.java @@ -520,9 +520,10 @@ public class BasicMessageProducer extends Closeable implements org.apache.qpid.j checkTemporaryDestination(destination); origMessage.setJMSDestination(destination); - + AbstractJMSMessage message = convertToNativeMessage(origMessage); - message.getJmsContentHeaderProperties().setBytes(CustomJMSXProperty.JMSX_QPID_JMSDESTINATIONURL.getShortStringName(), destination.toByteEncoding()); + message.getJmsContentHeaderProperties().setBytes(CustomJMSXProperty.JMSX_QPID_JMSDESTINATIONURL. + getShortStringName(), destination.toByteEncoding()); // AMQP version change: Hardwire the version to 0-8 (major=8, minor=0) // TODO: Connect this to the session version obtained from ProtocolInitiation for this session. // Be aware of possible changes to parameter order as versions change. @@ -645,7 +646,7 @@ public class BasicMessageProducer extends Closeable implements org.apache.qpid.j int length = (remaining >= framePayloadMax) ? (int) framePayloadMax : (int) remaining; payload.limit(payload.position() + length); frames[i] = ContentBody.createAMQFrame(channelId,new ContentBody(payload.slice())); - + remaining -= length; } } diff --git a/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java b/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java index db3a5851ab..147601b9f9 100644 --- a/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java +++ b/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java @@ -278,8 +278,7 @@ public class FieldTable { AMQTypedValue value = getProperty(string); if ((value != null) && ((value.getType() == AMQType.WIDE_STRING) || - (value.getType() == AMQType.ASCII_STRING || - (value.getType() == AMQType.LONG_STRING)))) + (value.getType() == AMQType.ASCII_STRING))) { return (String) value.getValue(); } @@ -321,7 +320,7 @@ public class FieldTable public byte[] getBytes(AMQShortString string) { AMQTypedValue value = getProperty(string); - if (value != null && (value.getType() == AMQType.BINARY || value.getType() == AMQType.LONG_STRING)) + if (value != null && (value.getType() == AMQType.BINARY)) { return (byte[]) value.getValue(); } @@ -365,7 +364,7 @@ public class FieldTable public Object setByte(String string, byte b) { return setByte(new AMQShortString(string), b); - } + } public Object setByte(AMQShortString string, byte b) { @@ -447,16 +446,14 @@ public class FieldTable } else { - return setProperty(string, AMQType.LONG_STRING.asTypedValue(value)); + return setProperty(string, AMQType.ASCII_STRING.asTypedValue(value)); } } public Object setString(AMQShortString string, String value) { - // temporary for interop until field table types are standardised - return setAsciiString(string, value); - /*checkPropertyName(string); + checkPropertyName(string); if (value == null) { return setProperty(string, AMQType.VOID.asTypedValue(null)); @@ -472,7 +469,7 @@ public class FieldTable // { // return setProperty(string, AMQType.ASCII_STRING.asTypedValue(value)); // } - } */ + } } @@ -497,9 +494,7 @@ public class FieldTable public Object setBytes(AMQShortString string, byte[] bytes) { checkPropertyName(string); - // HACK for interop - //return setProperty(string, AMQType.BINARY.asTypedValue(bytes)); - return setProperty(string, AMQType.LONG_STRING.asTypedValue(bytes)); + return setProperty(string, AMQType.BINARY.asTypedValue(bytes)); } public Object setBytes(String string, byte[] bytes, int start, int length) @@ -653,7 +648,7 @@ public class FieldTable } } - + // ************************* Byte Buffer Processing public void writeToBuffer(ByteBuffer buffer) @@ -828,7 +823,7 @@ public class FieldTable public void clear() { initMapIfNecessary(); - _encodedForm = null; + _encodedForm = null; _properties.clear(); _encodedSize = 0; } @@ -919,7 +914,7 @@ public class FieldTable _properties.put(key,value); - + } while (buffer.remaining() > expectedRemaining); |