Thursday, May 9, 2013

JBoss A-MQ 6 / ActiveMQ RAR integration in JBoss EAP 6 Part I - Installation and Test with Arquillian

Since the first release of Red Hat JBoss A-MQ 6.0 and the Red Hat's commitment to support JBoss A-MQ/ActiveMQ with JBoss EAP 6 in the near future. I have many requests or  PoC requests rather from JBoss Partners and Red Hat Customers in the DACH region concerning integration of AtiveMQ RAR in JBoss EAP 6 and because of that I have started this project to share knowledge with you through some setup and use-cases.
I would like to provide three quickstarts, first part is about installation, resource adapter integration and test with Arquillian.
Arquillian, a new testing framework developed at JBoss.org and supported in the JBoss Web Framework Kit by Red Hat, empowers the developer to write integration tests for business objects that are executed inside a container or that interact with the container as a client.


Second part will be to talk about a common Java EE 6 deployment Use-Case "ActiveMQ RAR JCA and Queues/Topics setup is configured in JBoss EAP 6 and JMS client and MDB are deployed in the same Java EE Container".

Third part will talk about this Use-Case "Queues/Topics setup is configured out of the Java EE Container (ActiveMQ Standalone Mode) and JMS client and MDB  are running in the same JBoss EAP 6".

Part I - Installation, Resource Adapter integration and Test with Arquillian
To start with the installation you have to clone the project from bitbucket "https://bitbucket.org/spagop/jboss-a_mq6-integr-in-eap61". After that you have to change to the  folder and this will look similar like this structure:


-rw-r--r--@ 1 spagop  staff   793B May  9 12:56 README.md
drwxr-xr-x  7 spagop  staff   238B May  9 12:39 installs/
drwxr-xr-x  6 spagop  staff   204B May  9 11:52 projects/
-rwxr-xr-x@ 1 spagop  staff   4.6K May  9 12:30 setup.sh*
drwxr-xr-x  7 spagop  staff   238B May  6 17:34 support/

In the "installs" folder you have to download Red Hat JBoss A-MQ and Red Hat JBoss EAP 6.1.0.Beta from the JBoss Customer Portal and copy these binaries to the "installs" folder thereby the "setup.sh" script to work.
After that, you can run the "setup.sh" script to install and integrate your JBoss A-MQ/ActiveMQ RAR in JBoss EAP 6.0.1.Beta.
If you see this message "Red Hat JBoss A-MQ 6.0.0.GA RAR Integration in Red Hat JBoss EAP 6.1.0.BETA Complete.", you are successfully installed and integrated the resource adapter in JBoss EAP.
Now you can test your installation with Arquillian tests. You have to download JBoss Developer Studio 6.0.1 and import the project from the projects folder and all tests can be found in "src/test/java" folder.

"Please note that JBoss A-MQ integration with JBoss EAP 6 is not yet supported by Red Hat and do not use this for your production environment"

Note: I'm very open for any suggestion and enhancement.