added delivery mode and priority headers

This commit is contained in:
Mark Fisher
2010-03-12 17:55:27 +00:00
parent 74780408fc
commit 7fa2c521a2

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2008 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -74,6 +74,14 @@ public class DefaultJmsHeaderMapper implements JmsHeaderMapper {
if (jmsType != null && (jmsType instanceof String)) {
jmsMessage.setJMSType((String) jmsType);
}
Object jmsDeliveryMode = headers.get(JmsHeaders.DELIVERY_MODE);
if (jmsDeliveryMode != null && (Integer.class.isAssignableFrom(jmsDeliveryMode.getClass()))) {
jmsMessage.setJMSDeliveryMode((Integer) jmsDeliveryMode);
}
Object jmsPriority = headers.get(JmsHeaders.PRIORITY);
if (jmsPriority != null && (Integer.class.isAssignableFrom(jmsPriority.getClass()))) {
jmsMessage.setJMSPriority((Integer) jmsPriority);
}
Set<String> attributeNames = headers.keySet();
for (String attributeName : attributeNames) {
if (!attributeName.startsWith(JmsHeaders.PREFIX)) {