http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/docs/user-manual/en/using-core.xml ---------------------------------------------------------------------- diff --git a/docs/user-manual/en/using-core.xml b/docs/user-manual/en/using-core.xml index eb72c79..38f3d3a 100644 --- a/docs/user-manual/en/using-core.xml +++ b/docs/user-manual/en/using-core.xml @@ -181,29 +181,40 @@ <section> <title>A simple example of using Core</title> <para>Here's a very simple program using the core messaging API to send and receive a - message:</para> + message. Logically it's comprised of two sections: firstly setting up the producer to + write a message to an <emphasis>addresss</emphasis>, and secondly, creating a + <emphasis>queue</emphasis> for the consumer, creating the consumer and + <emphasis>starting</emphasis> it.</para> <programlisting> ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration( InVMConnectorFactory.class.getName())); -ClientSessionFactory factory = locator.createClientSessionFactory(); +// In this simple example, we just use one session for both producing and receiving +ClientSessionFactory factory = locator.createClientSessionFactory(); ClientSession session = factory.createSession(); -session.createQueue("example", "example", true); +// A producer is associated with an address ... ClientProducer producer = session.createProducer("example"); - ClientMessage message = session.createMessage(true); - message.getBodyBuffer().writeString("Hello"); -producer.send(message); +// We need a queue attached to the address ... -session.start(); +session.createQueue("example", "example", true); + +// And a consumer attached to the queue ... ClientConsumer consumer = session.createConsumer("example"); +// Once we have a queue, we can send the message ... + +producer.send(message); + +// We need to start the session before we can -receive- messages ... + +session.start(); ClientMessage msgReceived = consumer.receive(); System.out.println("message = " + msgReceived.getBodyBuffer().readString());
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/docs/user-manual/en/using-server.xml ---------------------------------------------------------------------- diff --git a/docs/user-manual/en/using-server.xml b/docs/user-manual/en/using-server.xml index c5f1265..17ce895 100644 --- a/docs/user-manual/en/using-server.xml +++ b/docs/user-manual/en/using-server.xml @@ -35,30 +35,26 @@ <title>Starting and Stopping the standalone server</title> <para>In the distribution you will find a directory called <literal>bin</literal>.</para> <para><literal>cd</literal> into that directory and you will find a Unix/Linux script called - <literal>run.sh</literal> and a windows batch file called <literal - >run.bat</literal></para> - <para>To run on Unix/Linux type <literal>./run.sh</literal></para> - <para>To run on Windows type <literal>run.bat</literal></para> + <literal>hornetq</literal> and a Windows script called <literal>hornetq.cmd</literal>.</para> + <para>To start the HornetQ instance on Unix/Linux type <literal>./hornetq run</literal></para> + <para>To start the HornetQ instance on Windows type <literal>hornetq.cmd run</literal></para> <para>These scripts are very simple and basically just set-up the classpath and some JVM - parameters and start the JBoss Microcontainer. The Microcontainer is a light weight - container used to deploy the HornetQ POJO's</para> - <para>To stop the server you will also find a Unix/Linux script <literal>stop.sh</literal> and - a windows batch file <literal>stop.bat</literal></para> - <para>To run on Unix/Linux type <literal>./stop.sh</literal></para> - <para>To run on Windows type <literal>stop.bat</literal></para> + parameters and bootstrap the server using <ulink + url="https://github.com/airlift/airline">Airline</ulink>.</para> + <para>To stop the HornetQ instance you will use the same <literal>hornetq</literal> script.</para> + <para>To run on Unix/Linux type <literal>./hornetq stop</literal></para> + <para>To run on Windows type <literal>hornetq.cmd stop</literal></para> <para>Please note that HornetQ requires a Java 6 or later runtime to run.</para> - <para>Both the run and the stop scripts use the config under <literal - >config/stand-alone/non-clustered</literal> by default. The configuration can be - changed by running <literal>./run.sh ../config/stand-alone/clustered</literal> or - another config of your choosing. This is the same for the stop script and the windows - bat files.</para> + <para>By default the <literal>config/non-clustered/bootstrap.xml</literal> configuration is used. The + configuration can be changed e.g. by running + <literal>./hornetq run -- xml:../config/clustered/bootstrap.xml</literal> or another config of + your choosing.</para> </section> <section> <title>Server JVM settings</title> - <para>The run scripts <literal>run.sh</literal> and <literal>run.bat</literal> set some JVM - settings for tuning running on Java 6 and choosing the garbage collection policy. We - recommend using a parallel garbage collection algorithm to smooth out latency and - minimise large GC pauses.</para> + <para>The run scripts set some JVM settings for tuning the garbage collection policy + and heap size. We recommend using a parallel garbage collection algorithm to smooth + out latency and minimise large GC pauses.</para> <para>By default HornetQ runs in a maximum of 1GiB of RAM. To increase the memory settings change the <literal>-Xms</literal> and <literal>-Xmx</literal> memory settings as you would for any Java program.</para> @@ -66,15 +62,7 @@ are the place to do it.</para> </section> <section> - <title>Server classpath</title> - <para>HornetQ looks for its configuration files on the Java classpath.</para> - <para>The scripts <literal>run.sh</literal> and <literal>run.bat</literal> specify the - classpath when calling Java to run the server.</para> - <para>In the distribution, the run scripts will add the non clustered configuration - directory to the classpath. This is a directory which contains a set of configuration - files for running the HornetQ server in a basic non-clustered configuration. In the - distribution this directory is <literal>config/stand-alone/non-clustered/</literal> from - the root of the distribution.</para> + <title>Pre-configured Options</title> <para>The distribution contains several standard configuration sets for running:</para> <itemizedlist> <listitem> @@ -84,22 +72,20 @@ <para>Clustered stand-alone</para> </listitem> <listitem> - <para>Non clustered in JBoss Application Server</para> + <para>Replicated stand-alone</para> </listitem> <listitem> - <para>Clustered in JBoss Application Server</para> + <para>Shared-store stand-alone</para> </listitem> </itemizedlist> <para>You can of course create your own configuration and specify any configuration - directory when running the run script.</para> - <para>Just make sure the directory is on the classpath and HornetQ will search there when - starting up.</para> + when running the run script.</para> </section> <section id="using-server.library.path"> <title>Library Path</title> <para>If you're using the <link linkend="aio-journal">Asynchronous IO Journal</link> on Linux, you need to specify <literal>java.library.path</literal> as a property on your - Java options. This is done automatically in the <literal>run.sh</literal> script.</para> + Java options. This is done automatically in the scripts.</para> <para>If you don't specify <literal>java.library.path</literal> at your Java options then the JVM will use the environment variable <literal>LD_LIBRARY_PATH</literal>.</para> </section> @@ -111,20 +97,10 @@ </section> <section id="using-server.configuration"> <title>Configuration files</title> - <para>The configuration directory is specified on the classpath in the run scripts <literal - >run.sh</literal> and <literal>run.bat</literal> This directory can contain the - following files.</para> + <para>The configuration file used to bootstrap the server (e.g. <literal>bootstrap.xml</literal> + by default) references the specific broker configuration files.</para> <itemizedlist> <listitem> - <para><literal>hornetq-beans.xml</literal> (or <literal - >hornetq-jboss-beans.xml</literal> if you're running inside JBoss - Application Server). This is the JBoss Microcontainer beans file which defines - what beans the Microcontainer should create and what dependencies to enforce - between them. Remember that HornetQ is just a set of POJOs. In the stand-alone - server, it's the JBoss Microcontainer which instantiates these POJOs and - enforces dependencies between them and other beans. </para> - </listitem> - <listitem> <para><literal>hornetq-configuration.xml</literal>. This is the main HornetQ configuration file. All the parameters in this file are described in <xref linkend="configuration-index"/>. Please see <xref @@ -156,11 +132,6 @@ file. For more information on using JMS, please see <xref linkend="using-jms" />.</para> </listitem> - <listitem> - <para><literal>logging.properties</literal> This is used to configure the logging - handlers used by the Java logger. For more information on configuring logging, - please see <xref linkend="logging"/>.</para> - </listitem> </itemizedlist> <note> <para>The property <literal>file-deployment-enabled</literal> in the <literal @@ -184,190 +155,43 @@ >${hornetq.remoting.netty.host}</literal>, however the system property <emphasis>must</emphasis> be supplied in that case.</para> </section> - <section id="server.microcontainer.configuration"> - <title>JBoss Microcontainer Beans File</title> - <para>The stand-alone server is basically a set of POJOs which are instantiated by the light - weight<ulink url="http://www.jboss.org/jbossmc/"> JBoss Microcontainer - </ulink>engine.</para> - <note> - <para>A beans file is also needed when the server is deployed in the JBoss Application - Server but this will deploy a slightly different set of objects since the - Application Server will already have things like security etc deployed.</para> - </note> - <para>Let's take a look at an example beans file from the stand-alone server:</para> + <section id="server.bootstrap.configuration"> + <title>Bootstrap File</title> + <para>The stand-alone server is basically a set of POJOs which are instantiated by Airline commands.</para> + <para>The bootstrap file is very simple. Let's take a look at an example:</para> <para> <programlisting> -<?xml version="1.0" encoding="UTF-8"?> - -<deployment xmlns="urn:jboss:bean-deployer:2.0"> - - <!-- MBean server --> - <bean name="MBeanServer" class="javax.management.MBeanServer"> - <constructor factoryClass="java.lang.management.ManagementFactory" - factoryMethod="getPlatformMBeanServer"/> - </bean> - - <!-- The core configuration --> - <bean name="Configuration" class="org.hornetq.core.config.impl.FileConfiguration"> - </bean> - - <!-- The security manager --> - <bean name="HornetQSecurityManager" class="org.hornetq.spi.core.security.HornetQSecurityManagerImpl"> - <start ignored="true"/> - <stop ignored="true"/> - </bean> +<broker xmlns="http://hornetq.org/schema"> - <!-- The core server --> - <bean name="HornetQServer" class="org.hornetq.core.server.impl.HornetQServerImpl"> - <constructor> - <parameter> - <inject bean="Configuration"/> - </parameter> - <parameter> - <inject bean="MBeanServer"/> - </parameter> - <parameter> - <inject bean="HornetQSecurityManager"/> - </parameter> - </constructor> - <start ignored="true"/> - <stop ignored="true"/> - </bean> + <file:core configuration="${hornetq.home}/config/stand-alone/non-clustered/hornetq-configuration.xml"></core> + <file:jms configuration="${hornetq.home}/config/stand-alone/non-clustered/hornetq-jms.xml"></jms> - <!-- The Stand alone server that controls the jndi server--> - <bean name="StandaloneServer" class="org.hornetq.jms.server.impl.StandaloneNamingServer"> - <constructor> - <parameter> - <inject bean="HornetQServer"/> - </parameter> - </constructor> - <property name="port">${jnp.port:1099}</property> - <property name="bindAddress">${jnp.host:localhost}</property> - <property name="rmiPort">${jnp.rmiPort:1098}</property> - <property name="rmiBindAddress">${jnp.host:localhost}</property> - </bean> + <basic-security/> - <!-- The JMS server --> - <bean name="JMSServerManager" class="org.hornetq.jms.server.impl.JMSServerManagerImpl"> - <constructor> - <parameter> - <inject bean="HornetQServer"/> - </parameter> - </constructor> - </bean> + <naming bindAddress="localhost" port="1099" rmiBindAddress="localhost" rmiPort="1098"/> - -</deployment></programlisting> +</broker></programlisting> </para> - <para>We can see that, as well as the core HornetQ server, the stand-alone server - instantiates various different POJOs, let's look at them in turn:</para> <itemizedlist> <listitem> - <para>MBeanServer</para> - <para>In order to provide a JMX management interface a JMS MBean server is necessary - in which to register the management objects. Normally this is just the default - platform MBean server available in the JVM instance. If you don't want to - provide a JMX management interface this can be commented out or removed.</para> - </listitem> - <listitem> - <para>Configuration</para> - <para>The HornetQ server is configured with a Configuration object. In the default - stand-alone set-up it uses a FileConfiguration object which knows to read - configuration information from the file system. In different configurations such - as embedded you might want to provide configuration information from somewhere - else.</para> - </listitem> - <listitem> - <para>Security Manager. The security manager used by the messaging server is - pluggable. The default one used just reads user-role information from the - <literal>hornetq-users.xml</literal> file on disk. However it can be - replaced by a JAAS security manager, or when running inside JBoss Application - Server it can be configured to use the JBoss AS security manager for tight - integration with JBoss AS security. If you've disabled security altogether you - can remove this too.</para> + <para>core</para> + <para>Instantiates a core server using the configuration file from the + <literal>configuration</literal> attribute. This is the main broker POJO necessary + to do all the real messaging work.</para> </listitem> - <listitem> - <para>HornetQServer</para> - <para>This is the core server. It's where 99% of the magic happens</para> - </listitem> - <listitem> - <para>StandaloneServer</para> - <para>Many clients like to look up JMS Objects from JNDI so we provide a JNDI server - for them to do that. This class is a wrapper around the JBoss naming server. - If you don't need JNDI this can be commented out or removed.</para> - </listitem> - <listitem id="bean-jmsservermanager"> - <para>JMSServerManager</para> + <listitem id="jms"> + <para>jms</para> <para>This deploys any JMS Objects such as JMS Queues, Topics and ConnectionFactory - instances from <literal>hornetq-jms.xml</literal> files on the disk. It also + instances from the <literal>hornetq-jms.xml</literal> file specified. It also provides a simple management API for manipulating JMS Objects. On the whole it just translates and delegates its work to the core server. If you don't need to - deploy JMS Queues, Topics and ConnectionFactorys from server side configuration + deploy JMS Queues, Topics and ConnectionFactories from server side configuration and don't require the JMS management interface this can be disabled.</para> </listitem> - </itemizedlist> - </section> - <section id="server.microkernel.configuration"> - <title>JBoss AS4 MBean Service.</title> - <note> - <para>The section is only to configure HornetQ on JBoss AS4. The service functionality is - similar to Microcontainer Beans</para> - </note> - <para> - <programlisting> -<?xml version="1.0" encoding="UTF-8"?> -<server> - <mbean code="org.hornetq.service.HornetQFileConfigurationService" - name="org.hornetq:service=HornetQFileConfigurationService"> - </mbean> - - <mbean code="org.hornetq.service.JBossASSecurityManagerService" - name="org.hornetq:service=JBossASSecurityManagerService"> - </mbean> - - <mbean code="org.hornetq.service.HornetQStarterService" - name="org.hornetq:service=HornetQStarterService"> - <!--let's let the JMS Server start us--> - <attribute name="Start">false</attribute> - - <depends optional-attribute-name="SecurityManagerService" - proxy-type="attribute">org.hornetq:service=JBossASSecurityManagerService</depends> - <depends optional-attribute-name="ConfigurationService" - proxy-type="attribute">org.hornetq:service=HornetQFileConfigurationService</depends> - </mbean> - - <mbean code="org.hornetq.service.HornetQJMSStarterService" - name="org.hornetq:service=HornetQJMSStarterService"> - <depends optional-attribute-name="HornetQServer" - proxy-type="attribute">org.hornetq:service=HornetQStarterService</depends> - </mbean> -</server></programlisting> - </para> - <para>This jboss-service.xml configuration file is included inside the hornetq-service.sar - on AS4 with embedded HornetQ. As you can see, on this configuration file we are starting - various services:</para> - <itemizedlist> - <listitem> - <para>HornetQFileConfigurationService</para> - <para>This is an MBean Service that takes care of the life cycle of the <literal>FileConfiguration POJO</literal></para> - </listitem> - <listitem> - <para>JBossASSecurityManagerService</para> - <para>This is an MBean Service that takes care of the lifecycle of the <literal>JBossASSecurityManager</literal> POJO</para> - </listitem> - <listitem> - <para>HornetQStarterService</para> - <para>This is an MBean Service that controls the main <literal>HornetQServer</literal> POJO. - this has a dependency on JBossASSecurityManagerService and HornetQFileConfigurationService MBeans</para> - </listitem> - <listitem> - <para>HornetQJMSStarterService</para> - <para>This is an MBean Service that controls the <literal>JMSServerManagerImpl</literal> POJO. - If you aren't using jms this can be removed.</para> - </listitem> <listitem> - <para>JMSServerManager</para> - <para>Has the responsibility to start the JMSServerManager and the same behaviour that JMSServerManager Bean</para> + <para>naming</para> + <para>Instantiates a naming server which implements JNDI. This is used by JMS + clients</para> </listitem> </itemizedlist> </section> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/docs/user-manual/user-manual.xpr ---------------------------------------------------------------------- diff --git a/docs/user-manual/user-manual.xpr b/docs/user-manual/user-manual.xpr index 2f3e5dd..fc5025a 100644 --- a/docs/user-manual/user-manual.xpr +++ b/docs/user-manual/user-manual.xpr @@ -21,6 +21,7 @@ <file name="en/configuration-index.xml"/> <file name="en/configuring-transports.xml"/> <file name="en/connection-ttl.xml"/> + <file name="en/slow-consumers.xml"/> <file name="en/core-bridges.xml"/> <file name="en/diverts.xml"/> <file name="en/duplicate-detection.xml"/> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/etc/checkstyle.xml ---------------------------------------------------------------------- diff --git a/etc/checkstyle.xml b/etc/checkstyle.xml index 7a420f4..3f8da10 100644 --- a/etc/checkstyle.xml +++ b/etc/checkstyle.xml @@ -71,5 +71,16 @@ <property name="caseIndent" value="3"/> <property name="throwsIndent" value="3"/> </module> + + <module name="IllegalImport"> + <property name="illegalPkgs" value="junit.framework"/> + </module> + + <!-- developed at https://github.com/hornetq/hornetq-checkstyle-checks --> + <module name="org.hornetq.checks.annotation.RequiredAnnotation"> + <property name="annotationName" value="Parameters"/> + <property name="requiredParameters" value="name"/> + </module> + </module> </module> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/core/microcontainer/pom.xml ---------------------------------------------------------------------- diff --git a/examples/core/microcontainer/pom.xml b/examples/core/microcontainer/pom.xml deleted file mode 100644 index f3d92f5..0000000 --- a/examples/core/microcontainer/pom.xml +++ /dev/null @@ -1,84 +0,0 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.hornetq.examples.core</groupId> - <artifactId>core-examples</artifactId> - <version>2.5.0-SNAPSHOT</version> - </parent> - - <artifactId>hornetq-core-microcontainer-example</artifactId> - <packaging>jar</packaging> - <name>HornetQ Core Microcontainer Example</name> - - <dependencies> - <dependency> - <groupId>org.hornetq</groupId> - <artifactId>hornetq-bootstrap</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.hornetq</groupId> - <artifactId>hornetq-server</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.hornetq</groupId> - <artifactId>hornetq-core-client</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.hornetq</groupId> - <artifactId>hornetq-commons</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>io.netty</groupId> - <artifactId>netty-all</artifactId> - <version>${netty.version}</version> - </dependency> - <dependency> - <groupId>org.jboss.javaee</groupId> - <artifactId>jboss-jms-api</artifactId> - <version>1.1.0.GA</version> - </dependency> - <dependency> - <groupId>org.jboss.naming</groupId> - <artifactId>jnp-client</artifactId> - <version>5.0.5.Final</version> - </dependency> - <dependency> - <groupId>org.jboss.spec.javax.jms</groupId> - <artifactId>jboss-jms-api_2.0_spec</artifactId> - </dependency> - </dependencies> - - <profiles> - <profile> - <id>example</id> - <build> - <plugins> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>exec-maven-plugin</artifactId> - <version>1.1</version> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>java</goal> - </goals> - </execution> - </executions> - <configuration> - <mainClass>org.hornetq.core.example.EmbeddedMicroContainerExample</mainClass> - </configuration> - </plugin> - </plugins> - </build> - </profile> - </profiles> - - -</project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/core/microcontainer/readme.html ---------------------------------------------------------------------- diff --git a/examples/core/microcontainer/readme.html b/examples/core/microcontainer/readme.html deleted file mode 100644 index 40d2832..0000000 --- a/examples/core/microcontainer/readme.html +++ /dev/null @@ -1,82 +0,0 @@ -<html> - <head> - <title>HornetQ Embedded Example</title> - <link rel="stylesheet" type="text/css" href="../../common/common.css" /> - <link rel="stylesheet" type="text/css" href="../../common/prettify.css" /> - <script type="text/javascript" src="../../common/prettify.js"></script> - </head> - <body onload="prettyPrint()"> - <h1>Micro Container Example</h1> - - <p>This examples shows how to setup and run HornetQ through the Micro Container.</p> - <p>Refer to the user's manual for the list of required Jars, since JBoss Micro Container requires a few jars.</p> - <h2>Example step-by-step</h2> - <p><i>To run the example, simply type <code>mvn verify</code> from this directory</i></p> - <p>In this we don't use any configuration files. (Everything is embedded). We simply instantiate ConfigurationImpl, HornetQServer, start it and operate on JMS regularly</p> - - <ol> - - <li>Start the server</li> - <pre class="prettyprint"> - hornetq = new HornetQBootstrapServer("./server0/hornetq-beans.xml"); - hornetq.run(); - </pre> - - <li>As we are not using a JNDI environment we instantiate the objects directly</li> - <pre class="prettyprint"> - ServerLocator serverLocator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName())); - ClientSessionFactory sf = serverLocator.createSessionFactory(); - </pre> - - <li>Create a Core Queue</li> - <pre class="prettyprint"> - ClientSession coreSession = sf.createSession(false, false, false); - final String queueName = "queue.exampleQueue"; - coreSession.createQueue(queueName, queueName, true); - coreSession.close(); - </pre> - - <li>Create the session and producer</li> - <pre class="prettyprint"> - session = sf.createSession(); - - ClientProducer producer = session.createProducer(queueName); - </pre> - - <li>Create and send a Message</li> - <pre class="prettyprint"> - ClientMessage message = session.createMessage(false); - message.putStringProperty(propName, "Hello sent at " + new Date()); - System.out.println("Sending the message."); - producer.send(message); - </pre> - - <li>Create the message consumer and start the connection</li> - <pre class="prettyprint"> - ClientConsumer messageConsumer = session.createConsumer(queueName); - session.start(); - </pre> - - <li>Receive the message</li> - <pre class="prettyprint"> - ClientMessage messageReceived = messageConsumer.receive(1000); - System.out.println("Received TextMessage:" + messageReceived.getProperty(propName)); - </pre> - - <li>Be sure to close our resources!</li> - - <pre class="prettyprint"> - if (sf != null) - { - sf.close(); - } - </pre> - - <li>Stop the server</li> - - <pre class="prettyprint"> - hornetq.shutdown(); - </pre> - </ol> - </body> -</html> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/core/microcontainer/src/main/java/org/hornetq/core/example/EmbeddedMicroContainerExample.java ---------------------------------------------------------------------- diff --git a/examples/core/microcontainer/src/main/java/org/hornetq/core/example/EmbeddedMicroContainerExample.java b/examples/core/microcontainer/src/main/java/org/hornetq/core/example/EmbeddedMicroContainerExample.java deleted file mode 100644 index ac5ace4..0000000 --- a/examples/core/microcontainer/src/main/java/org/hornetq/core/example/EmbeddedMicroContainerExample.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright 2005-2014 Red Hat, Inc. - * Red Hat licenses this file to you under the Apache License, version - * 2.0 (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. See the License for the specific language governing - * permissions and limitations under the License. - */ -package org.hornetq.core.example; - -import java.util.Date; - -import org.hornetq.api.core.TransportConfiguration; -import org.hornetq.api.core.client.*; -import org.hornetq.core.remoting.impl.netty.NettyConnectorFactory; -import org.hornetq.integration.bootstrap.HornetQBootstrapServer; - -/** - * - * This example shows how to run a HornetQ core client and server embedded in your - * own application - * - * @author <a href="mailto:[email protected]">Tim Fox</a> - * - */ -public class EmbeddedMicroContainerExample -{ - - public static void main(final String[] args) throws Exception - { - - HornetQBootstrapServer hornetQ = null; - try - { - - // Step 1. Start the server - hornetQ = new HornetQBootstrapServer("hornetq-beans.xml"); - hornetQ.run(); - - // Step 2. As we are not using a JNDI environment we instantiate the objects directly - ServerLocator serverLocator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName())); - ClientSessionFactory sf = serverLocator.createSessionFactory(); - - // Step 3. Create a core queue - ClientSession coreSession = sf.createSession(false, false, false); - - final String queueName = "queue.exampleQueue"; - - coreSession.createQueue(queueName, queueName, true); - - coreSession.close(); - - ClientSession session = null; - - try - { - - // Step 4. Create the session, and producer - session = sf.createSession(); - - ClientProducer producer = session.createProducer(queueName); - - // Step 5. Create and send a message - ClientMessage message = session.createMessage(false); - - final String propName = "myprop"; - - message.putStringProperty(propName, "Hello sent at " + new Date()); - - System.out.println("Sending the message."); - - producer.send(message); - - // Step 6. Create the message consumer and start the connection - ClientConsumer messageConsumer = session.createConsumer(queueName); - session.start(); - - // Step 7. Receive the message. - ClientMessage messageReceived = messageConsumer.receive(1000); - - System.out.println("Received TextMessage:" + messageReceived.getStringProperty(propName)); - } - finally - { - // Step 8. Be sure to close our resources! - if (sf != null) - { - sf.close(); - } - - // Step 9. Shutdown the container - if (hornetQ != null) - { - hornetQ.shutDown(); - } - } - } - catch (Exception e) - { - e.printStackTrace(); - throw e; - } - } -} http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/core/microcontainer/src/main/resources/hornetq-beans.xml ---------------------------------------------------------------------- diff --git a/examples/core/microcontainer/src/main/resources/hornetq-beans.xml b/examples/core/microcontainer/src/main/resources/hornetq-beans.xml deleted file mode 100644 index b68c7ae..0000000 --- a/examples/core/microcontainer/src/main/resources/hornetq-beans.xml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<deployment xmlns="urn:jboss:bean-deployer:2.0"> - - <!-- MBean server --> - <bean name="MBeanServer" class="javax.management.MBeanServer"> - <constructor factoryClass="java.lang.management.ManagementFactory" - factoryMethod="getPlatformMBeanServer"/> - </bean> - - <!-- The core configuration --> - <bean name="Configuration" class="org.hornetq.core.config.impl.FileConfiguration"/> - - <!-- The security manager --> - <bean name="HornetQSecurityManager" class="org.hornetq.spi.core.security.HornetQSecurityManagerImpl"> - <start ignored="true"/> - <stop ignored="true"/> - </bean> - - <!-- The core server --> - <bean name="HornetQServer" class="org.hornetq.core.server.impl.HornetQServerImpl"> - <constructor> - <parameter> - <inject bean="Configuration"/> - </parameter> - <parameter> - <inject bean="MBeanServer"/> - </parameter> - <parameter> - <inject bean="HornetQSecurityManager"/> - </parameter> - </constructor> - </bean> - - -</deployment> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/core/microcontainer/src/main/resources/hornetq-configuration.xml ---------------------------------------------------------------------- diff --git a/examples/core/microcontainer/src/main/resources/hornetq-configuration.xml b/examples/core/microcontainer/src/main/resources/hornetq-configuration.xml deleted file mode 100644 index 766b4b1..0000000 --- a/examples/core/microcontainer/src/main/resources/hornetq-configuration.xml +++ /dev/null @@ -1,29 +0,0 @@ -<configuration xmlns="urn:hornetq" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd"> - - - - <bindings-directory>target/data/messaging/bindings</bindings-directory> - - <journal-directory>target/data/messaging/journal</journal-directory> - - <large-messages-directory>target/data/messaging/largemessages</large-messages-directory> - - <paging-directory>target/data/messaging/paging</paging-directory> - - <!-- Acceptors --> - <acceptors> - <acceptor name="netty-acceptor"> - <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class> - <param key="tcp-no-delay" value="false"/> - <param key="tcp-send-buffer-size" value="1048576"/> - <param key="tcp-receive-buffer-size" value="1048576"/> - </acceptor> - </acceptors> - - <security-enabled>false</security-enabled> - - <persistence-enabled>false</persistence-enabled> - -</configuration> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/core/perf/src/main/resources/server0/hornetq-beans.xml ---------------------------------------------------------------------- diff --git a/examples/core/perf/src/main/resources/server0/hornetq-beans.xml b/examples/core/perf/src/main/resources/server0/hornetq-beans.xml deleted file mode 100644 index 1ab8e95..0000000 --- a/examples/core/perf/src/main/resources/server0/hornetq-beans.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<deployment xmlns="urn:jboss:bean-deployer:2.0"> - - <!-- The core configuration --> - <bean name="Configuration" class="org.hornetq.core.config.impl.FileConfiguration"/> - - <!-- The core server --> - <bean name="HornetQServer" class="org.hornetq.core.server.impl.HornetQServerImpl"> - <constructor> - <parameter> - <inject bean="Configuration"/> - </parameter> - </constructor> - </bean> - -</deployment> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/core/twitter-connector/src/main/resources/server0/hornetq-beans.xml ---------------------------------------------------------------------- diff --git a/examples/core/twitter-connector/src/main/resources/server0/hornetq-beans.xml b/examples/core/twitter-connector/src/main/resources/server0/hornetq-beans.xml deleted file mode 100644 index 171d373..0000000 --- a/examples/core/twitter-connector/src/main/resources/server0/hornetq-beans.xml +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<deployment xmlns="urn:jboss:bean-deployer:2.0"> - - <bean name="Naming" class="org.jnp.server.NamingBeanImpl"/> - - <!-- JNDI server. Disable this if you don't want JNDI --> - <bean name="JNDIServer" class="org.jnp.server.Main"> - <property name="namingInfo"> - <inject bean="Naming"/> - </property> - <property name="port">1099</property> - <property name="bindAddress">localhost</property> - <property name="rmiPort">1098</property> - <property name="rmiBindAddress">localhost</property> - </bean> - - <!-- MBean server --> - <bean name="MBeanServer" class="javax.management.MBeanServer"> - <constructor factoryClass="java.lang.management.ManagementFactory" - factoryMethod="getPlatformMBeanServer"/> - </bean> - - <!-- The core configuration --> - <bean name="Configuration" class="org.hornetq.core.config.impl.FileConfiguration"/> - - <!-- The security manager --> - <bean name="HornetQSecurityManager" class="org.hornetq.spi.core.security.HornetQSecurityManagerImpl"> - <start ignored="true"/> - <stop ignored="true"/> - </bean> - - <!-- The core server --> - <bean name="HornetQServer" class="org.hornetq.core.server.impl.HornetQServerImpl"> - <constructor> - <parameter> - <inject bean="Configuration"/> - </parameter> - <parameter> - <inject bean="MBeanServer"/> - </parameter> - <parameter> - <inject bean="HornetQSecurityManager"/> - </parameter> - </constructor> - <start ignored="true"/> - <stop ignored="true"/> - </bean> - - <!-- The JMS server --> - <bean name="JMSServerManager" class="org.hornetq.jms.server.impl.JMSServerManagerImpl"> - <constructor> - <parameter> - <inject bean="HornetQServer"/> - </parameter> - </constructor> - </bean> - -</deployment> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/core/vertx-connector/pom.xml ---------------------------------------------------------------------- diff --git a/examples/core/vertx-connector/pom.xml b/examples/core/vertx-connector/pom.xml index a2cc7f3..4c0fef3 100644 --- a/examples/core/vertx-connector/pom.xml +++ b/examples/core/vertx-connector/pom.xml @@ -13,7 +13,7 @@ <name>HornetQ Vert.x Example</name> <properties> - <vertx.version>2.1RC1</vertx.version> + <vertx.version>2.1.2</vertx.version> </properties> <dependencies> <dependency> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/core/vertx-connector/src/main/resources/server0/hornetq-beans.xml ---------------------------------------------------------------------- diff --git a/examples/core/vertx-connector/src/main/resources/server0/hornetq-beans.xml b/examples/core/vertx-connector/src/main/resources/server0/hornetq-beans.xml deleted file mode 100644 index 171d373..0000000 --- a/examples/core/vertx-connector/src/main/resources/server0/hornetq-beans.xml +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<deployment xmlns="urn:jboss:bean-deployer:2.0"> - - <bean name="Naming" class="org.jnp.server.NamingBeanImpl"/> - - <!-- JNDI server. Disable this if you don't want JNDI --> - <bean name="JNDIServer" class="org.jnp.server.Main"> - <property name="namingInfo"> - <inject bean="Naming"/> - </property> - <property name="port">1099</property> - <property name="bindAddress">localhost</property> - <property name="rmiPort">1098</property> - <property name="rmiBindAddress">localhost</property> - </bean> - - <!-- MBean server --> - <bean name="MBeanServer" class="javax.management.MBeanServer"> - <constructor factoryClass="java.lang.management.ManagementFactory" - factoryMethod="getPlatformMBeanServer"/> - </bean> - - <!-- The core configuration --> - <bean name="Configuration" class="org.hornetq.core.config.impl.FileConfiguration"/> - - <!-- The security manager --> - <bean name="HornetQSecurityManager" class="org.hornetq.spi.core.security.HornetQSecurityManagerImpl"> - <start ignored="true"/> - <stop ignored="true"/> - </bean> - - <!-- The core server --> - <bean name="HornetQServer" class="org.hornetq.core.server.impl.HornetQServerImpl"> - <constructor> - <parameter> - <inject bean="Configuration"/> - </parameter> - <parameter> - <inject bean="MBeanServer"/> - </parameter> - <parameter> - <inject bean="HornetQSecurityManager"/> - </parameter> - </constructor> - <start ignored="true"/> - <stop ignored="true"/> - </bean> - - <!-- The JMS server --> - <bean name="JMSServerManager" class="org.hornetq.jms.server.impl.JMSServerManagerImpl"> - <constructor> - <parameter> - <inject bean="HornetQServer"/> - </parameter> - </constructor> - </bean> - -</deployment> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/javaee/jca-remote/src/test/resources/arquillian.xml ---------------------------------------------------------------------- diff --git a/examples/javaee/jca-remote/src/test/resources/arquillian.xml b/examples/javaee/jca-remote/src/test/resources/arquillian.xml index f1338ea..4fbd8f2 100644 --- a/examples/javaee/jca-remote/src/test/resources/arquillian.xml +++ b/examples/javaee/jca-remote/src/test/resources/arquillian.xml @@ -44,4 +44,4 @@ This feature can also be controlled using the system property arquillian.deploym </container> --> -</arquillian> \ No newline at end of file +</arquillian> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/client-side-failoverlistener/src/main/resources/hornetq/server0/hornetq-configuration.xml ---------------------------------------------------------------------- diff --git a/examples/jms/client-side-failoverlistener/src/main/resources/hornetq/server0/hornetq-configuration.xml b/examples/jms/client-side-failoverlistener/src/main/resources/hornetq/server0/hornetq-configuration.xml index f923f5e..c670e1f 100644 --- a/examples/jms/client-side-failoverlistener/src/main/resources/hornetq/server0/hornetq-configuration.xml +++ b/examples/jms/client-side-failoverlistener/src/main/resources/hornetq/server0/hornetq-configuration.xml @@ -10,7 +10,11 @@ <paging-directory>${build.directory}/server0/data/messaging/paging</paging-directory> - <ha-policy template="SHARED_STORE"/> + <ha-policy> + <shared-store> + <master/> + </shared-store> + </ha-policy> <!-- Connectors --> <connectors> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/client-side-failoverlistener/src/main/resources/hornetq/server1/hornetq-configuration.xml ---------------------------------------------------------------------- diff --git a/examples/jms/client-side-failoverlistener/src/main/resources/hornetq/server1/hornetq-configuration.xml b/examples/jms/client-side-failoverlistener/src/main/resources/hornetq/server1/hornetq-configuration.xml index 7d61f04..7c2bad8 100644 --- a/examples/jms/client-side-failoverlistener/src/main/resources/hornetq/server1/hornetq-configuration.xml +++ b/examples/jms/client-side-failoverlistener/src/main/resources/hornetq/server1/hornetq-configuration.xml @@ -10,7 +10,11 @@ <paging-directory>${build.directory}/server0/data/messaging/paging</paging-directory> - <ha-policy template="BACKUP_SHARED_STORE"/> + <ha-policy> + <shared-store> + <slave/> + </shared-store> + </ha-policy> <!-- Connectors --> <connectors> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/clustered-grouping/src/main/java/org/hornetq/jms/example/ClusteredGroupingExample.java ---------------------------------------------------------------------- diff --git a/examples/jms/clustered-grouping/src/main/java/org/hornetq/jms/example/ClusteredGroupingExample.java b/examples/jms/clustered-grouping/src/main/java/org/hornetq/jms/example/ClusteredGroupingExample.java index 6901227..0e8b263 100644 --- a/examples/jms/clustered-grouping/src/main/java/org/hornetq/jms/example/ClusteredGroupingExample.java +++ b/examples/jms/clustered-grouping/src/main/java/org/hornetq/jms/example/ClusteredGroupingExample.java @@ -80,37 +80,37 @@ public class ClusteredGroupingExample extends HornetQExample // Step 7. We create a JMS Connection connection1 which is a connection to server 1 connection1 = cf1.createConnection(); - // Step 7. We create a JMS Connection connection1 which is a connection to server 1 + // Step 8. We create a JMS Connection connection2 which is a connection to server 2 connection2 = cf2.createConnection(); - // Step 8. We create a JMS Session on server 0 + // Step 9. We create a JMS Session on server 0 Session session0 = connection0.createSession(false, Session.AUTO_ACKNOWLEDGE); - // Step 9. We create a JMS Session on server 1 + // Step 10. We create a JMS Session on server 1 Session session1 = connection1.createSession(false, Session.AUTO_ACKNOWLEDGE); - // Step 10. We create a JMS Session on server 1 + // Step 11. We create a JMS Session on server 1 Session session2 = connection1.createSession(false, Session.AUTO_ACKNOWLEDGE); - // Step 11. We start the connections to ensure delivery occurs on them + // Step 12. We start the connections to ensure delivery occurs on them connection0.start(); connection1.start(); connection2.start(); - // Step 12. We create JMS MessageConsumer objects on server 0 + // Step 13. We create JMS MessageConsumer objects on server 0 MessageConsumer consumer = session0.createConsumer(queue); - // Step 13. We create a JMS MessageProducer object on server 0, 1 and 2 + // Step 14. We create a JMS MessageProducer object on server 0, 1 and 2 MessageProducer producer0 = session0.createProducer(queue); MessageProducer producer1 = session1.createProducer(queue); MessageProducer producer2 = session2.createProducer(queue); - // Step 14. We send some messages to server 0, 1 and 2 with the same groupid set + // Step 15. We send some messages to server 0, 1 and 2 with the same groupid set final int numMessages = 10; @@ -148,7 +148,7 @@ public class ClusteredGroupingExample extends HornetQExample System.out.println("Sent messages: " + message.getText() + " to node 2"); } - // Step 15. We now consume those messages from server 0 + // Step 16. We now consume those messages from server 0 // We note the messages have all been sent to the same consumer on the same node for (int i = 0; i < numMessages * 3; i++) @@ -163,7 +163,7 @@ public class ClusteredGroupingExample extends HornetQExample } finally { - // Step 16. Be sure to close our resources! + // Step 17. Be sure to close our resources! if (connection0 != null) { @@ -197,4 +197,4 @@ public class ClusteredGroupingExample extends HornetQExample } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/clustered-jgroups/src/main/resources/hornetq/server0/hornetq-beans.xml ---------------------------------------------------------------------- diff --git a/examples/jms/clustered-jgroups/src/main/resources/hornetq/server0/hornetq-beans.xml b/examples/jms/clustered-jgroups/src/main/resources/hornetq/server0/hornetq-beans.xml deleted file mode 100644 index 61c04e6..0000000 --- a/examples/jms/clustered-jgroups/src/main/resources/hornetq/server0/hornetq-beans.xml +++ /dev/null @@ -1,60 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<deployment xmlns="urn:jboss:bean-deployer:2.0"> - - <bean name="Naming" class="org.jnp.server.NamingBeanImpl"/> - - <!-- JNDI server. Disable this if you don't want JNDI --> - <bean name="JNDIServer" class="org.jnp.server.Main"> - <property name="namingInfo"> - <inject bean="Naming"/> - </property> - <property name="port">1099</property> - <property name="bindAddress">localhost</property> - <property name="rmiPort">1098</property> - <property name="rmiBindAddress">localhost</property> - </bean> - - <!-- MBean server --> - <bean name="MBeanServer" class="javax.management.MBeanServer"> - <constructor factoryClass="java.lang.management.ManagementFactory" - factoryMethod="getPlatformMBeanServer"/> - </bean> - - <!-- The core configuration --> - <bean name="Configuration" class="org.hornetq.core.config.impl.FileConfiguration"/> - - <!-- The security manager --> - <bean name="HornetQSecurityManager" class="org.hornetq.spi.core.security.HornetQSecurityManagerImpl"> - <start ignored="true"/> - <stop ignored="true"/> - </bean> - - <!-- The core server --> - <bean name="HornetQServer" class="org.hornetq.core.server.impl.HornetQServerImpl"> - <constructor> - <parameter> - <inject bean="Configuration"/> - </parameter> - <parameter> - <inject bean="MBeanServer"/> - </parameter> - <parameter> - <inject bean="HornetQSecurityManager"/> - </parameter> - </constructor> - <start ignored="true"/> - <stop ignored="true"/> - </bean> - - <!-- The JMS server --> - <bean name="JMSServerManager" class="org.hornetq.jms.server.impl.JMSServerManagerImpl"> - <constructor> - <parameter> - <inject bean="HornetQServer"/> - </parameter> - </constructor> - </bean> - - -</deployment> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/clustered-jgroups/src/main/resources/hornetq/server1/hornetq-beans.xml ---------------------------------------------------------------------- diff --git a/examples/jms/clustered-jgroups/src/main/resources/hornetq/server1/hornetq-beans.xml b/examples/jms/clustered-jgroups/src/main/resources/hornetq/server1/hornetq-beans.xml deleted file mode 100644 index e5fe1e0..0000000 --- a/examples/jms/clustered-jgroups/src/main/resources/hornetq/server1/hornetq-beans.xml +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<deployment xmlns="urn:jboss:bean-deployer:2.0"> - - <bean name="Naming" class="org.jnp.server.NamingBeanImpl"/> - - <!-- JNDI server. Disable this if you don't want JNDI --> - <bean name="JNDIServer" class="org.jnp.server.Main"> - <property name="namingInfo"> - <inject bean="Naming"/> - </property> - <property name="port">2099</property> - <property name="bindAddress">localhost</property> - <property name="rmiPort">2098</property> - <property name="rmiBindAddress">localhost</property> - </bean> - - <!-- MBean server --> - <bean name="MBeanServer" class="javax.management.MBeanServer"> - <constructor factoryClass="java.lang.management.ManagementFactory" - factoryMethod="getPlatformMBeanServer"/> - </bean> - - <!-- The core configuration --> - <bean name="Configuration" class="org.hornetq.core.config.impl.FileConfiguration"/> - - <!-- The security manager --> - <bean name="HornetQSecurityManager" class="org.hornetq.spi.core.security.HornetQSecurityManagerImpl"> - <start ignored="true"/> - <stop ignored="true"/> - </bean> - - <!-- The core server --> - <bean name="HornetQServer" class="org.hornetq.core.server.impl.HornetQServerImpl"> - <constructor> - <parameter> - <inject bean="Configuration"/> - </parameter> - <parameter> - <inject bean="MBeanServer"/> - </parameter> - <parameter> - <inject bean="HornetQSecurityManager"/> - </parameter> - </constructor> - <start ignored="true"/> - <stop ignored="true"/> - </bean> - - <!-- The JMS server --> - <bean name="JMSServerManager" class="org.hornetq.jms.server.impl.JMSServerManagerImpl"> - <constructor> - <parameter> - <inject bean="HornetQServer"/> - </parameter> - </constructor> - </bean> - -</deployment> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/colocated-failover-scale-down/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jms/colocated-failover-scale-down/pom.xml b/examples/jms/colocated-failover-scale-down/pom.xml index 5faf069..25d1167 100644 --- a/examples/jms/colocated-failover-scale-down/pom.xml +++ b/examples/jms/colocated-failover-scale-down/pom.xml @@ -104,7 +104,7 @@ <dependencies> <dependency> <groupId>org.hornetq.examples.jms</groupId> - <artifactId>colocated-failover-recover-only</artifactId> + <artifactId>colocated-failover-scale-down</artifactId> <version>${project.version}</version> </dependency> <dependency> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/colocated-failover-scale-down/readme.html ---------------------------------------------------------------------- diff --git a/examples/jms/colocated-failover-scale-down/readme.html b/examples/jms/colocated-failover-scale-down/readme.html index f5e3909..a731a15 100644 --- a/examples/jms/colocated-failover-scale-down/readme.html +++ b/examples/jms/colocated-failover-scale-down/readme.html @@ -12,19 +12,31 @@ HA Policy that is colocated. colocated means that backup servers can be created and maintained by live servers on behalf of other requesting live servers. In this example we create a colocated shared store server that will scale down. That is it will not become live but scale down the journal to the colocated live server. - <p>This example starts 2 live servers each with a backup server that backs up the other live server.</p> + <p>This example starts 2 live servers each will request the other to create a backup.</p> <p>The first live server will be killed and the backup in the second will recover the journal and recreate its state in the live server it shares its VM with.</p> - <p>The following shows how to configure the backup, the backup strategy is set to <b>SCALE_DOWN</b> which means + <p>The following shows how to configure the backup, the slave is configured <b><scale-down/></b> which means that the backup server will not fully start on fail over, instead it will just recover the journal and write it - to its parent live server. Also notice we have over ridden some of the configuration since we want it to use the same - journal as server1 since it is using shared store.</p> + to its parent live server.</p> <pre class="prettyprint"> - <code><ha-policy template="COLOCATED_SHARED_STORE"/> + <code><ha-policy> + <shared-store> + <colocated> + <backup-port-offset>100</backup-port-offset> + <backup-request-retries>-1</backup-request-retries> + <backup-request-retry-interval>2000</backup-request-retry-interval> + <max-backups>1</max-backups> + <request-backup>true</request-backup> + <master/> + <slave> + <scale-down/> + </slave> + </colocated> + </shared-store> + </ha-policy> </code> </pre> - <p>note that for this HA policy we use a template that will use some sensibe settings, in this case this includes - setting scale down to true. Also note that since we dont specify a scale down connector it will use most appropriate + <p>Notice that we dont need to specify a scale down connector as it will use most appropriate from the list of available connectors which in this case is the first INVM connector</p> <p> One other thing to notice is that the cluster connection has its reconnect attempts set to 5, this is so it will disconnect instead of trying to reconnect to a backup that doesn't exist.</p> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/colocated-failover-scale-down/src/main/resources/hornetq/server0/hornetq-configuration.xml ---------------------------------------------------------------------- diff --git a/examples/jms/colocated-failover-scale-down/src/main/resources/hornetq/server0/hornetq-configuration.xml b/examples/jms/colocated-failover-scale-down/src/main/resources/hornetq/server0/hornetq-configuration.xml index 5563ffe..a4a139a 100644 --- a/examples/jms/colocated-failover-scale-down/src/main/resources/hornetq/server0/hornetq-configuration.xml +++ b/examples/jms/colocated-failover-scale-down/src/main/resources/hornetq/server0/hornetq-configuration.xml @@ -66,7 +66,21 @@ </cluster-connections> <!-- a colocated server that will allow shared store backups to be requested, the default for this template is to scale down--> - <ha-policy template="COLOCATED_SHARED_STORE"/> + <ha-policy> + <shared-store> + <colocated> + <backup-port-offset>100</backup-port-offset> + <backup-request-retries>-1</backup-request-retries> + <backup-request-retry-interval>2000</backup-request-retry-interval> + <max-backups>1</max-backups> + <request-backup>true</request-backup> + <master/> + <slave> + <scale-down/> + </slave> + </colocated> + </shared-store> + </ha-policy> <!-- Other config --> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/colocated-failover-scale-down/src/main/resources/hornetq/server1/hornetq-configuration.xml ---------------------------------------------------------------------- diff --git a/examples/jms/colocated-failover-scale-down/src/main/resources/hornetq/server1/hornetq-configuration.xml b/examples/jms/colocated-failover-scale-down/src/main/resources/hornetq/server1/hornetq-configuration.xml index 2da9ca8..298f123 100644 --- a/examples/jms/colocated-failover-scale-down/src/main/resources/hornetq/server1/hornetq-configuration.xml +++ b/examples/jms/colocated-failover-scale-down/src/main/resources/hornetq/server1/hornetq-configuration.xml @@ -67,7 +67,21 @@ </cluster-connections> <!-- a colocated server that will allow shared store backups to be requested, the default for this template is to scale down--> - <ha-policy template="COLOCATED_SHARED_STORE"/> + <ha-policy> + <shared-store> + <colocated> + <backup-port-offset>100</backup-port-offset> + <backup-request-retries>-1</backup-request-retries> + <backup-request-retry-interval>2000</backup-request-retry-interval> + <max-backups>1</max-backups> + <request-backup>true</request-backup> + <master/> + <slave> + <scale-down/> + </slave> + </colocated> + </shared-store> + </ha-policy> <!-- Other config --> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/colocated-failover/readme.html ---------------------------------------------------------------------- diff --git a/examples/jms/colocated-failover/readme.html b/examples/jms/colocated-failover/readme.html index ac680f6..64665f4 100644 --- a/examples/jms/colocated-failover/readme.html +++ b/examples/jms/colocated-failover/readme.html @@ -15,9 +15,19 @@ <p>The first live server will be killed and the backup in the second will become live</p> <p>The following shows how to configure the live servers to request and allow backups to be deployed</p> <pre class="prettyprint"> - <code><ha-policy template="COLOCATED_SHARED_STORE"> - <backup-strategy>FULL</backup-strategy> - </ha-policy> + <code><ha-policy> + <shared-store> + <colocated> + <backup-port-offset>100</backup-port-offset> + <backup-request-retries>-1</backup-request-retries> + <backup-request-retry-interval>2000</backup-request-retry-interval> + <max-backups>1</max-backups> + <request-backup>true</request-backup> + <master/> + <slave/> + </colocated> + </shared-store> + </ha-policy> </code> </pre> <p>notice that we have used a template to set some sensible defaults but overridden the backup strategy so back ups http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/colocated-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml ---------------------------------------------------------------------- diff --git a/examples/jms/colocated-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml b/examples/jms/colocated-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml index 1a6e606..244a78e 100644 --- a/examples/jms/colocated-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml +++ b/examples/jms/colocated-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml @@ -58,8 +58,18 @@ </cluster-connections> <!-- a colocated server that will allow shared store full backups to be requested--> - <ha-policy template="COLOCATED_SHARED_STORE"> - <backup-strategy>FULL</backup-strategy> + <ha-policy> + <shared-store> + <colocated> + <backup-port-offset>100</backup-port-offset> + <backup-request-retries>-1</backup-request-retries> + <backup-request-retry-interval>2000</backup-request-retry-interval> + <max-backups>1</max-backups> + <request-backup>true</request-backup> + <master/> + <slave/> + </colocated> + </shared-store> </ha-policy> <!-- Other config --> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/colocated-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml ---------------------------------------------------------------------- diff --git a/examples/jms/colocated-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml b/examples/jms/colocated-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml index c301c46..d4ff70d 100644 --- a/examples/jms/colocated-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml +++ b/examples/jms/colocated-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml @@ -59,8 +59,18 @@ </cluster-connections> <!-- a colocated server that will allow shared store full backups to be requested--> - <ha-policy template="COLOCATED_SHARED_STORE"> - <backup-strategy>FULL</backup-strategy> + <ha-policy> + <shared-store> + <colocated> + <backup-port-offset>100</backup-port-offset> + <backup-request-retries>-1</backup-request-retries> + <backup-request-retry-interval>2000</backup-request-retry-interval> + <max-backups>1</max-backups> + <request-backup>true</request-backup> + <master/> + <slave/> + </colocated> + </shared-store> </ha-policy> <!-- Other config --> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/consumer-rate-limit/src/main/resources/hornetq/server0/hornetq-beans.xml ---------------------------------------------------------------------- diff --git a/examples/jms/consumer-rate-limit/src/main/resources/hornetq/server0/hornetq-beans.xml b/examples/jms/consumer-rate-limit/src/main/resources/hornetq/server0/hornetq-beans.xml deleted file mode 100644 index 171d373..0000000 --- a/examples/jms/consumer-rate-limit/src/main/resources/hornetq/server0/hornetq-beans.xml +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<deployment xmlns="urn:jboss:bean-deployer:2.0"> - - <bean name="Naming" class="org.jnp.server.NamingBeanImpl"/> - - <!-- JNDI server. Disable this if you don't want JNDI --> - <bean name="JNDIServer" class="org.jnp.server.Main"> - <property name="namingInfo"> - <inject bean="Naming"/> - </property> - <property name="port">1099</property> - <property name="bindAddress">localhost</property> - <property name="rmiPort">1098</property> - <property name="rmiBindAddress">localhost</property> - </bean> - - <!-- MBean server --> - <bean name="MBeanServer" class="javax.management.MBeanServer"> - <constructor factoryClass="java.lang.management.ManagementFactory" - factoryMethod="getPlatformMBeanServer"/> - </bean> - - <!-- The core configuration --> - <bean name="Configuration" class="org.hornetq.core.config.impl.FileConfiguration"/> - - <!-- The security manager --> - <bean name="HornetQSecurityManager" class="org.hornetq.spi.core.security.HornetQSecurityManagerImpl"> - <start ignored="true"/> - <stop ignored="true"/> - </bean> - - <!-- The core server --> - <bean name="HornetQServer" class="org.hornetq.core.server.impl.HornetQServerImpl"> - <constructor> - <parameter> - <inject bean="Configuration"/> - </parameter> - <parameter> - <inject bean="MBeanServer"/> - </parameter> - <parameter> - <inject bean="HornetQSecurityManager"/> - </parameter> - </constructor> - <start ignored="true"/> - <stop ignored="true"/> - </bean> - - <!-- The JMS server --> - <bean name="JMSServerManager" class="org.hornetq.jms.server.impl.JMSServerManagerImpl"> - <constructor> - <parameter> - <inject bean="HornetQServer"/> - </parameter> - </constructor> - </bean> - -</deployment> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/dead-letter/src/main/resources/hornetq/server0/hornetq-beans.xml ---------------------------------------------------------------------- diff --git a/examples/jms/dead-letter/src/main/resources/hornetq/server0/hornetq-beans.xml b/examples/jms/dead-letter/src/main/resources/hornetq/server0/hornetq-beans.xml deleted file mode 100644 index cfb2d3e..0000000 --- a/examples/jms/dead-letter/src/main/resources/hornetq/server0/hornetq-beans.xml +++ /dev/null @@ -1,60 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<deployment xmlns="urn:jboss:bean-deployer:2.0"> - - <bean name="Naming" class="org.jnp.server.NamingBeanImpl"/> - - <!-- JNDI server. Disable this if you don't want JNDI --> - <bean name="JNDIServer" class="org.jnp.server.Main"> - <property name="namingInfo"> - <inject bean="Naming"/> - </property> - <property name="port">1099</property> - <property name="bindAddress">localhost</property> - <property name="rmiPort">1098</property> - <property name="rmiBindAddress">localhost</property> - </bean> - - <!-- MBean server --> - <bean name="MBeanServer" class="javax.management.MBeanServer"> - <constructor factoryClass="java.lang.management.ManagementFactory" - factoryMethod="getPlatformMBeanServer"/> - </bean> - - <!-- The core configuration --> - <bean name="Configuration" class="org.hornetq.core.config.impl.FileConfiguration"/> - - <!-- The security manager --> - <bean name="HornetQSecurityManager" class="org.hornetq.spi.core.security.HornetQSecurityManagerImpl"> - <start ignored="true"/> - <stop ignored="true"/> - </bean> - - <!-- The core server --> - <bean name="HornetQServer" class="org.hornetq.core.server.impl.HornetQServerImpl"> - <constructor> - <parameter> - <inject bean="Configuration"/> - </parameter> - <parameter> - <inject bean="MBeanServer"/> - </parameter> - <parameter> - <inject bean="HornetQSecurityManager"/> - </parameter> - </constructor> - <start ignored="true"/> - <stop ignored="true"/> - </bean> - - <!-- The JMS server --> - <bean name="JMSServerManager" class="org.hornetq.jms.server.impl.JMSServerManagerImpl"> - <constructor> - <parameter> - <inject bean="HornetQServer"/> - </parameter> - </constructor> - </bean> - - -</deployment> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/delayed-redelivery/src/main/resources/hornetq/server0/hornetq-beans.xml ---------------------------------------------------------------------- diff --git a/examples/jms/delayed-redelivery/src/main/resources/hornetq/server0/hornetq-beans.xml b/examples/jms/delayed-redelivery/src/main/resources/hornetq/server0/hornetq-beans.xml deleted file mode 100644 index cfb2d3e..0000000 --- a/examples/jms/delayed-redelivery/src/main/resources/hornetq/server0/hornetq-beans.xml +++ /dev/null @@ -1,60 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<deployment xmlns="urn:jboss:bean-deployer:2.0"> - - <bean name="Naming" class="org.jnp.server.NamingBeanImpl"/> - - <!-- JNDI server. Disable this if you don't want JNDI --> - <bean name="JNDIServer" class="org.jnp.server.Main"> - <property name="namingInfo"> - <inject bean="Naming"/> - </property> - <property name="port">1099</property> - <property name="bindAddress">localhost</property> - <property name="rmiPort">1098</property> - <property name="rmiBindAddress">localhost</property> - </bean> - - <!-- MBean server --> - <bean name="MBeanServer" class="javax.management.MBeanServer"> - <constructor factoryClass="java.lang.management.ManagementFactory" - factoryMethod="getPlatformMBeanServer"/> - </bean> - - <!-- The core configuration --> - <bean name="Configuration" class="org.hornetq.core.config.impl.FileConfiguration"/> - - <!-- The security manager --> - <bean name="HornetQSecurityManager" class="org.hornetq.spi.core.security.HornetQSecurityManagerImpl"> - <start ignored="true"/> - <stop ignored="true"/> - </bean> - - <!-- The core server --> - <bean name="HornetQServer" class="org.hornetq.core.server.impl.HornetQServerImpl"> - <constructor> - <parameter> - <inject bean="Configuration"/> - </parameter> - <parameter> - <inject bean="MBeanServer"/> - </parameter> - <parameter> - <inject bean="HornetQSecurityManager"/> - </parameter> - </constructor> - <start ignored="true"/> - <stop ignored="true"/> - </bean> - - <!-- The JMS server --> - <bean name="JMSServerManager" class="org.hornetq.jms.server.impl.JMSServerManagerImpl"> - <constructor> - <parameter> - <inject bean="HornetQServer"/> - </parameter> - </constructor> - </bean> - - -</deployment> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/durable-subscription/src/main/resources/hornetq/server0/hornetq-beans.xml ---------------------------------------------------------------------- diff --git a/examples/jms/durable-subscription/src/main/resources/hornetq/server0/hornetq-beans.xml b/examples/jms/durable-subscription/src/main/resources/hornetq/server0/hornetq-beans.xml deleted file mode 100644 index 71274b3..0000000 --- a/examples/jms/durable-subscription/src/main/resources/hornetq/server0/hornetq-beans.xml +++ /dev/null @@ -1,60 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<deployment xmlns="urn:jboss:bean-deployer:2.0"> - - <bean name="Naming" class="org.jnp.server.NamingBeanImpl"/> - - <!-- JNDI server. Disable this if you don't want JNDI --> - <bean name="JNDIServer" class="org.jnp.server.Main"> - <property name="namingInfo"> - <inject bean="Naming"/> - </property> - <property name="port">1099</property> - <property name="bindAddress">localhost</property> - <property name="rmiPort">1098</property> - <property name="rmiBindAddress">localhost</property> - </bean> - - <!-- MBean server --> - <bean name="MBeanServer" class="javax.management.MBeanServer"> - <constructor factoryClass="java.lang.management.ManagementFactory" - factoryMethod="getPlatformMBeanServer"/> - </bean> - - <!-- The core configuration --> - <bean name="Configuration" class="org.hornetq.core.config.impl.FileConfiguration"/> - - <!-- The security manager --> - <bean name="HornetQSecurityManager" class="org.hornetq.spi.core.security.HornetQSecurityManagerImpl"> - <start ignored="true"/> - <stop ignored="true"/> - </bean> - - <!-- The core server --> - <bean name="HornetQServer" class="org.hornetq.core.server.impl.HornetQServerImpl"> - <constructor> - <parameter> - <inject bean="Configuration"/> - </parameter> - <parameter> - <inject bean="MBeanServer"/> - </parameter> - <parameter> - <inject bean="HornetQSecurityManager"/> - </parameter> - </constructor> - <start ignored="true"/> - <stop ignored="true"/> - </bean> - - <!-- The JMS server --> - <bean name="JMSServerManager" class="org.hornetq.jms.server.impl.JMSServerManagerImpl"> - <constructor> - <parameter> - <inject bean="HornetQServer"/> - </parameter> - </constructor> - </bean> - - -</deployment> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/ha-policy-autobackup/src/main/resources/hornetq/server0/hornetq-configuration.xml ---------------------------------------------------------------------- diff --git a/examples/jms/ha-policy-autobackup/src/main/resources/hornetq/server0/hornetq-configuration.xml b/examples/jms/ha-policy-autobackup/src/main/resources/hornetq/server0/hornetq-configuration.xml index 6c90184..06b358a 100644 --- a/examples/jms/ha-policy-autobackup/src/main/resources/hornetq/server0/hornetq-configuration.xml +++ b/examples/jms/ha-policy-autobackup/src/main/resources/hornetq/server0/hornetq-configuration.xml @@ -38,16 +38,27 @@ </acceptors> <!-- HA configuration --> - <ha-policy template="COLOCATED_REPLICATED"> - <max-backups>1</max-backups> - <scale-down-connectors> - <connector-ref>invm-connector</connector-ref> - </scale-down-connectors> - <remote-connectors> - <connector-ref>invm-connector</connector-ref> - <connector-ref>server1-connector</connector-ref> - <connector-ref>netty-connector</connector-ref> - </remote-connectors> + <ha-policy> + <replication> + <colocated> + <max-backups>1</max-backups> + <request-backup>true</request-backup> + <backup-request-retry-interval>1000</backup-request-retry-interval> + <excludes> + <connector-ref>invm-connector</connector-ref> + <connector-ref>server1-connector</connector-ref> + <connector-ref>netty-connector</connector-ref> + </excludes> + <master/> + <slave> + <scale-down> + <connectors> + <connector-ref>invm-connector</connector-ref> + </connectors> + </scale-down> + </slave> + </colocated> + </replication> </ha-policy> <cluster-connections> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/ha-policy-autobackup/src/main/resources/hornetq/server1/hornetq-configuration.xml ---------------------------------------------------------------------- diff --git a/examples/jms/ha-policy-autobackup/src/main/resources/hornetq/server1/hornetq-configuration.xml b/examples/jms/ha-policy-autobackup/src/main/resources/hornetq/server1/hornetq-configuration.xml index 36b3d9d..ffcfa6b 100644 --- a/examples/jms/ha-policy-autobackup/src/main/resources/hornetq/server1/hornetq-configuration.xml +++ b/examples/jms/ha-policy-autobackup/src/main/resources/hornetq/server1/hornetq-configuration.xml @@ -38,16 +38,27 @@ </acceptors> <!-- HA configuration --> - <ha-policy template="COLOCATED_REPLICATED"> - <max-backups>1</max-backups> - <scale-down-connectors> - <connector-ref>invm-connector</connector-ref> - </scale-down-connectors> - <remote-connectors> - <connector-ref>invm-connector</connector-ref> - <connector-ref>server0-connector</connector-ref> - <connector-ref>netty-connector</connector-ref> - </remote-connectors> + <ha-policy> + <replication> + <colocated> + <max-backups>1</max-backups> + <request-backup>true</request-backup> + <backup-request-retry-interval>1000</backup-request-retry-interval> + <excludes> + <connector-ref>invm-connector</connector-ref> + <connector-ref>server0-connector</connector-ref> + <connector-ref>netty-connector</connector-ref> + </excludes> + <master/> + <slave> + <scale-down> + <connectors> + <connector-ref>invm-connector</connector-ref> + </connectors> + </scale-down> + </slave> + </colocated> + </replication> </ha-policy> <cluster-connections> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/hornetq-jms-examples-common/config/hornetq-example-beans.xml ---------------------------------------------------------------------- diff --git a/examples/jms/hornetq-jms-examples-common/config/hornetq-example-beans.xml b/examples/jms/hornetq-jms-examples-common/config/hornetq-example-beans.xml deleted file mode 100644 index e70555a..0000000 --- a/examples/jms/hornetq-jms-examples-common/config/hornetq-example-beans.xml +++ /dev/null @@ -1,165 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<deployment xmlns="urn:jboss:bean-deployer:2.0"> - - <bean name="Naming" class="org.jnp.server.NamingBeanImpl"/> - - <!-- JNDI server. Disable this if you don't want JNDI --> - <bean name="JNDIServer" class="org.jnp.server.Main"> - <property name="namingInfo"> - <inject bean="Naming"/> - </property> - <property name="port">1099</property> - <property name="bindAddress">localhost</property> - <property name="rmiPort">1098</property> - <property name="rmiBindAddress">localhost</property> - </bean> - - <bean name="DeploymentManager" class="org.hornetq.core.deployers.impl.FileDeploymentManager"> - <constructor> - <!-- The scan time in milliseconds --> - <parameter>5000</parameter> - </constructor> - </bean> - - <bean name="Configuration" class="org.hornetq.core.config.impl.FileConfiguration"/> - - <!--<bean name="HornetQSecurityManager" class="org.hornetq.core.security.impl.JBossASSecurityManager"/>--> - - <bean name="HornetQSecurityManager" class="org.hornetq.spi.core.security.HornetQSecurityManagerImpl"> - </bean> - - <bean name="BasicSecurityDeployer" class="org.hornetq.core.deployers.impl.BasicUserCredentialsDeployer"> - <constructor> - <parameter> - <inject bean="DeploymentManager"/> - </parameter> - </constructor> - <property name="hornetQSecurityManager"> - <inject bean="HornetQSecurityManager"/> - </property> - </bean> - - <bean name="HornetQServer" class="org.hornetq.core.server.impl.HornetQServerImpl"> - <depends>AddressSettingsDeployer</depends> - <depends>QueueDeployer</depends> - - <property name="storageManager"> - <inject bean="StorageManager"/> - </property> - <property name="remotingService"> - <inject bean="RemotingService"/> - </property> - <property name="configuration"> - <inject bean="Configuration"/> - </property> - <property name="securityManager"> - <inject bean="HornetQSecurityManager"/> - </property> - <property name="managementService"> - <inject bean="ManagementService"/> - </property> - </bean> - - <bean name="StorageManager" class="org.hornetq.core.persistence.impl.journal.JournalStorageManager"> - <constructor> - <parameter> - <inject bean="Configuration"/> - </parameter> - </constructor> - </bean> - - <bean name="RemotingService" class="org.hornetq.core.remoting.server.impl.RemotingServiceImpl"> - <constructor> - <parameter> - <inject bean="Configuration"/> - </parameter> - </constructor> - <property name="managementService"> - <inject bean="ManagementService"/> - </property> - </bean> - - <bean name="JMSServerManager" class="org.hornetq.jms.server.impl.JMSServerManagerImpl"> - <constructor> - <parameter> - <inject bean="HornetQServer" property="serverManagement"/> - </parameter> - <parameter> - <inject bean="JMSManagementService"/> - </parameter> - </constructor> - </bean> - - <bean name="JMSServerDeployer" class="org.hornetq.api.jms.server.impl.JMSServerDeployer"> - <constructor> - <parameter> - <inject bean="DeploymentManager"/> - </parameter> - <parameter> - <inject bean="Configuration"/> - </parameter> - </constructor> - <property name="jmsServerManager"> - <inject bean="JMSServerManager"/> - </property> - </bean> - - <bean name="AddressSettingsDeployer" class="org.hornetq.core.deployers.impl.AddressSettingsDeployer"> - <constructor> - <parameter> - <inject bean="DeploymentManager"/> - </parameter> - <parameter> - <inject bean="HornetQServer" property="addressSettingsRepository" state="Configured"/> - </parameter> - </constructor> - </bean> - - <bean name="QueueDeployer" class="org.hornetq.core.deployers.impl.QueueDeployer"> - <constructor> - <parameter> - <inject bean="DeploymentManager"/> - </parameter> - <parameter> - <inject bean="Configuration"/> - </parameter> - </constructor> - </bean> - - <bean name="SecurityDeployer" class="org.hornetq.core.deployers.impl.SecurityDeployer"> - <constructor> - <parameter> - <inject bean="DeploymentManager"/> - </parameter> - <parameter> - <inject bean="HornetQServer" property="securityRepository"/> - </parameter> - </constructor> - </bean> - - <bean name="ManagementService" class="org.hornetq.core.server.management.impl.ManagementServiceImpl"> - <constructor> - <parameter> - <inject bean="MBeanServer"/> - </parameter> - <parameter> - <inject bean="Configuration" property="JMXManagementEnabled" /> - </parameter> - </constructor> - </bean> - - <bean name="JMSManagementService" class="org.hornetq.api.jms.server.management.impl.JMSManagementServiceImpl"> - <constructor> - <parameter> - <inject bean="ManagementService"/> - </parameter> - </constructor> - </bean> - - <bean name="MBeanServer" class="javax.management.MBeanServer"> - <constructor factoryClass="java.lang.management.ManagementFactory" - factoryMethod="getPlatformMBeanServer"/> - </bean> - -</deployment> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/hornetq-ra-rar/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jms/hornetq-ra-rar/pom.xml b/examples/jms/hornetq-ra-rar/pom.xml index 3e8077b..82e6249 100644 --- a/examples/jms/hornetq-ra-rar/pom.xml +++ b/examples/jms/hornetq-ra-rar/pom.xml @@ -32,7 +32,7 @@ </exclusion> <exclusion> <groupId>org.jboss.spec.javax.transaction</groupId> - <artifactId>jboss-transaction-api_1.1_spec</artifactId> + <artifactId>jboss-transaction-api_1.2_spec</artifactId> </exclusion> <exclusion> <groupId>jboss.jbossts.jts</groupId>
