blob: 327c171a93ff88d2665ee28361c43255b102d7cd [file] [log] [blame]
<div class="wiki-content maincontent"><h1 id="InitialConfiguration-InitialConfiguration">Initial Configuration</h1><h2 id="InitialConfiguration-DocumentOrganization">Document Organization</h2><ul><li><a shape="rect" href="initial-configuration.html">#Required JARs</a></li><li><a shape="rect" href="initial-configuration.html">#Optional JARS</a></li><li><a shape="rect" href="initial-configuration.html">#Persistence Support</a></li><li><a shape="rect" href="initial-configuration.html">#Next steps</a></li><li><a shape="rect" href="initial-configuration.html">#Additional Resources</a><ul><li><a shape="rect" href="initial-configuration.html">#Related Reading</a></li><li><a shape="rect" href="initial-configuration.html">#Specifications</a></li><li><a shape="rect" href="initial-configuration.html">#Related open source projects</a></li></ul></li></ul><p>Firstly you need to add the jars to your classpath.</p><h2 id="InitialConfiguration-RequiredJARs">Required JARs</h2><p>To make ActiveMQ easy to use, the default <strong>activemq-all.jar</strong> comes complete with all the libraries required. If you prefer to have explicit control over all the jars used by ActiveMQ here is the full list of individual jars required</p><ul><li>activemq-broker.jar</li><li>activemq-client.jar</li><li>activeio-core.jar</li><li>activemq-kahadb-store.jar (if you wish to use persistence)</li><li>slf4j-api.jar</li><li>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...<ul><li>geronimo-spec-jms.jar</li><li>geronimo-spec-jta.jar</li><li>geronimo-spec-j2ee-management.jar</li></ul></li></ul><p>If you want to grab a J2EE specification jar we recommend the Apache <a shape="rect" class="external-link" href="https://dist.apache.org/repos/dist/release/geronimo/">repository</a></p><h2 id="InitialConfiguration-OptionalJARS">Optional JARS</h2><ul><li>spring.jar - if you wish to use the XML configuration file for configuring the Message Broker</li></ul><ul><li>if you wish to use message persistence then you need to add a persistent jar to your classpath (see below). If you just want a lightweight message bus with no durability you can leave this step out but we highly recommend persistence for production deployments.</li></ul><h2 id="InitialConfiguration-PersistenceSupport">Persistence Support</h2><p>We support persistence via <a shape="rect" href="persistence.html">Specialized KahaDB file system message store or JDBC</a>. For full explict control over configuration check out the <a shape="rect" href="xml-configuration.html">Xml Configuration</a>. If you wish to use KahaDB, include kahadb.jar in your classpath. In case of JDBC you'll need to include appropriate database driver.</p><p>If you're just doing some testing or in-VM SEDA based messaging you may wish to disable persistence. You can use the <a shape="rect" href="xml-configuration.html">Xml Configuration</a> for this.</p><p>In 5.x you can do this by setting the <code>persistent=false</code> property to false either in the <a shape="rect" href="xml-configuration.html">Xml Configuration</a> or on the <a shape="rect" href="configuring-transports.html">broker URL</a>.</p><h2 id="InitialConfiguration-Nextsteps">Next steps</h2><p>One of the first things you might want to do is <a shape="rect" href="run-broker.html">start a broker</a>. Once you have a broker running you could try some <a shape="rect" href="examples.html">example programs</a></p><p>If you want to write your own application, you can just instantiate an <a shape="rect" class="external-link" href="http://activemq.apache.org/maven/activemq-core/apidocs/org/apache/activemq/ActiveMQConnectionFactory.html">ActiveMQConnectionFactory</a>, configure its properties directly and then you're ready to use the standard JMS API to create Connections, Sessions, MessageProducer and MessageConsumer instances.</p><p>You can also take a look at our <a shape="rect" class="external-link" href="https://svn.apache.org/repos/asf/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/">unit tests</a> for more examples on how to use ActiveMQ.</p><h2 id="InitialConfiguration-AdditionalResources">Additional Resources</h2><h3 id="InitialConfiguration-RelatedReading">Related Reading</h3><ul><li>Sun's <a shape="rect" class="external-link" href="http://java.sun.com/products/jms/tutorial/" rel="nofollow">JMS Tutorial</a> is a handy place to start looking at how to use the JMS API directly</li><li>The ActiveMQ <a shape="rect" class="external-link" href="http://activemq.apache.org/">Website</a> for specifics on how to use ActiveMQ</li><li><a shape="rect" href="topologies.html">ActiveMQ Topologies</a></li><li><a shape="rect" href="clustering.html">ActiveMQ Clustering</a></li><li><a shape="rect" href="networks-of-brokers.html">ActiveMQ Network of Brokers</a></li><li><a shape="rect" class="external-link" href="http://www.eecs.harvard.edu/~mdw/proj/seda/" rel="nofollow">Staged Event Driven Architecture (SEDA)</a></li></ul><h3 id="InitialConfiguration-Specifications">Specifications</h3><ul><li><a shape="rect" class="external-link" href="http://java.sun.com/j2ee/connector/" rel="nofollow">Java Connector Architecture 1.5</a></li><li><a shape="rect" class="external-link" href="http://java.sun.com/products/jms/index.jsp" rel="nofollow">Java Messaging Service</a></li></ul><h3 id="InitialConfiguration-Relatedopensourceprojects">Related open source projects</h3><ul><li><a shape="rect" class="external-link" href="http://camel.apache.org">Apache Camel</a></li><li><a shape="rect" class="external-link" href="http://geronimo.apache.org/">Apache Geronimo</a></li><li><a shape="rect" class="external-link" href="http://www.hermesjms.com/" rel="nofollow">Hermes JMS</a></li><li><a shape="rect" class="external-link" href="http://stomp.github.com/" rel="nofollow">Stomp</a> is an open wire protocol (similar to HTTP) for communicating with MOMs from different languages. It has clients for languages like C, C#, Python, Perl, Ruby etc.</li><li><a shape="rect" class="external-link" href="http://xbean.org/" rel="nofollow">XBean</a> is used as the default XML configuration mechanism for ActiveMQ</li></ul></div>