@Override public Object execute(ActionContext context) throws Exception { super.execute(context); try { config = getParameterConfiguration(); process(context.out); } catch (Exception e) { treatError(e, "data", "exp"); } return null; }
public void process(OutputStream out) throws Exception { initializeJournal(config); writeOutput(out); cleanup(); }
private void printAllMessagesAsXML() throws Exception { xmlWriter.writeStartElement(XmlDataConstants.MESSAGES_PARENT); // Order here is important. We must process the messages from the journal before we process those from the page // files in order to get the messages in the right order. for (Map.Entry<Long, Message> messageMapEntry : messages.entrySet()) { printSingleMessageAsXML(messageMapEntry.getValue().toCore(), extractQueueNames(messageRefs.get(messageMapEntry.getKey()))); } printPagedMessagesAsXML(); xmlWriter.writeEndElement(); // end "messages" }
final String largeMessages = resolvePath(context, pathManager, LARGE_MESSAGES_DIRECTORY_PATH); final XmlDataExporter exporter = new XmlDataExporter(); try { fos = new FileOutputStream(dump); exporter.process(fos, bindings, journal, paging, largeMessages); context.getResult().set(dump.getAbsolutePath()); } catch (Exception e) {
private void writeXMLData() throws Exception { long start = System.currentTimeMillis(); getBindings(); processMessageJournal(); printDataAsXML(); ActiveMQServerLogger.LOGGER.debug("\n\nProcessing took: " + (System.currentTimeMillis() - start) + "ms"); ActiveMQServerLogger.LOGGER.debug("Output " + messagesPrinted + " messages and " + bindingsPrinted + " bindings."); }
final String largeMessages = resolvePath(context, pathManager, LARGE_MESSAGES_DIRECTORY_PATH); final XmlDataExporter exporter = new XmlDataExporter(); try { fos = new FileOutputStream(dump); exporter.process(fos, bindings, journal, paging, largeMessages); context.getResult().set(dump.getAbsolutePath()); } catch (Exception e) {
private void writeXMLData() throws Exception { long start = System.currentTimeMillis(); getBindings(); processMessageJournal(); printDataAsXML(); ActiveMQServerLogger.LOGGER.debug("\n\nProcessing took: " + (System.currentTimeMillis() - start) + "ms"); ActiveMQServerLogger.LOGGER.debug("Output " + messagesPrinted + " messages and " + bindingsPrinted + " bindings."); }
XmlDataExporter xmlDataExporter = new XmlDataExporter(); xmlDataExporter.process(xmlOutputStream, server.getConfiguration().getBindingsDirectory(), server.getConfiguration().getJournalDirectory(), server.getConfiguration().getPagingDirectory(), server.getConfiguration().getLargeMessagesDirectory()); System.out.print(new String(xmlOutputStream.toByteArray()));
@Override public Object execute(ActionContext context) throws Exception { super.execute(context); try { config = getParameterConfiguration(); process(context.out); } catch (Exception e) { treatError(e, "data", "exp"); } return null; }
public void process(OutputStream out) throws Exception { initializeJournal(config); writeOutput(out); cleanup(); }
private void printAllMessagesAsXML() throws Exception { xmlWriter.writeStartElement(XmlDataConstants.MESSAGES_PARENT); // Order here is important. We must process the messages from the journal before we process those from the page // files in order to get the messages in the right order. for (Map.Entry<Long, Message> messageMapEntry : messages.entrySet()) { printSingleMessageAsXML(messageMapEntry.getValue().toCore(), extractQueueNames(messageRefs.get(messageMapEntry.getKey()))); } printPagedMessagesAsXML(); xmlWriter.writeEndElement(); // end "messages" }
XmlDataExporter xmlDataExporter = new XmlDataExporter(); xmlDataExporter.process(xmlOutputStream, server.getConfiguration().getBindingsDirectory(), server.getConfiguration().getJournalDirectory(), server.getConfiguration().getPagingDirectory(), server.getConfiguration().getLargeMessagesDirectory()); System.out.print(new String(xmlOutputStream.toByteArray()));
/** * Use setConfiguration and process(out) instead. * * @param out * @param bindingsDir * @param journalDir * @param pagingDir * @param largeMessagesDir * @throws Exception */ @Deprecated public void process(OutputStream out, String bindingsDir, String journalDir, String pagingDir, String largeMessagesDir) throws Exception { config = new ConfigurationImpl().setBindingsDirectory(bindingsDir).setJournalDirectory(journalDir).setPagingDirectory(pagingDir).setLargeMessagesDirectory(largeMessagesDir).setJournalType(JournalType.NIO); initializeJournal(config); writeOutput(out); cleanup(); }
XmlDataExporter xmlDataExporter = new XmlDataExporter(); xmlDataExporter.process(xmlOutputStream, server.getConfiguration().getBindingsDirectory(), server.getConfiguration().getJournalDirectory(), server.getConfiguration().getPagingDirectory(), server.getConfiguration().getLargeMessagesDirectory()); System.out.print(new String(xmlOutputStream.toByteArray()));
/** * Use setConfiguration and process(out) instead. * * @param out * @param bindingsDir * @param journalDir * @param pagingDir * @param largeMessagesDir * @throws Exception */ @Deprecated public void process(OutputStream out, String bindingsDir, String journalDir, String pagingDir, String largeMessagesDir) throws Exception { config = new ConfigurationImpl().setBindingsDirectory(bindingsDir).setJournalDirectory(journalDir).setPagingDirectory(pagingDir).setLargeMessagesDirectory(largeMessagesDir).setJournalType(JournalType.NIO); initializeJournal(config); writeOutput(out); cleanup(); }
XmlDataExporter xmlDataExporter = new XmlDataExporter(); xmlDataExporter.process(xmlOutputStream, server.getConfiguration().getBindingsDirectory(), server.getConfiguration().getJournalDirectory(), server.getConfiguration().getPagingDirectory(), server.getConfiguration().getLargeMessagesDirectory()); System.out.print(new String(xmlOutputStream.toByteArray()));
XmlDataExporter xmlDataExporter = new XmlDataExporter(); xmlDataExporter.process(xmlOutputStream, server.getConfiguration().getBindingsDirectory(), server.getConfiguration().getJournalDirectory(), server.getConfiguration().getPagingDirectory(), server.getConfiguration().getLargeMessagesDirectory()); System.out.print(new String(xmlOutputStream.toByteArray()));
XmlDataExporter xmlDataExporter = new XmlDataExporter(); xmlDataExporter.process(xmlOutputStream, server.getConfiguration().getBindingsDirectory(), server.getConfiguration().getJournalDirectory(), server.getConfiguration().getPagingDirectory(), server.getConfiguration().getLargeMessagesDirectory()); System.out.print(new String(xmlOutputStream.toByteArray()));
XmlDataExporter xmlDataExporter = new XmlDataExporter(); xmlDataExporter.process(xmlOutputStream, server.getConfiguration().getBindingsDirectory(), server.getConfiguration().getJournalDirectory(), server.getConfiguration().getPagingDirectory(), server.getConfiguration().getLargeMessagesDirectory()); System.out.print(new String(xmlOutputStream.toByteArray()));
XmlDataExporter xmlDataExporter = new XmlDataExporter(); xmlDataExporter.process(xmlOutputStream, server.getConfiguration().getBindingsDirectory(), server.getConfiguration().getJournalDirectory(), server.getConfiguration().getPagingDirectory(), server.getConfiguration().getLargeMessagesDirectory()); System.out.print(new String(xmlOutputStream.toByteArray()));