From activemq-commits-return-499-apmail-geronimo-activemq-commits-archive=geronimo.apache.org@geronimo.apache.org Thu Feb 02 16:36:18 2006 Return-Path: Delivered-To: apmail-geronimo-activemq-commits-archive@www.apache.org Received: (qmail 45461 invoked from network); 2 Feb 2006 16:36:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 Feb 2006 16:36:15 -0000 Received: (qmail 78109 invoked by uid 500); 2 Feb 2006 16:36:00 -0000 Delivered-To: apmail-geronimo-activemq-commits-archive@geronimo.apache.org Received: (qmail 78041 invoked by uid 500); 2 Feb 2006 16:36:00 -0000 Mailing-List: contact activemq-commits-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-dev@geronimo.apache.org Delivered-To: mailing list activemq-commits@geronimo.apache.org Received: (qmail 78022 invoked by uid 99); 2 Feb 2006 16:35:59 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Feb 2006 08:35:59 -0800 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 02 Feb 2006 08:35:42 -0800 Received: (qmail 44600 invoked by uid 65534); 2 Feb 2006 16:35:21 -0000 Message-ID: <20060202163521.44594.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r374430 [14/45] - /incubator/activemq/site/ Date: Thu, 02 Feb 2006 16:33:52 -0000 To: activemq-commits@geronimo.apache.org From: jstrachan@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Added: incubator/activemq/site/Getting+Started URL: http://svn.apache.org/viewcvs/incubator/activemq/site/Getting%2BStarted?rev=374430&view=auto ============================================================================== --- incubator/activemq/site/Getting+Started (added) +++ incubator/activemq/site/Getting+Started Thu Feb 2 08:31:10 2006 @@ -0,0 +1,324 @@ + + + + + + + + ActiveMQ - Getting Started + + + + + + + + + + + + + + + +
+ + + + + + +
+

Overview

+ +

Community

+ +

Using ActiveMQ

+ +

Features

+ +

Connectivitiy

+ +

Utilities

+ +

External Tools

+ +

Related Projects

+ +

Support

+ +

Developers

+ +

Tools we use

+ +

Feeds

+ + + + + + + + + +
+
+
+ Site +
+ + + News +
+
+ +
+ + + + + +
+ Getting Started + + +
+
+ + +
+
+

Getting Started

+

Document Organization

+ +

Firstly you need to add the jars to your 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
    • +
    +
  • +
+

If you want to grab a J2EE specification jar we recommend the Apache repository

+

Optional JARS

+
    +
  • spring.jar - if you wish to use the XML configuration file for configuring the Message Broker
  • +
+
    +
  • 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.
  • +
+ +

Persistence Support

+

We support persistence via JDBC and a high performance journal. For full explict control over configuration check out the Xml Configuration.

+

If you're just doing some testing or in-VM SEDA based messaging you may wish to disable persistence. You can use the Xml Configuration for this.

+

In 4.x you can do this by setting the usePersistence property to false either in the Xml Configuration or on the broker URL.

+

In 3.x another option is to set the following system property...

+

+

+
activemq.persistenceAdapter = org.activemq.store.vm.VMPersistenceAdapter
+
+

+

or to set this in code you can do this

+

+

+
connectionFactory.setBrokerContainerFactory(new BrokerContainerFactoryImpl(new VMPersistenceAdapter()));
+
+

+

Handling JMS brokers going down

+

A common requirement is that if the JMS broker goes down you want to automatically detect the failure and try to reconnect under the covers so that your application does not have to worry about reconnection.

+

There is detailed documentation on this in Configuring Transports; briefly...

+

Just change your connection URI in 3.x to

+

+

+
reliable:tcp://host:port
+
+

+

or in 4.x to

+

+

+
failover:tcp://host:port
+
+

+

And the JMS client will auto-reconnect to the broker if it is shutdown and restarted later on.

+

Next steps

+

One of the first things you might want to do is start a broker. Once you have a broker running you could try using the JNDI Support which shows how to run an example JMS program. Or there are some other example programs

+

If you don't want to use JNDI you can justinstantiate an ActiveMQConnectionFactory, configure its properties directly and then you're ready to use the standard JMS API to create Connections, Sessions, MessageProducer and MessageConsumer instances.

+

Additional Resources

+

Related Reading

+ +

Specifications

+ +

Related open source projects

+
    +
  • Apache Geronimo
  • +
  • Hermes JMS
  • +
  • Jencks is a Spring JCA container allowing you to use connection & thread & POJO pooling for consuming JMS in highly concurrent servers
  • +
  • Lingo is a Spring/POJO remoting layer for JMS. It allows you to reuse all the power of JMS from your POJOs without using any of the JMS APIs directly
  • +
  • Spring
  • +
  • Stomp 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.
  • +
  • XBean is used as the default XML configuration mechanism for ActiveMQ
  • +
+
+
+ +   +