Java Reference
In-Depth Information
try {
final String text =
message.getBody(String.class);"Received message " + text);
} catch (JMSException ex) {
Once a message is received, it is written to a console. This means that it is time to deploy
our application. If your ActiveMQ broker is running, you should see the following similar
messages during the deployment phase:
19:59:59,452 INFO
(ServerService Thread Pool -- 65) Starting
19:59:59,458 INFO
(default-threads - 1) Establishing connection to broker
19:59:59,573 INFO
[javax.enterprise.resource.webcontainer.jsf.config] (MSC
service thread 1-5) Initializing Mojarra 2.2.5-jbossorg-3
20140128-1641 for context '/ticket-agency-jms'
19:59:59,618 INFO
(default-threads - 1) Successfully established connection
to broker [tcp://localhost:61616]
20:00:00,053 INFO [org.wildfly.extension.undertow] (MSC
service thread 1-5) JBAS017534: Registered web context:
20:00:00,081 INFO []
(DeploymentScanner-threads - 1) JBAS018559: Deployed
"ticket-agency-jms.war" (runtime-name :
Now it is time to test our connection using the ActiveMQ console, which will send a mes-
sage straight to the ActiveMQ broker. ActiveMQ 5.9.0 is equipped with a bundled
Search WWH ::

Custom Search