Return-Path: X-Original-To: apmail-activemq-commits-archive@www.apache.org Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8860B17DFF for ; Sun, 10 May 2015 19:21:36 +0000 (UTC) Received: (qmail 64116 invoked by uid 500); 10 May 2015 19:21:36 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 64076 invoked by uid 500); 10 May 2015 19:21:36 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 63980 invoked by uid 99); 10 May 2015 19:21:36 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 May 2015 19:21:36 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id 3FB5DAC15AE for ; Sun, 10 May 2015 19:21:36 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r950842 [2/2] - in /websites/production/activemq/content: ./ cache/ Date: Sun, 10 May 2015 19:21:36 -0000 To: commits@activemq.apache.org From: buildbot@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150510192136.3FB5DAC15AE@hades.apache.org> Modified: websites/production/activemq/content/integrating-apache-activemq-with-glassfish.html ============================================================================== --- websites/production/activemq/content/integrating-apache-activemq-with-glassfish.html (original) +++ websites/production/activemq/content/integrating-apache-activemq-with-glassfish.html Sun May 10 19:21:35 2015 @@ -35,7 +35,6 @@ - +

General

See this article for a description of how to connect Glassfish 3 to an ActiveMQ 5 broker, and consume messages using a Message Driven Bean: http://geertschuring.wordpress.com/2012/04/20/how-to-connect-glassfish-3-to-activemq-5/

Glassfish 4.1

 

  1. Add resource adapter
    1. Download the resource-adapter file suitable to your broker version:
      http://repo1.maven.org/maven2/org/apache/activemq/activemq-rar/
    2. Deploy the  resource adapter with the name "activemq-rar"

      +
    3. Configure resource adapter
      (Failover Setup)

      - +
  2.  Create connector connection pool

    -
  3. Create a connector resource (JNDI-Mapping for connection pool)

    -
  4. Configure JNDI mapping for a queue

    - -
    -

    There are a number of different command line options to be able to run a broker. To see them type

    -
    - -
    -

    For more details regarding the activemq script file and other script files refer to ActiveMQ Command Line Tools Reference

    - -

    You can then use a Broker Configuration URI to specify how to start and configure your broker using a single URI. For example

    -
    - -
    -

    Or you can a Broker XBean URI to customize the Message Broker using the Xml Configuration to suit your needs. You can run a broker with a specific XML configuration as

    -
    - -
    -

    Or you can use a Broker Properties URI to customize the Message Broker using a properties file; which avoids the dependency on Spring, xbean-spring and XML.

    -
    - -
    -
    +

Unix shell warning

Icon
- -

If you are running a broker on a remote unix machine via telnet/ssh, when you exit your shell the broker will terminate too. If you want to keep the broker running you may want to use the /etc/init.d type services to run the broker. Or try use nohup. e.g.

-
-
- - -

Running the broker as a Unix Service

- -

See the Unix Service for details.

- -

Running the broker using the Java Service Wrapper Implementation

- -

See the Java Service Wrapper Page for details.

- - -

Monitoring the broker

- -You can monitor ActiveMQ using the Web Console by pointing your browser at

http://localhost:8161/admin

+

Running the broker as a Unix Service

See the Unix Service for details.

Running the broker using the Java Service Wrapper Implementation

See the Java Service Wrapper Page for details.

Monitoring the broker

You can monitor ActiveMQ using the Web Console by pointing your browser at

http://localhost:8161/admin

Icon

From ActiveMQ 5.8 onwards the web apps is secured out of the box.
The default username and password is admin/admin. You can configure this in the conf/jetty-real.properties file.

-

Or you can use the JMX support to view the running state of ActiveMQ.

For more information see the file docs/WebConsole-README.txt in the distribution.

- -

Running the broker inside a Servlet Engine

- -

See the source code (or WAR) of the Web Console for an example of how to run the broker inside a web application using Spring.

- -

Running the broker inside your J2EE 1.4 Application Server

- -

Whether its Apache Geronmio, JBoss 4, WebLogic 9 or some other J2EE 1.4 container you should be able to just reconfigure and then deploy the activemq-*.rar which is included in the binary distribution as a deployment unit in your app server. By default the rar is not configured to start an embedded broker. But by setting the brokerXmlConfig on the resource adapter configuration, the resource adapter will start an embedded broker.

- -

For more details see J2EE

- -

Running the broker from the source code

- -

From the latest checkout of the code you can run a broker using the ActiveMQ Performance Plugin

- -

Running the broker from maven

- -

You can download and install the ActiveMQ Startup Maven Plugin via the following command if you are in a directory with a pom.xml. More detailed usage here

-
- -
-

You can also include it the pom and run it using:

-
- -
- -

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 4.x to

-
- -
-

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

+

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

- -

There are a number of different command line options to be able to run a broker. To see them type

-
- -
-

For more details regarding the activemq script file and other script files refer to ActiveMQ Command Line Tools Reference

- -

You can then use a Broker Configuration URI to specify how to start and configure your broker using a single URI. For example

-
- -
- -

Or you can a Broker XBean URI to customize the Message Broker using the Xml Configuration to suit your needs. You can run a broker with a specific XML configuration as

-
- -
- -

Or you can use a Broker Properties URI to customize the Message Broker using a properties file; which avoids the dependency on Spring, xbean-spring and XML.

- -
- -
- -
-

Unix shell warning

- Icon -
- -

If you are running a broker on a remote unix machine via telnet/ssh, when you exit your shell the broker will terminate too. If you want to keep the broker running you may want to use the /etc/init.d type services to run the broker. Or try use nohup. e.g.

- -
- -
-
-
- - -

Monitoring the broker

- -You can monitor ActiveMQ using the Web Console by pointing your browser at

http://localhost:8161/admin

+

Or you can use a Broker Properties URI to customize the Message Broker using a properties file; which avoids the dependency on Spring, xbean-spring and XML.

+ +

Monitoring the broker

You can monitor ActiveMQ using the Web Console by pointing your browser at

http://localhost:8161/admin

Icon

From ActiveMQ 5.8 onwards the web apps is secured out of the box.
The default username and password is admin/admin. You can configure this in the conf/jetty-real.properties file.

-

Or you can use the JMX support to view the running state of ActiveMQ.

For more information see the file docs/WebConsole-README.txt in the distribution.

- -

Running the broker inside a Servlet Engine

- -

See the source code (or WAR) of the Web Console for an example of how to run the broker inside a web application using Spring.

- -

Running the broker inside your J2EE 1.4 Application Server

- -

Whether its Apache Geronmio, JBoss 4, WebLogic 9 or some other J2EE 1.4 container you should be able to just reconfigure and then deploy the activemq-*.rar which is included in the binary distribution as a deployment unit in your app server. By default the rar is not configured to start an embedded broker. But by setting the brokerXmlConfig on the resource adapter configuration, the resource adapter will start an embedded broker.

- -

For more details see J2EE

- -

Running the broker from the source code

- -

From the latest checkout of the code you can run a broker using the ActiveMQ Performance Plugin

- -

Running the broker from maven

- -

You can download and install the ActiveMQ Startup Maven Plugin via the following command if you are in a directory with a pom.xml. More detailed usage here

- -
- -
- -

You can also include it the pom and run it using:

- -
- -
- -

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 version 5 Transports; briefly...

- -

Just change your connection URI i to

-
- -
-

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

+

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