private void printJmsDestinationsAsXML() throws XMLStreamException
{
xmlWriter.writeStartElement(XmlDataConstants.JMS_DESTINATIONS);
for (Pair<PersistedType, String> jmsDestinationsKey : jmsDestinations.keySet())
{
PersistedDestination jmsDestination = jmsDestinations.get(jmsDestinationsKey);
xmlWriter.writeStartElement(XmlDataConstants.JMS_DESTINATION);
xmlWriter.writeStartElement(XmlDataConstants.JMS_DESTINATION_NAME);
xmlWriter.writeCharacters(jmsDestination.getName());
xmlWriter.writeEndElement();
String selector = jmsDestination.getSelector();
if (selector != null && selector.length() != 0)
{
xmlWriter.writeStartElement(XmlDataConstants.JMS_DESTINATION_SELECTOR);
xmlWriter.writeCharacters(selector);
xmlWriter.writeEndElement();
}
xmlWriter.writeStartElement(XmlDataConstants.JMS_DESTINATION_TYPE);
xmlWriter.writeCharacters(jmsDestination.getType().toString());
xmlWriter.writeEndElement();
xmlWriter.writeStartElement(XmlDataConstants.JMS_JNDI_ENTRIES);
PersistedJNDI jndi = jmsJNDI.get(new Pair<PersistedType, String>(jmsDestination.getType(), jmsDestination.getName()));
for (String jndiEntry : jndi.getJndi())
{
xmlWriter.writeStartElement(XmlDataConstants.JMS_JNDI_ENTRY);
xmlWriter.writeCharacters(jndiEntry);
xmlWriter.writeEndElement();