public final class XmlDataImporter extends Object
org.hornetq.core.persistence.impl.journal.XmlDataExporter, create a core session, and
send the messages to a running instance of HornetQ. It uses the StAX javax.xml.stream.XMLStreamReader
for speed and simplicity.| Constructor and Description |
|---|
XmlDataImporter(InputStream inputStream,
ClientSession session)
This is the normal constructor for programmatic access to the
org.hornetq.core.persistence.impl.journal.XmlDataImporter if the session passed
in uses auto-commit for sends. |
XmlDataImporter(InputStream inputStream,
ClientSession session,
ClientSession managementSession)
This is the constructor to use if you wish to import all messages transactionally.
|
XmlDataImporter(InputStream inputStream,
String host,
String port,
boolean transactional) |
XmlDataImporter(String inputFile,
String host,
String port,
boolean transactional) |
public XmlDataImporter(InputStream inputStream, ClientSession session) throws Exception
org.hornetq.core.persistence.impl.journal.XmlDataImporter if the session passed
in uses auto-commit for sends.
If the session needs to be transactional then use the constructor which takes 2 sessions.
inputStream - the stream from which to read the XML for importsession - used for sending messages, must use auto-commit for sendsExceptionpublic XmlDataImporter(InputStream inputStream, ClientSession session, ClientSession managementSession) throws Exception
Pass in a session which doesn't use auto-commit for sends, and one that does (for management operations necessary during import).
inputStream - the stream from which to read the XML for importsession - used for sending messages, doesn't need to auto-commit sendsmanagementSession - used for management queries, must use auto-commit for sendsExceptionpublic XmlDataImporter(InputStream inputStream, String host, String port, boolean transactional) throws Exception
ExceptionCopyright © 2013 JBoss, a division of Red Hat. All rights reserved.