evodion jboss eap6 amq intgeration
DESCRIPTION
Integrate Jboss with Active MQTRANSCRIPT
JBoss EAP 6Fuse ActiveMQ integration
Serge PagopSr. Channel Solution Architect [email protected]
2
Agenda
● JBoss Middleware Portfolio
● JBoss EAP Roadmap
● ActiveMQ in general
● Why customer needs AMQ integration in JBoss EAP 6
● ActiveMQ integration in JBoss EAP 6
● Requirements● Configuration Steps
● Use-cases
● Q&A
3
Enterprise Class
Comprehensive Middleware Portfolio
FuseSource is now part of Red HatAdvances Integration Everywhere
TECHNOLOGY - FUSESOURCEFuse Enterprise Products
– Fuse ESB Enterprise
● Open source integration platform features: Camel, ActiveMQ, CXF, Karaf and supporting technologies
– Fuse MQ Enterprise
● Open source messaging platform features ActiveMQ, Karaf and supporting technologies
●
Open Source Community – Key Projects
– Apache Camel - Apache CXF
– Apache ActiveMQ - Apache Karaf (ServiceMix)
Red Hat committed to these projects and technologies
INTEGRATION PLAN - FUSESOURCE● Phase 1 - Today
– Expanded Red Hat Middleware Portfolio● Fuse products available for subscription sale
● Phase 2 – 6 to 9 months
– Rebranded Fuse products with JBoss name
For more information take a look here http://www.redhat.com/promo/jboss_integration_week_sessi
ons/pdf/Integration-BPM-Week-ESB-Roadmap-Oct-15-1.0.pdf
12
We are here because of Fuse ActiveMQ integration
in EAP 6.0.x
13
ActiveMQ
● Open Source messaging platform
● Supports JAVA standards (JMS 1.1, JCA 1.5, XA)
● Reliable, high performance messaging
● Multi-Topology, Multi-Protocol & Multi-Language support
● Supports message recovery & pluggable strategy for message storage
● Provides a flexible & customizable security model through plugins
14
Why Customer needs AMQ RAR integration in JBoss EAP 6 against HornetQ?● AMQ was already a standard messaging platform in
their IT
● HornetQ in JBoss EAP 6 does not support JDBC adapter for message persistence
● Requirement for an enterprise database for message store
● Need for long term persistence with extreme reliability● Need to use SQL Query to find information about MSGs● Expertise in the administration of relational database
exists● Requirement for creating a redundant master/slave
topology of brokers by using a shared databases
15
Fuse ActiveMQ integration in
JBoss EAP 6
16
Requirements for our integration test
● Java Virtual Machine● Sun JDK 1.6, 1.7; Open JDK 1.6.x; IBM JDK 1.6.x
● RAR from FuseSource
● ActiveMQ 5.7.0-fuse-71-047 ● JBoss EAP 6.0.1
● based on JBoss AS7.1.3● Database
● ORACLE, MySQL
18
STEP 1 – JBoss EAP 6 installation and testen
● Download an evaluation EAP 6● https://access.redhat.com/downloads#eval
● Go into the JBEAP6_HOME● Run the start script → ./standalone.sh
19
STEP 2: Customize the Resource Adapter RAR● DOWNLOAD the RAR file from FUSE repository
● http://repo.fusesource.com/nexus/content/groups/public/org/apache/activemq/
● UNZIP the RAR
● unzip activemq-rar-5.7.0.fuse-71-047.rar -d tmp/
● COPY broker-config.xml from RAR to JBEAP6_HOME
● cp tmp/brocker-config.xml JBEAP6_HOME
● DELETE brocker-config.xml from the root of RAR
● rm tmp/brocker-config.xml
●
20
STEP 3 Create a JBEAP6 Module for ActiveMQ
● DOWNLOAD dependencies for the RAR
● http://repo.fusesource.com/nexus/content/groups/public/org/apache/activemq/apache-activemq/5.7.0.fuse-71-047/apache-activemq-5.7.0.fuse-71-047-bin.zip
● UNZIP the file apache-activemq-5.7.0.fuse-71-047-bin.zip in a tmp folder
● CREATE a folder called 5.7.0.fuse-71-047
● mkdir JBEAP6_HOME/modules/org/apache/activemq/5.7.0.fuse-71-047
● COPY the 3 files (activeio-core-3.1.4.jar;commons-dbcp-1.4.jar;commons-pool-1.6.jar) from /tmp/apache-activemq-5.7.0.fuse-71-047/lib/optional into the new folder
● COPY all required JDBC drivers into the new folder 5.7.0.fuse-71-047
● cp mysql-connector-java-5.1.22-bin.jar JBEAP6_HOME/modules/org/apache/activemq/5.7.0.fuse-71-047
● CREATE a file called module.xml into 5.7.0.fuse-71-047. This file will define all dependencies JAR files required by AMQ RAR to start successfully and to connect to Database storage you choose
● touch module.xml
21
STEP 3.1 Create a JBEAP6 Module for ActiveMQ
<?xml version="1.0" encoding="UTF-8"?><module xmlns="urn:jboss:module:1.1" name="org.apache.activemq">
<resources> <!-- required Active MQ JAR's --> <resource-root path="commons-dbcp-1.4.jar" /> <resource-root path="commons-pool-1.6.jar" /> <resource-root path="activeio-core-3.1.4.jar" /> <!-- database drivers --> <resource-root path="mysql-connector-java-5.1.22-bin.jar" /> <!-- Insert resources here --> </resources> <dependencies> <module name="javax.api" export="true"/> </dependencies></module>
22
STEP 4 Finish RAR customization
● MODIFY the MANIFEST.MF file
● Specifiy the new module and version, so that module can be identified by the classloader
● Locate tmp/META-INF/MANIFEST.MF and edit and add the dependency on activemq module
● Dependencies: org.apache.activemq:5.7.0.fuse-71-047
● CREATE a new RAR from the tmp/ directory
● zip -R ../../changed-rar/cust-activemq-rar-5.7.0-fuse-71-047.rar *
● COPY the customized RAR file in the deployments folder of the JBEAP6 standalone server
● cp cust-activemq-rar-5.7.0-fuse-71-047.rar JBEAP6_HOME/standalone/deployments/
23
STEP 5 - Configure Persistence Store
<bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource"destroy-method="close"><property name="driverClassName" value="com.mysql.jdbc.Driver" /><property name="url"
value="jdbc:mysql://localhost:3306/fuse-activemqdb?relaxAutoCommit=true" />
<property name="username" value="user" /><property name="password" value="pwd" /><property name="maxActive" value="200" /><property name="poolPreparedStatements" value="true" />
</bean>
24
STEP 5.1 - Configure Persistence Store
<amq:broker xmlns="http://activemq.apache.org/schema/core"useJmx="true" useShutdownHook="false"
persistent="true" brokerName="MyFirstBroker">
<amq:managementContext><!-- use appserver provided context instead
of creating one, for jboss use: -Djboss.platform.mbeanserver -->
<managementContext createConnector="false" /></amq:managementContext>
<amq:persistenceAdapter><amq:jdbcPersistenceAdapter dataSource="#mysql-ds"/>
</amq:persistenceAdapter></amq:broker>
25
STEP 6 - Test
● START the standalone server with the profile names “standalone-amq570.fuse71.xml”
● ./standalone.sh -c standalone-amq570.fuse71.xml
● SUPPOSE to see INFOS like these
13:46:38,203 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of "cust-activemq-rar-5.7.0-fuse-71-047.rar"
13:46:41,653 INFO [org.jboss.as.connector.deployment] (MSC service thread 1-1) JBAS010406: Registered connection factory java:jboss/exported/ConnectionFactory
13:46:41,677 INFO [org.jboss.as.connector.deployment] (MSC service thread 1-1) JBAS010405: Registered admin object at java:/queue/MyAMQueue2
13:46:41,686 INFO [org.jboss.as.connector.deployment] (MSC service thread 1-2) JBAS010401: Bound JCA AdminObject [java:/queue/MyAMQueue2]
13:46:41,688 INFO [org.jboss.as.connector.deployment] (MSC service thread 1-4) JBAS010401: Bound JCA ConnectionFactory [java:jboss/exported/ConnectionFactory]
13:46:41,848 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss EAP 6.0.1.GA (AS 7.1.3.Final-redhat-4) started in 22569ms - Started 198 of 281 services (82 services are passive or on-demand)
26
Use-Case #1 AMQ JCA & Queues in EAP 6 and JMS clients are deployed in the container
27
Use-Case #2 AMQ JCA & Queues in EAP 6 and JMS clients made remote connection to the queues a serializable connection factory
28
Use-Case #3 AMQ RAR JCA in EAP 6, Queues/Topics setup is out of the Container
Thank You