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,
boolean applicationServerCompatibility)
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,
ClientSession session,
ClientSession managementSession,
boolean applicationServerCompatibility)
This is the constructor to use if you wish to import all messages transactionally.
|
XmlDataImporter(InputStream inputStream,
String host,
String port,
boolean transactional,
boolean applicationServerCompatibility) |
XmlDataImporter(String inputFile,
String host,
String port,
boolean transactional,
boolean applicationServerCompatibility) |
Modifier and Type | Method and Description |
---|---|
void |
processXml() |
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 sendsException
public XmlDataImporter(InputStream inputStream, ClientSession session, boolean applicationServerCompatibility) 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 sendsapplicationServerCompatibility
- whether or not the JNDI entries for JMS connection factories and
destinations should be compatible with JBoss AS 7.x, EAP 6.x,
Wildfly, etc. which requires different bindings for local and remote
clientsException
public XmlDataImporter(InputStream inputStream, ClientSession session, ClientSession managementSession, boolean applicationServerCompatibility) throws Exception
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 sendsapplicationServerCompatibility
- whether or not the JNDI entries for JMS connection factories and
destinations should be compatible with JBoss AS 7.x, EAP 6.x,
Wildfly, etc. which requires different bindings for local and remote
clientsException
public XmlDataImporter(InputStream inputStream, ClientSession session, ClientSession managementSession) throws Exception
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 sendsException
public XmlDataImporter(InputStream inputStream, String host, String port, boolean transactional, boolean applicationServerCompatibility) throws Exception
Exception
Copyright © 2017 JBoss, a division of Red Hat. All rights reserved.