public 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)
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 sendspublic XmlDataImporter(InputStream inputStream, ClientSession session, ClientSession managementSession)
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 sendspublic XmlDataImporter(InputStream inputStream, String host, String port, boolean transactional)
public XmlDataImporter(String inputFile, String host, String port, boolean transactional) throws FileNotFoundException
FileNotFoundException
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.