tree: cb1371302ee8dec6eb18100cfd071f4353fdbab1 [path history] [tgz]
  1. src/
  2. pom.xml
  3. readme.md
assembly/src/release/examples/openwire/java/readme.md

Overview

This is an example of how use the Java JMS api with ActiveMQ.

Prereqs

  • Install Java SDK
  • Install Maven

Building

Run:

mvn install

Running the Examples

In one terminal window run:

java -cp target/openwire-example-0.1-SNAPSHOT.jar example.Listener

In another terminal window run:

java -cp target/openwire-example-0.1-SNAPSHOT.jar example.Publisher

You can control to which server the examples try to connect to by setting the following environment variables:

  • ACTIVEMQ_HOST
  • ACTIVEMQ_PORT
  • ACTIVEMQ_USER
  • ACTIVEMQ_PASSWORD