return ex.toString();
}
} else if (message instanceof BytesMessage) {
return jmsBytesBodyAsString(message);
} else if (message instanceof MapMessage) {
MapMessage msg = (MapMessage) message;
Map<String, String> mapProperties = new HashMap<String, String>();
try {
for (Enumeration<?> enumeration = msg.getMapNames(); enumeration.hasMoreElements();) {
String name = (enumeration.nextElement()).toString();
mapProperties.put(name, (msg.getObject(name)).toString());
}
return mapProperties.toString();
} catch (JMSException ex) {
return (ex.toString());
}
} else if (message instanceof ObjectMessage) {
ObjectMessage msg = (ObjectMessage) message;
try {
Object object = msg.getObject();
return String.valueOf(object);
} catch (Exception ex) {
return ex.toString();
}