resolve https://issues.apache.org/activemq/browse/AMQ-2840 - Eugene's carefull reading of the sepc results in the JMSX props being returned in the enumeration

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@987193 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2010-08-19 15:30:49 +00:00
parent c62b951c52
commit cf3db575a5
2 changed files with 7 additions and 2 deletions

View File

@ -282,7 +282,12 @@ public class ActiveMQMessage extends Message implements org.apache.activemq.Mess
public Enumeration getPropertyNames() throws JMSException {
try {
Vector<String> result = new Vector<String>(this.getProperties().keySet());
// omit stand jms props are per spec
// omit standard jms props as per spec
for (String propName : JMS_PROPERTY_SETERS.keySet()) {
if (propName.startsWith("JMSX")) {
result.add(propName);
}
}
return result.elements();
} catch (IOException e) {
throw JMSExceptionSupport.create(e);

View File

@ -354,7 +354,7 @@ public class ActiveMQMessageTest extends TestCase {
ActiveMQMessage msg = new ActiveMQMessage();
String name1 = "floatProperty";
msg.setFloatProperty(name1, 1.3f);
String name2 = "intProperty";
String name2 = "JMSXDeliveryCount";
msg.setIntProperty(name2, 1);
boolean found1 = false;
boolean found2 = false;