Starting The Server单独ActiveMQ要运行单独的ActiveMQ服务,打开一个命令行窗口,进入到ActiveMQ的bin
目录下,执行./run.sh (或者在Windows下 run.bat)。你将看到如下的输出:
bin$ ./run.sh
15:05:54,108 INFO @main [ActiveMQBootstrapServer] Starting ActiveMQ server
...
15:06:02,566 INFO @main [ActiveMQServerImpl] ActiveMQ Server version
2.0.0.CR3 (yellowjacket, 111) started
这表明ActiveMQ已经启动并运行了。默认情况下,不论是启动还是停止脚本都使用config/stand-alone/non-clustered
下的配置文件。要使用不同的配置目录,可运行./run.sh ../config/stand-alone/clustered
或者其它选定的目录。同样方法适用于停止脚本。ActiveMQ在JBoss AS 5.x中运行要在JBoss AS 5运行ActiveMQ,你需要创建安装有ActiveMQ的AS 5的配置。然后用这个配置启动AS 5。
例如,要运行一个带有非集群的ActiveMQ服务的AS 5,进入$JBOSS_HOME/bin目录,然后键入:
bin$ ./run.sh -c default-with-activemq
15:18:35,460 INFO [ServerImpl] Starting JBoss (Microcontainer)...
15:18:35,462 INFO [ServerImpl] Release ID: JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=
JBoss_5_1_0_GA date=200905221053)
...
15:19:30,305 INFO [ActiveMQServerImpl] ActiveMQ Server version
2.0.0.CR3 (yellowjacket, 111) started
...
15:19:43,601 INFO [ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=
JBoss_5_1_0_GA date=200905221053)]Started in 1m:14s:556ms
ActiveMQ在JBoss AS 4中运行首先按照与JBoss AS 5相同的步骤创建安装有ActiveMQ的AS 4配置
然后以相同的方式启动AS。ActiveMQ在JBoss AS 6.0中运行从JBoss AS 6.0 M3开始,ActiveMQ已经是默认的(内建)JMS提供者。所以无需安装即可运行。