You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rg...@apache.org on 2007/01/16 18:29:25 UTC
svn commit: r496785 - in /incubator/qpid/trunk/qpid/java:
broker/etc/log4j.xml
client/src/main/java/org/apache/qpid/client/BasicMessageProducer.java
common/src/main/java/org/apache/qpid/framing/FieldTable.java
Author: rgreig
Date: Tue Jan 16 09:29:24 2007
New Revision: 496785
URL: http://svn.apache.org/viewvc?view=rev&rev=496785
Log:
QPID-245 reverted interop changes for the sake of JMS compliance.
Modified:
incubator/qpid/trunk/qpid/java/broker/etc/log4j.xml
incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer.java
incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java
Modified: incubator/qpid/trunk/qpid/java/broker/etc/log4j.xml
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/etc/log4j.xml?view=diff&rev=496785&r1=496784&r2=496785
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/etc/log4j.xml (original)
+++ incubator/qpid/trunk/qpid/java/broker/etc/log4j.xml Tue Jan 16 09:29:24 2007
@@ -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"/>
Modified: incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer.java?view=diff&rev=496785&r1=496784&r2=496785
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer.java (original)
+++ incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer.java Tue Jan 16 09:29:24 2007
@@ -520,9 +520,10 @@
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 @@
int length = (remaining >= framePayloadMax) ? (int) framePayloadMax : (int) remaining;
payload.limit(payload.position() + length);
frames[i] = ContentBody.createAMQFrame(channelId,new ContentBody(payload.slice()));
-
+
remaining -= length;
}
}
Modified: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java?view=diff&rev=496785&r1=496784&r2=496785
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java (original)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java Tue Jan 16 09:29:24 2007
@@ -278,8 +278,7 @@
{
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 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 Object setByte(String string, byte b)
{
return setByte(new AMQShortString(string), b);
- }
+ }
public Object setByte(AMQShortString string, byte b)
{
@@ -447,16 +446,14 @@
}
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 @@
// {
// return setProperty(string, AMQType.ASCII_STRING.asTypedValue(value));
// }
- } */
+ }
}
@@ -497,9 +494,7 @@
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 @@
}
}
-
+
// ************************* Byte Buffer Processing
public void writeToBuffer(ByteBuffer buffer)
@@ -828,7 +823,7 @@
public void clear()
{
initMapIfNecessary();
- _encodedForm = null;
+ _encodedForm = null;
_properties.clear();
_encodedSize = 0;
}
@@ -919,7 +914,7 @@
_properties.put(key,value);
-
+
}
while (buffer.remaining() > expectedRemaining);