Class XmlDataImporter
java.lang.Object
org.apache.activemq.artemis.cli.commands.ActionAbstract
org.apache.activemq.artemis.cli.commands.InputAbstract
org.apache.activemq.artemis.cli.commands.messages.ConnectionConfigurationAbtract
org.apache.activemq.artemis.cli.commands.tools.xml.XmlDataImporter
Read XML output from
org.apache.activemq.artemis.core.persistence.impl.journal.XmlDataExporter, create a core
session, and send the messages to a running instance of ActiveMQ Artemis. It uses the StAX
javax.xml.stream.XMLStreamReader for speed and simplicity.-
Field Summary
FieldsModifier and TypeFieldDescriptionintDeprecated, for removal: This API element is subject to removal in a future version.booleanintDeprecated, for removal: This API element is subject to removal in a future version.booleanbooleanFields inherited from class ConnectionConfigurationAbtract
acceptor, brokerURL, CONNECTION_INFORMATION, password, silent, userFields inherited from class ActionAbstract
DEFAULT_BROKER_ACCEPTOR, DEFAULT_BROKER_URL, verbose -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute(ActionContext context) voidprocess(InputStream inputStream, String host, int port) voidprocess(InputStream inputStream, ClientSession session) This is the normal constructor for programmatic access to theorg.apache.activemq.artemis.core.persistence.impl.journal.XmlDataImporterif the session passed in uses auto-commit for sends.voidprocess(InputStream inputStream, ClientSession session, ClientSession managementSession) This is the constructor to use if you wish to import all messages transactionally.voidvoidvalidate(InputStream inputStream) voidMethods inherited from class ConnectionConfigurationAbtract
getAcceptor, getBrokerURL, getPassword, getUser, inputBrokerURL, inputPassword, inputUser, recoverConnectionInformation, saveConnectionInfo, setAcceptor, setBrokerURL, setPassword, setUserMethods inherited from class InputAbstract
enableInput, input, input, inputBoolean, inputInteger, inputPassword, isSilentInput, setSilentInputMethods inherited from class ActionAbstract
done, getActionContext, getBrokerConfiguration, getBrokerEtc, getBrokerHome, getBrokerInstance, getBrokerURIInstance, getBrokerURLInstance, isVerbose, run, setHomeValues
-
Field Details
-
host
Deprecated, for removal: This API element is subject to removal in a future version. -
port
Deprecated, for removal: This API element is subject to removal in a future version. -
transactional
public boolean transactional -
commitInterval
public int commitInterval -
input
-
sort
public boolean sort -
legacyPrefixes
public boolean legacyPrefixes
-
-
Constructor Details
-
XmlDataImporter
public XmlDataImporter()
-
-
Method Details
-
execute
- Specified by:
executein interfaceAction- Overrides:
executein classConnectionConfigurationAbtract- Throws:
Exception
-
process
-
process
This is the normal constructor for programmatic access to theorg.apache.activemq.artemis.core.persistence.impl.journal.XmlDataImporterif the session passed in uses auto-commit for sends.If the session needs to be transactional then use the constructor which takes 2 sessions.
- Parameters:
inputStream- the stream from which to read the XML for importsession- used for sending messages, must use auto-commit for sends- Throws:
Exception
-
process
public void process(InputStream inputStream, ClientSession session, ClientSession managementSession) throws Exception This is the constructor to use if you wish to import all messages transactionally.Pass in a session which doesn't use auto-commit for sends, and one that does (for management operations necessary during import).
- Parameters:
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 sends- Throws:
Exception
-
process
- Throws:
Exception
-
validate
-
validate
- Throws:
Exception
-