SETUP

3.1.2 ActiveMQ Installation

This section describes the steps to setup ActiveMQ.

  1. Download the ActiveMQ release 2.1 binaries, activemq-2.1.zip, from http://activemq.codehaus.org/ActiveMQ+2.1+Release
  2. Extract the files to a directory, say, C:\activemq. The directory structure after extraction is C:\activemq\ activemq-release-2.1. IMPORTANT Note: Do NOT extract under “Documents and Settings”. The message broker was not able to correctly parse the space in the directory name.
  3. Set an environment variable ACTTIVEMQ_HOME to C:\activemq\ activemq-release-2.1\. Environment variables can be set in windows through Control Panel -> System -> Advanced -> Environment Variables. Add it to both user and system variables.
  4. Required .jar files are in %ACTIVEMQ_HOME%\lib. Add %ACTIVEMQ_HOME%\lib to CLASSPATH.           
    Required JARs
    : Currently ActiveMQ depends on the following jars

concurrent.jar

commons-logging.jar

J2EE APIs which could be the j2ee.jar from Sun or your J2EE container or you could use Geronimo's freely distributable geronimo-spec-j2ee.jar. If you are inside a servlet container and being dependent on the j2ee.jar causes you troubles, the parts of the J2EE jar we are dependent on are as follows:

geronimo-spec-jms.jar

geronimo-spec-jta.jar

geronimo-spec-j2ee-management.jar

 

Optional JARS

spring.jar - to use the XML configuration file for configuring the Message Broker

jmdns.jar – to use ZeroConf based discovery

 

  1. Add to the PATH environment variable, %ACTIVEMQ_HOME%\bin;
  2. To run the ActiveMQ message broker

> cd %ACTIVEMQ_HOME%\bin

> activemq