Java Reference
In-Depth Information
A real-world example - HornetQ and ActiveMQ
In this section, we will provide an example scenario, which includes an external component
such as the Apache ActiveMQ (Apache 2.0 open source licensed) message broker that fully
implements Java Message Service 1.1 ( JMS ). Another application could be communicat-
ing with our ticketing system using this broker, but in our sample, we will simulate the ex-
ternal system using the ActiveMQ administration console.
In order to run this example, we will need to pick up the ActiveMQ resource adapter,
activemq-rar-5.9.0.rar , which can be downloaded from the Maven repository at . You will also
need the ActiveMQ broker, which you can download from
ivemq-590-release.html . Simply extract the binary distribution and run the /apache-
activemq-5.9.0/bin/activemq.bat file to start the broker.
Installing the ActiveMQ resource adapter
Resource adapters ( .rar ) can be deployed using either WildFly management instruments
or by copying the resource adapter into the deployments directory for standalone servers.
Before doing this, we need to configure the Resource adapter in your server configuration.
This can be done by adding the configuration to the JCA subsystem or (suggested choice)
by creating a JCA descriptor of the external resource.
JCA descriptors can be created by using an utility contained in JBoss' JCA implementation
named IronJacamar ( ) . Within IronJacamar 1.1 or later
distributions (accessible at ), you can find a
resource adapter information tool ( rar-info.bat ) that can be used to create the re-
source adapter deployment descriptor by generating a report file containing all the neces-
sary information.
The rar-info.bat tool can be found in the doc/as folder of your IronJacamar distri-
bution. So let's move to this folder:
$ cd doc/as
Now issue the following command, which assumes that you have saved your resource ad-
apter in the /usr/doc folder:
Search WWH ::

Custom Search