12/15/2009
This document explains how ActiveMQ 5.3.0 can be configured in JBoss Application Server 6.0.0 as an embedded broker.
Software Requirements
Here is the list of softwares used in this document.
Apache ActiveMQ 5.3.0
JBoss AS 6.0.0
JDK 1.6+
This article used Windows XP Professional as the operating system.
Intallation
Step 1: Install JDK 1.6 and verify it runs correctly. After installing Java set JAVA_HOME and update PATH environment variables.
Step 2: Install JBoss Application Server 6.0.0 and make sure Server starts correctly. After downloading jboss-6.0.0M1.zip, extract it to a folder. After extrating start the server using run command.
Goto JBoss extracted folder and execute below commands.
First few line shows the configuration used by JBoss Server. Check the last line to see whether the server has started propertly.
To ensure the server has started, visit http://localhost:8080/web-console/ in your favorite browser and make sure you can see JBoss Web Console.
Now stop JBoss Server using shutdown script(inside <jboss_home>\bin folder) or use Ctrl-C.
Integrating Apache ActiveMQ with the JBoss Application Server.
Download ApacheMQ using the link above. After downloading, extract it to a folder and verify that ActiveMQ RAR file is included. This file can be located at [ACTIVEMQ_INSTALL_DIR]\lib\optional folder.
In our case ActiveMQ RAR file name will be activemq-rar-5.3.0.rar.
Now go to JBoss intallation folder and create a folder for ActiveMQ inside deploy directory for the required context. Here we are using default JBoss context.
Extract the contents of ActiveMQ RAR file(activemq-rar-5.3.0.rar) to this folder.
Now we can start configuring ActiveMQ.
Edit ra.xml file inside [JBOSS_HOME]\server\default\deploy\activemq-rar-5.3.0.rar\META-INF folder.
A Pre-Configured ra.xml can be downladed.
The broker-config.xml file inside [JBOSS_HOME]\server\default\deploy\activemq-rar-5.3.0.rar is the ActiveMQ configuration file. This is the file used to configure ActiveMQ. The default contents of this file are usable, but should be customized to suit your environment.
A Pre-Configured broker-config.xml can be downloaded.
Now start JBoss server to ensure it start without any errors using the same commands we used before. If JBoss Server starts without any errors you can move to next step. Stop the server and continue to next step.
Next step is to configure JBoss to initialize and start ActiveMQ whenever JBoss starts up. This is accomplished by putting an XML (activemq-jms-ds.xml) inside [JBOSS_HOME]\server\default\deploy.
A Pre-Configured activemq-jms-ds.xml can be downloaded.
Now start JBoss server to ensure it start without any errors using the same commands we used before. Examine the startup messages for ActiveMQ messages.
Now our environment is ready to go.
Software Requirements
Here is the list of softwares used in this document.
Apache ActiveMQ 5.3.0
JBoss AS 6.0.0
JDK 1.6+
This article used Windows XP Professional as the operating system.
Intallation
Step 1: Install JDK 1.6 and verify it runs correctly. After installing Java set JAVA_HOME and update PATH environment variables.
C:\>java -version java version "1.6.0_17" Java(TM) SE Runtime Environment (build 1.6.0_17-b04) Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing)
Goto JBoss extracted folder and execute below commands.
C:\>cd JBoss\jboss-6.0.0.M1\bin C:\JBoss\jboss-6.0.0.M1\bin>run
C:\JBoss\jboss-6.0.0.M1\bin>run Calling C:\JBoss\jboss-6.0.0.M1\bin\run.conf.bat =============================================================================== JBoss Bootstrap Environment JBOSS_HOME: C:\JBoss\jboss-6.0.0.M1 JAVA: C:\Program Files\Java\jdk1.6.0_14\bin\java JAVA_OPTS: -Dprogram.name=run.bat -Xms128M -Xmx512M -XX:MaxPermSize=256M -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dorg.jboss.resolver.warning=true -server CLASSPATH: C:\Program Files\Java\jdk1.6.0_14\lib\tools.jar;C:\JBoss\jboss-6.0.0.M1\bin\run.jar =============================================================================== 17:01:33,828 INFO [AbstractJBossASServerBase] Server Configuration: JBOSS_HOME URL: file:/C:/JBoss/jboss-6.0.0.M1/ Bootstrap: $JBOSS_HOME\server/default/conf/bootstrap.xml Common Base: $JBOSS_HOME\common/ Common Library: $JBOSS_HOME\common/lib/ Server Name: default Server Base: $JBOSS_HOME\server/ Server Library: $JBOSS_HOME\server/default/lib/ Server Config: $JBOSS_HOME\server/default/conf/ Server Home: $JBOSS_HOME\server/default/ Server Data: $JBOSS_HOME\server/default/data/ Server Log: $JBOSS_HOME\server/default/log/ Server Temp: $JBOSS_HOME\server/default/tmp/ 17:01:33,875 INFO [AbstractServer] Starting: JBossAS [6.0.0.M1 (build: SVNTag=JBoss_6_0_0_M1 date=200912040958)] 17:01:35,515 INFO [AbstractMCServerBase] Starting Microcontainer, Main bootstrapURL=file:/C:/JBoss/jboss-.0.0.M1/server/default/conf/bootstrap.xml 17:01:37,250 INFO [VFSCacheFactory] Initializing VFSCache [org.jboss.virtual.plugins.cache.CombinedVFSCache] 17:01:37,250 INFO [VFSCacheFactory] Using VFSCache [CombinedVFSCache[real-cache: null]] 17:01:38,140 INFO [CopyMechanism] VFS temp dir: C:\JBoss\jboss-6.0.0.M1\server\default\tmp 17:01:38,140 INFO [ZipEntryContext] VFS force nested jars copy-mode is enabled. 17:01:41,921 INFO [ServerInfo] Java version: 1.6.0_14,Sun Microsystems Inc. 17:01:41,921 INFO [ServerInfo] Java Runtime: Java(TM) SE Runtime Environment (build 1.6.0_14-b08) 17:01:41,921 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 14.0-b16,Sun Microsystems Inc. 17:01:41,921 INFO [ServerInfo] OS-System: Windows XP 5.1,x86 ............... ............... 17:03:22,437 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009 17:03:22,468 INFO [AbstractServer] JBossAS [6.0.0.M1 (build: SVNTag=JBoss_6_0_0_M1 date=200912040958)] Started in 1m:48s:593ms
Now stop JBoss Server using shutdown script(inside <jboss_home>\bin folder) or use Ctrl-C.
Integrating Apache ActiveMQ with the JBoss Application Server.
Download ApacheMQ using the link above. After downloading, extract it to a folder and verify that ActiveMQ RAR file is included. This file can be located at [ACTIVEMQ_INSTALL_DIR]\lib\optional folder.
C:\Softwares\apache-activemq-5.3.0\lib\optional>dir 102,631 activeio-core-3.1.2.jar 81,267 activemq-jmdns_1.0-5.3.0.jar 116,081 activemq-optional-5.3.0.jar 38,517 activemq-pool-5.3.0.jar 6,905,784 activemq-rar-5.3.0.rar 175,130 activemq-xmpp-5.3.0.jar 118,726 commons-beanutils-1.6.1.jar 30,085 commons-codec-1.2.jar 575,389 commons-collections-3.2.1.jar 121,757 commons-dbcp-1.2.2.jar 305,001 commons-httpclient-3.1.jar 197,067 commons-net-2.0.jar 87,077 commons-pool-1.4.jar 37,477 geronimo-j2ee-connector_1.5_spec-2.0.0.jar 67,758 jettison-1.1.jar 367,444 log4j-1.2.14.jar 325,942 spring-aop-2.5.6.jar 488,282 spring-beans-2.5.6.jar 476,940 spring-context-2.5.6.jar 285,491 spring-core-2.5.6.jar 195,350 spring-jms-2.5.6.jar 15,980 spring-oxm-tiger-1.5.8.jar 231,173 spring-tx-2.5.6.jar 474,413 wstx-asl-3.0.1.jar 130,519 xbean-spring-3.6.jar 24,544 xmlpull-1.1.3.4d_b4_min.jar 431,406 xstream-1.3.1.jar
Now go to JBoss intallation folder and create a folder for ActiveMQ inside deploy directory for the required context. Here we are using default JBoss context.
C:\JBoss\jboss-6.0.0.M1\server\default\deploy>mkdir activemq-rar-5.3.0.rar
102,631 activeio-core-3.1.2.jar 2,923,854 activemq-core-5.3.0.jar 147,717 activemq-protobuf-1.0.jar 85,474 activemq-ra-5.3.0.jar 4,467 aopalliance-1.0.jar 1,868 broker-config.xml 52,915 commons-logging-1.1.jar 44,598 commons-logging-api-1.1.jar 197,067 commons-net-2.0.jar 2,141,382 derby-10.1.3.1.jar 16,030 geronimo-j2ee-management_1.0_spec-1.0.jar 20,220 geronimo-j2ee-management_1.1_spec-1.0.1.jar 152,481 kahadb-5.3.0.jar 367,444 log4j-1.2.14.jar 1,625 log4j.properties <DIR> META-INF 488,282 spring-beans-2.5.6.jar 476,940 spring-context-2.5.6.jar 285,491 spring-core-2.5.6.jar 130,519 xbean-spring-3.6.jar
Edit ra.xml file inside [JBOSS_HOME]\server\default\deploy\activemq-rar-5.3.0.rar\META-INF folder.
<config-property> <description> The URL to the ActiveMQ server that you want this connection to connect to. If using an embedded broker, this value should be 'vm://localhost'. </description> <config-property-name>ServerUrl</config-property-name> <config-property-type>java.lang.String</config-property-type> <config-property-value>vm://localhost</config-property-value> </config-property> <config-property> <description> Sets the XML configuration file used to configure the embedded ActiveMQ broker via Spring if using embedded mode. BrokerXmlConfig is the filename which is assumed to be on the classpath unless a URL is specified. So a value of foo/bar.xml would be assumed to be on the classpath whereas file:dir/file.xml would use the file system. Any valid URL string is supported. </description> <config-property-name>BrokerXmlConfig</config-property-name> <config-property-type>java.lang.String</config-property-type> <config-property-value>xbean:broker-config.xml</config-property-value> </config-property>
The broker-config.xml file inside [JBOSS_HOME]\server\default\deploy\activemq-rar-5.3.0.rar is the ActiveMQ configuration file. This is the file used to configure ActiveMQ. The default contents of this file are usable, but should be customized to suit your environment.
A Pre-Configured broker-config.xml can be downloaded.
Now start JBoss server to ensure it start without any errors using the same commands we used before. If JBoss Server starts without any errors you can move to next step. Stop the server and continue to next step.
Next step is to configure JBoss to initialize and start ActiveMQ whenever JBoss starts up. This is accomplished by putting an XML (activemq-jms-ds.xml) inside [JBOSS_HOME]\server\default\deploy.
A Pre-Configured activemq-jms-ds.xml can be downloaded.
Now start JBoss server to ensure it start without any errors using the same commands we used before. Examine the startup messages for ActiveMQ messages.
21:20:17,453 INFO [RARDeployment] Required license terms exist, view vfszip:/C: /JBoss/jboss-6.0.0.M1/server/default/deploy/mail-ra.rar/META-INF/ra.xml 21:20:17,515 INFO [RARDeployment] Required license terms exist, view vfszip:/C: /JBoss/jboss-6.0.0.M1/server/default/deploy/quartz-ra.rar/META-INF/ra.xml 21:20:17,968 INFO [AdminObject] Bound admin object 'org.apache.activemq.command .ActiveMQQueue' at 'activemq/queue/outbound' 21:20:17,984 INFO [AdminObject] Bound admin object 'org.apache.activemq.command .ActiveMQTopic' at 'activemq/topic/inbound' 21:20:18,171 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=activemq/QueueConnectionFactory' to JNDI name 'java:activemq/QueueConnectionFactory' 21:20:18,281 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=activemq/TopicConnectionFactory' to JNDI name 'java:activemq/TopicConnectionFactory'
Now our environment is ready to go.
相关推荐
Integrating Python with Leading Computer Forensics Platforms 英文epub 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除
《Oracle Receivables Guide to Integrating Oracle Receivables with Taxware Sales/Use System Release 11i》是Oracle公司发布的一份技术指南,主要针对如何将Oracle Receivables(Oracle收款模块)与Taxware的...
SystemVerilog是一种基于IEEE标准的硬件描述语言(HDL),它在Verilog的基础上进一步发展,提供更丰富的数据类型、更强大的仿真和测试能力,并支持更复杂的系统级验证。SystemC是另一种硬件仿真语言,主要用于高层次...
hadoop 与oracle数据库的结合
Integrating Python with Leading Computer Forensics Platforms 英文无水印pdf pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源...
C# is a modern, general-purpose, object-oriented programming language developed by Microsoft and approved by Ecma and ISO.C# was developed by Anders Hejlsberg and his team during the development of ....
sap press doc 解压密码:abap_developer
Apress - Office and SharePoint 2010 Users Guide - Integrating SharePoint with Excel Outlook Access and Word
sap press doc 解压密码:abap_developer
VTK 13 Integrating with the Windowing__ System.pdf VTK 13 Integrating with the Windowing__ System.pdf
《Microsoft.Press.Integrating.PHP.with.Windows.2011》这本书主要聚焦于如何在Windows环境下有效地集成和运行PHP,以实现高效、稳定的Web应用程序开发。PHP是一种广泛使用的开源脚本语言,尤其适合用于服务器端...
Integrating Open-Source Statistical Packages with ArcGIS
sap press doc 解压密码:abap_developer
Integrating Windows NT Server 4.0 with NetWare, UNIX, IBM, and
通过上述步骤,我们成功地在一个MFC应用程序中集成了Direct3D 9.0。这不仅展示了Direct3D与MFC结合的基础,还提供了一种在实际项目中应用这种技术的方法。此外,本文还介绍了一些基本的代码实现,为读者提供了一个...
ClickHouse 是一个高性能的列式数据库管理系统,常用于在线分析处理(OLAP)场景。它在集成BitMap结构后,极大地增强了对大规模数据查询和处理的能力。BitMap,也称为位图索引,是一种高效的数据存储和检索技术,尤其...