Java Code Examples for javax.jms.Message.getObjectProperty()

The following are Jave code examples for showing how to use getObjectProperty() of the javax.jms.Message class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: java-jms   File:   Source Code and License Vote up 8 votes
public JmsTextMapExtractAdapter(Message message) {
  try {
    Enumeration enumeration = message.getPropertyNames();
    if (enumeration != null) {
      while (enumeration.hasMoreElements()) {
        String key = (String) enumeration.nextElement();
        Object value = message.getObjectProperty(key);
        if (value instanceof String) {
          map.put(decodeDash(key), (String) value);
  } catch (JMSException e) {
    throw new RuntimeException(e);