Hi Dejan, Am 02.07.2015 um 13:14 schrieb Dejan Bosanac: > Hi Marc, > > these commands are not deprecated, they are documented (partially) here > http://activemq.apache.org/unix-shell-script.html > > As far as I can see, export is still work in progress, it should work like > > bin/activemq export --file=archive.tgz
What is the usecase for this feature? Is there als a "import" Works not on my machine: $ ./activemq export --file=archive.tgz INFO: Loading '/home/mschoechlin/myroot/apache-activemq-5.11.1//bin/env' INFO: Using java '/home/mschoechlin/myroot/java8/bin/java' Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar Java Runtime: Oracle Corporation 1.8.0_45 /home/mschoechlin/myroot/jdk1.8.0_45/jre Heap sizes: current=62976k free=60999k max=932352k JVM args: -javaagent:/usr/share/java/jayatanaag.jar -Xms64M -Xmx1G -Djava.util.logging.config.file=logging.properties -Djava.security.auth.login.config=/home/mschoechlin/myroot/apache-activemq-5.11.1//conf/login.config -Dactivemq.classpath=/home/mschoechlin/myroot/apache-activemq-5.11.1//conf:/home/mschoechlin/myroot/apache-activemq-5.11.1//../lib/ -Dactivemq.home=/home/mschoechlin/myroot/apache-activemq-5.11.1/ -Dactivemq.base=/home/mschoechlin/myroot/apache-activemq-5.11.1/ -Dactivemq.conf=/home/mschoechlin/myroot/apache-activemq-5.11.1//conf -Dactivemq.data=/home/mschoechlin/myroot/apache-activemq-5.11.1//data Extensions classpath: [/home/mschoechlin/myroot/apache-activemq-5.11.1/lib,/home/mschoechlin/myroot/apache-activemq-5.11.1/lib/camel,/home/mschoechlin/myroot/apache-activemq-5.11.1/lib/optional,/home/mschoechlin/myroot/apache-activemq-5.11.1/lib/web,/home/mschoechlin/myroot/apache-activemq-5.11.1/lib/extra] ACTIVEMQ_HOME: /home/mschoechlin/myroot/apache-activemq-5.11.1 ACTIVEMQ_BASE: /home/mschoechlin/myroot/apache-activemq-5.11.1 ACTIVEMQ_CONF: /home/mschoechlin/myroot/apache-activemq-5.11.1/conf ACTIVEMQ_DATA: /home/mschoechlin/myroot/apache-activemq-5.11.1/data ERROR | Could not set property file on org.apache.activemq.console.command.store.StoreExporter@18bf3d14 java.lang.IllegalArgumentException: Cannot convert from class java.lang.String to class java.io.File with value archive.tgz at org.apache.activemq.util.IntrospectionSupport.convert(IntrospectionSupport.java:219)[activemq-client-5.11.1.jar:5.11.1] at org.apache.activemq.util.IntrospectionSupport.setProperty(IntrospectionSupport.java:178)[activemq-client-5.11.1.jar:5.11.1] at org.apache.activemq.console.command.store.amq.CommandLineSupport.setOptions(CommandLineSupport.java:81)[activemq-console-5.11.1.jar:5.11.1] at org.apache.activemq.console.command.StoreExportCommand.execute(StoreExportCommand.java:51)[activemq-console-5.11.1.jar:5.11.1] at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:150)[activemq-console-5.11.1.jar:5.11.1] at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)[activemq-console-5.11.1.jar:5.11.1] at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104)[activemq-console-5.11.1.jar:5.11.1] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_45] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_45] at java.lang.reflect.Method.invoke(Method.java:497)[:1.8.0_45] at org.apache.activemq.console.Main.runTaskClass(Main.java:262)[activemq.jar:5.11.1] at org.apache.activemq.console.Main.main(Main.java:115)[activemq.jar:5.11.1] ERROR: java.lang.Exception: Unexpected arguments: [--file=archive.tgz] java.lang.Exception: Unexpected arguments: [--file=archive.tgz] at org.apache.activemq.console.command.StoreExportCommand.execute(StoreExportCommand.java:53) at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:150) at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57) at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.apache.activemq.console.Main.runTaskClass(Main.java:262) at org.apache.activemq.console.Main.main(Main.java:115) > Create command is often used and it can be used like > > bin/activemq create test-brokeres Ah ok. What are the known usecases? The activemq init script provides also the functionality to create and run multiple instances on the same machine. This mechanism also provides a independent script environment configuration. https://cwiki.apache.org/confluence/display/ACTIVEMQ/Unix+Shell+Script#UnixShellScript-Runningmultipleinstances > > BTW. While you at it, you might wanna take a peak at this PR > https://github.com/apache/activemq/pull/109 and maybe close your original > PR for improvements. > The described problem happens because the file "env" has exec permissions and the activemq bin folder is part of the PATH variable? The "env" file does not need exec permissions, but this might be a typical problem. Probably we should move the "env" script to conf/env (i hate changing file locations, because creates problems for the users). We should also rename the script "diag" to "activemq-diag" or we should add this functionality to the init script. I think the second possibility might be better - because this also allows access to the script configuration. I also want to drop the "activemq-admin" script, because the functionality of this script is redundant to the "activemq" script. What do you think? Best regards, Marc Schoechlin -- GPG encryption available: 0x670DCBEC/pool.sks-keyservers.net (https://www.256bit.org/keys/mschoechlin.pub.asc)
signature.asc
Description: OpenPGP digital signature