Exemple #1
0
  public static void constructMessageProperties(
      Message jmsMsg, CustomMessagePropertyList customMessagePropertyList) throws JMSException {
    List<CustomMessageProperty> customMessageProperties =
        customMessagePropertyList.getCustomMessageProperty();

    for (CustomMessageProperty msgProp : customMessageProperties) {
      jmsMsg.setStringProperty(msgProp.getName(), msgProp.getValue());
    }
  }
Exemple #2
0
 public static void constructConnectorMessageCustomProperties(
     Message jmsMsg, CustomMessagePropertyList customMessagePropertyList) throws JMSException {
   List<CustomMessageProperty> customMessageProperties =
       customMessagePropertyList.getCustomMessageProperty();
   Enumeration enumProps = jmsMsg.getPropertyNames();
   while (enumProps.hasMoreElements()) {
     String key = (String) enumProps.nextElement();
     CustomMessageProperty customMessageProperty = new CustomMessageProperty();
     customMessageProperty.setName(key);
     customMessageProperty.setValue(jmsMsg.getStringProperty(key));
     customMessageProperties.add(customMessageProperty);
   }
 }
Exemple #3
0
  public static void constructConnectorMessageProperties(
      Message jmsMsg, CustomMessagePropertyList customMessagePropertyList) throws JMSException {
    List<CustomMessageProperty> customMessageProperties =
        customMessagePropertyList.getCustomMessageProperty();
    int index = 0;

    while (index < JMSConstants.ARR_CUSTOM_PROPS.length) {
      if (jmsMsg.getStringProperty(JMSConstants.ARR_CUSTOM_PROPS[index]) != null
          && jmsMsg.getStringProperty(JMSConstants.ARR_CUSTOM_PROPS[index]).isEmpty()) {
        CustomMessageProperty customMessageProperty = new CustomMessageProperty();
        customMessageProperty.setName(JMSConstants.ARR_CUSTOM_PROPS[index]);
        customMessageProperty.setValue(
            jmsMsg.getStringProperty(JMSConstants.ARR_CUSTOM_PROPS[index]));
        customMessageProperties.add(customMessageProperty);
        index++;
      }
    }
  }