Ejemplo n.º 1
0
 @Override
 public Object getObjectProperty(String name) {
   try {
     SimpleString key = new SimpleString(name);
     Object property = properties.getProperty(key);
     if (stringPropertyNames.contains(key)) {
       property = property.toString();
     }
     return property;
   } catch (ActiveMQPropertyConversionException ce) {
     throw new MessageFormatRuntimeException(ce.getMessage());
   } catch (RuntimeException e) {
     throw new JMSRuntimeException(e.getMessage());
   }
 }
Ejemplo n.º 2
0
 /**
  * Sets all properties we carry onto the message.
  *
  * @param message
  * @throws JMSException
  */
 private void setProperties(Message message) throws JMSException {
   for (SimpleString name : properties.getPropertyNames()) {
     message.setObjectProperty(name.toString(), properties.getProperty(name));
   }
 }