if (log.isTraceEnabled()) { log.trace("importing xml"); }
   public void importXML(Element element) throws ConfigurationException   {        super.importXML(element);            this.anon = MetadataUtils.getOptionalChildBooleanContent(element, "anonymous-producer", false);      this.msgSize = Integer.parseInt(MetadataUtils.getUniqueChildContent(element, "message-size"));      String messageType = MetadataUtils.getUniqueChildContent(element, "message-type");            if ("javax.jms.Message".equals(messageType))      {         mf = new MessageMessageFactory();      }      else if ("javax.jms.BytesMessage".equals(messageType))      {         mf = new BytesMessageMessageFactory();      }      else if ("javax.jms.MapMessage".equals(messageType))      {         mf = new MapMessageMessageFactory();      }      else if ("javax.jms.ObjectMessage".equals(messageType))      {         mf = new ObjectMessageMessageFactory();      }      else if ("javax.jms.StreamMessage".equals(messageType))      {         mf = new StreamMessageMessageFactory();      }      else if ("javax.jms.TextMessage".equals(messageType))      {         mf = new TextMessageMessageFactory();      }      else if ("foreign".equals(messageType))      {         mf = new ForeignMessageMessageFactory();      }      else      {         throw new ConfigurationException("Invalid message type:" + messageType);      }            this.deliveryMode = Integer.parseInt(MetadataUtils.getUniqueChildContent(element, "delivery-mode"));            if (deliveryMode != DeliveryMode.NON_PERSISTENT && deliveryMode != DeliveryMode.PERSISTENT)      {         throw new ConfigurationException("Invalid delivery mode:" + deliveryMode);      }   }