locator.close();
server.stop();
System.out.println("Writing XML...");
FileOutputStream xmlOutputStream = new FileOutputStream(FILE_NAME);
XmlDataExporter xmlDataExporter = new XmlDataExporter(xmlOutputStream, getBindingsDir(), getJournalDir(), getPageDir(), getLargeMessagesDir());
xmlDataExporter.writeXMLData();
xmlOutputStream.close();
System.out.println("Done writing XML.");
clearData();
server.start();