将ActiveMQ嵌入JBoss 7 [英] Embed ActiveMQ into JBoss 7

查看:122
本文介绍了将ActiveMQ嵌入JBoss 7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们曾经使用 ActiveMQ 5.5 作为 JBoss 5 中的嵌入式服务(通过ActiveMQ资源适配器),因此JMS代理始终在本地的本地主机上运行与客户端应用程序本身相同的JVM。我们按照此说明进行了配置- http://activemq.apache.org /integrating-apache-activemq-with-jboss.html

We used to use ActiveMQ 5.5 as an embedded service in JBoss 5 (via ActiveMQ Resource Adapter), so that the JMS broker has been always running on the localhost on the the same JVM as the client application itself. We followed this instructions to configure it - http://activemq.apache.org/integrating-apache-activemq-with-jboss.html

现在我正在尝试对 JBoss 7 进行相同操作,但是找不到任何明确的指南。

Now I'm trying to do the same for JBoss 7, but cannot find any clear guide how to do it.

有人做过吗?您能为我指出将ActiveMQ集成到JBoss 7中的具体步骤的指南吗?

Have anybody done this yet? Can you point me to the guideline with the concrete steps for integrating ActiveMQ into JBoss 7?

谢谢。

推荐答案

可以在Wildfly的JVM内启动JMS代理,因此无需设置其他ActiveMQ服务器。

It is possible to launch the JMS broker inside the JVM of Wildfly so no need to set up a different ActiveMQ server.

我所做的只是更改了standalone.xml中的传输协议

All I did is just change the transport protocol inside standalone.xml

发件人:

tcp:// localhost :61616?jms.rmIdFromConnectionId = true

tcp://localhost:61616?jms.rmIdFromConnectionId=true

至:

vm:// localhost?broker.persistent = false

vm://localhost?broker.persistent=false

将持久性设置为false很重要,这样可以避免持久性配置。此外,还可以使用参数brokerConfig = xbean:activemq.xml
监视JMS队列来设置ActiveMQ配置文件

It is important to set the persistence to false as to avoid persistence configuration. In addtion, one can also set the ActiveMQ configuration file with the parameter brokerConfig=xbean:activemq.xml Monitoring the JMS queues

现在,ActiveMQ控制台已下来,您可能想知道如何检查队列。您可以通过连接到Wildfly JVM的JMX环境来做到这一点。

Now that the ActiveMQ console is down you probably wonder how can you check the queues. You can do it by connection to JMX environment of the Wildfly JVM.

您有两个选择:

-使用ActiveMQ Web控制台
-使用JConsole

-Use the ActiveMQ web console -Use JConsole


  1. 使用ActiveMQ Web控制台

要在Wildfly中启用ActiveMQ控制台,只需执行两个步骤:

To enable the ActiveMQ console in Wildfly, just two steps are needed:

在standalone.xml中设置JVM系统参数通知ActiveMQ控制台应用程序通过JMX连接。在extensions标记下添加以下JVM系统参数:

Set the JVM system parameters in standalone.xml to inform the ActiveMQ console application to connect through JMX. Add the following JVM system parameters under the extensions tag:

部署ActiveMQ控制台战争。这场战争包含jboss-client.jar(在/ lib下)。

Deploy the ActiveMQ console war. This war contains the jboss-client.jar (under /lib).

ActiveMQ应该在WildFly上下文中运行

The ActiveMQ should be running under this WildFly context

http:// localhost:8080 / activemq-web-console-5.11.1 /


  1. 使用JConsole

只需添加JConsole即可使用罐子jboss-cli-client.jar的类路径。我添加了bat文件以在Windows上运行jconsole。只需设置JAVA_HOME和JBOSS_JAR。

Just use JConsole by adding into its classpath the jar jboss-cli-client.jar. I have added bat file to run jconsole on Windows. Just set JAVA_HOME and JBOSS_JAR.

设置JAVA_HOME =

set JAVA_HOME=

设置JBOSS_JAR =

set JBOSS_JAR=

%JAVA_HOME%\bin\jconsole -J-Djava.class.path =%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\jconsole.jar;% JBOSS_JAR%\jboss-cli-client.jar

%JAVA_HOME%\bin\jconsole -J-Djava.class.path=%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\jconsole.jar;%JBOSS_JAR%\jboss-cli-client.jar"

在JConsole中的新连接上,选择远程进程。将值设置为:

On the new connection in JConsole, choose Remote process. Set value as :

服务:jmx:http-remoting-jmx:// localhost:9990

service:jmx:http-remoting-jmx://localhost:9990

用户名:your_admin_username

username : your_admin_username

密码:your_admin_password

password : your_admin_password

将显示一些标签。

转到MBeans标签,组织.apache.activeMQ子树将出现在左侧。

Go to MBeans tab, org.apache.activeMQ sub tree will appear on the left side.

有关更多参考,请参见:

For further reference, see :

< a href = http://javagoogleappspot.blogspot.be/2015/12/embed-your-activemq-broker-within-your.html rel = nofollow> http://javagoogleappspot.blogspot.be/2015/ 12 / embed-your-activemq-broker-within-your.html

这篇关于将ActiveMQ嵌入JBoss 7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆