You need to install FUSE Message Broker, Apache Ant, and a Java JDK to run the samples. You then need to identify those locations in the environment settings for the scripted samples.
You avoid some common problems when you put all the software on the same drive,
and ensure that no paths contain spaces (such as Program
Files
).
Apache Ant is used to build and run the samples.
Access the Ant 1.6.5 (or higher) distribution for your platform at http://ant.apache.org.
To install do the following:
Download the FUSE Message Broker 5.3 package for your platform from http://fusesource.com/downloads/.
Launch the installer.
Table 3.1. Command for Running the Installer in GUI Mode
Platform | Command |
---|---|
Windows | fuse-message-broker-5.3.0.0-windows.exe |
UNIX | sh
fuse-message-broker-5.3.0.0-unix.bin |
![]() | Warning |
---|---|
On UNIX/Linux/Macintosh, you might need to set or explicitly specify
the Java installation sh download.bin LAX_VM jvm_install/bin/java |
Follow the wizard prompts for a default installation.
For more information on installing FUSE Message Broker see Installation Guide.
The network connector feature in the default broker configuration attempts to
automatically discover and connect to other brokers. This default behavior can be
distracting to observing the behaviors in these samples. To shut off network
connections, navigate to your FUSE Message Broker's installation directory, edit the file
/conf/activemq.xml
, and delete the
networkConnectors
section. Save the edited file to enable the
change when you restart FUSE Message Broker.
The sample applications used in this book are located in the
exploring-jms
folder of the FUSE Message Broker installation.
The following procedures describe the steps on various platforms to set the
required HOME
, PATH
, and CLASSPATH
values.
To set the environment and set up sample windows on Windows:
Open a console window, and then enter:
set ANT_HOME=ant_install
set JAVA_HOME=jvm_install
set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;%PATH%
Spawn the windows that will run the sample applications:
start "Window 1" cmd
start "Window 2" cmd
start "Window 3" cmd
Launch the broker:
set FUSE_MB_ROOT=InstallDir
%FUSE_MB_ROOT%\bin\activemq
You are ready to take a tour of the samples on your Windows system!
To set the environment and set up sample windows on Linux:
Open a terminal window, and then enter:
ANT_HOME=ant_install
export ANT_HOME
JAVA_HOME=jvm_install
export JAVA_HOME
PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH
export PATH
FUSE_MB_ROOT=InstallDir
export FUSE_MB_ROOT
Spawn the windows that will run the sample applications:
bg
xterm -title "Window 1" &
xterm -title "Window 2" &
xterm -title "Window 3" &
Launch the broker:
cd $FUSE_MB_ROOT/bin
./activemq
You are ready to take a tour of the samples on your Linux system!
![]() | Tip |
---|---|
If you installed Apple's X11 for Mac OS X, you can use the xterm commands described for Linux to spawn windows with the environment preset, and then launch the broker. |
To set the environment and set up sample windows on Macintosh:
Open a terminal window, and then enter:
ANT_HOME=ant_install
JAVA_HOME=jvm_install
PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH
FUSE_MB_ROOT=InstallDir
Launch the broker:
cd $FUSE_MB_ROOT/bin
./activemq
Open three terminal windows to run the sample applications. Set the same environment variables as you set for the broker in each of these windows.
You are ready to take a tour of the samples on your Macintosh system!
To set the environment and set up sample windows on UNIX:
Open a terminal window, and then enter:
ANT_HOME=ant_install
JAVA_HOME=jvm_install
PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH
FUSE_MB_ROOT=InstallDir
Spawn the windows that will run the sample applications:
bg
xterm -title "Window 1" &
xterm -title "Window 2" &
xterm -title "Window 3" &
Launch the broker:
cd $FUSE_MB_ROOT/bin
./activemq
You are ready to take a tour of the samples on your UNIX system!