Author: ataylor
Date: 2011-03-08 10:32:17 -0500 (Tue, 08 Mar 2011)
New Revision: 10306
Modified:
branches/Branch_2_2_EAP/docs/user-manual/en/appserver-integration.xml
branches/Branch_2_2_EAP/docs/user-manual/en/clusters.xml
branches/Branch_2_2_EAP/docs/user-manual/en/configuration-index.xml
branches/Branch_2_2_EAP/docs/user-manual/en/configuring-transports.xml
branches/Branch_2_2_EAP/docs/user-manual/en/connection-ttl.xml
branches/Branch_2_2_EAP/docs/user-manual/en/core-bridges.xml
branches/Branch_2_2_EAP/docs/user-manual/en/examples.xml
branches/Branch_2_2_EAP/docs/user-manual/en/ha.xml
branches/Branch_2_2_EAP/docs/user-manual/en/interoperability.xml
branches/Branch_2_2_EAP/docs/user-manual/en/large-messages.xml
branches/Branch_2_2_EAP/docs/user-manual/en/project-info.xml
branches/Branch_2_2_EAP/docs/user-manual/en/thread-pooling.xml
branches/Branch_2_2_EAP/docs/user-manual/en/using-core.xml
branches/Branch_2_2_EAP/docs/user-manual/en/using-jms.xml
Log:
updated docs
Modified: branches/Branch_2_2_EAP/docs/user-manual/en/appserver-integration.xml
===================================================================
--- branches/Branch_2_2_EAP/docs/user-manual/en/appserver-integration.xml 2011-03-08
15:07:51 UTC (rev 10305)
+++ branches/Branch_2_2_EAP/docs/user-manual/en/appserver-integration.xml 2011-03-08
15:32:17 UTC (rev 10306)
@@ -324,13 +324,16 @@
<programlisting><resourceadapter>
<resourceadapter-class>org.hornetq.ra.HornetQResourceAdapter</resourceadapter-class>
<config-property>
- <description>The transport type</description>
+ <description>The transport type. Multiple connectors can be configured
by using a comma separated list,
+ i.e.
org.hornetq.core.remoting.impl.invm.InVMConnectorFactory,org.hornetq.core.remoting.impl.invm.InVMConnectorFactory.</description>
<config-property-name>ConnectorClassName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>org.hornetq.core.remoting.impl.invm.InVMConnectorFactory</config-property-value>
</config-property>
<config-property>
- <description>The transport configuration. These values must be in the
form of key=val;key=val;</description>
+ <description>The transport configuration. These values must be in the
form of key=val;key=val;,
+ if multiple connectors are used then each set must be separated by a comma
i.e. host=host1;port=5445,host=host2;port=5446.
+ Each set of params maps to the connector classname
specified.</description>
<config-property-name>ConnectionParameters</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>server-id=0</config-property-value>
@@ -438,15 +441,24 @@
<entry>ConnectorClassName</entry>
<entry>String</entry>
<entry>The Connector class name (see <xref
- linkend="configuring-transports"/> for
more information)</entry>
+ linkend="configuring-transports"/> for
more information). If multiple connectors are
+ needed this should be provided as a comma separated
list.</entry>
</row>
<row>
<entry>ConnectionParameters</entry>
<entry>String</entry>
<entry>The transport configuration. These parameters
must be in the form of
- <literal>key1=val1;key2=val2;</literal> and
will be specific to the connector used</entry>
+ <literal>key1=val1;key2=val2;</literal> and
will be specific to the connector used. If
+ multiple connectors are configured then params should be
supplied for each connector
+ separated by a comma.
+ </entry>
</row>
<row>
+ <entry>hA</entry>
+ <entry>boolean</entry>
+ <entry>True if high availability is
needed.</entry>
+ </row>
+ <row>
<entry>useLocalTx</entry>
<entry>boolean</entry>
<entry>True will enable local transaction
optimisation.</entry>
@@ -462,16 +474,6 @@
<entry>The password to use when making a
connection</entry>
</row>
<row>
- <entry>BackupConnectorClassName</entry>
- <entry>String</entry>
- <entry>The backup transport to use in case of failure
of the live node</entry>
- </row>
- <row>
- <entry>BackupConnectionParameters</entry>
- <entry>String</entry>
- <entry>The backup transport configuration
parameters</entry>
- </row>
- <row>
<entry>
<link
linkend="configuration.discovery-group.group-address">DiscoveryAddress</link></entry>
<entry>String</entry>
@@ -528,16 +530,6 @@
<entry>the batch size (in bytes) between
acknowledgements when using
DUPS_OK_ACKNOWLEDGE mode</entry>
</row>
- </tbody>
- </tgroup>
- </table>
- <para>Continued..</para>
- <informaltable frame="topbot">
- <tgroup cols="3">
- <colspec colname="c1" colnum="1"/>
- <colspec colname="c2" colnum="2"/>
- <colspec colname="c3" colnum="3"/>
- <tbody>
<row>
<entry>
<link
linkend="configuration.connection-factory.transaction-batch-size">TransactionBatchSize</link>
@@ -697,7 +689,7 @@
</row>
</tbody>
</tgroup>
- </informaltable>
+ </table>
</section>
<section>
<title>Adapter Outbound Configuration</title>
@@ -730,6 +722,10 @@
port=5445</config-property>
<max-pool-size>20</max-pool-size>
</tx-connection-factory></programlisting>
+ <warning>
+ <title>overriding connectors</title>
+ <para>If the connector class name is overridden the all params must
also be supplied.</para>
+ </warning>
<para>In this example the connection factory will be bound to JNDI with
the name
<literal>RemoteJmsXA</literal> and can be looked up in
the usual way using JNDI
or defined within the EJB or MDB as such:</para>
@@ -857,11 +853,11 @@
<para>Firstly you will need to create directory under the
<literal>deploy</literal>
directory ending in
- <literal>.rar.
+ <literal>.rar.</literal>
For this example we will name the directory
<literal>hornetq-ra.rar</literal>. This detail is
important as
the name of directory is referred to by the MDB's and the
outgoing configuration.
- </literal>
+
</para>
<note>
<para>The jboss default for this is
<literal>jms-ra.rar</literal>, If you don't want to have to
@@ -890,20 +886,47 @@
Heres an example of what this would look like:
</para>
<programlisting>
-
<resourceadapter-class>org.hornetq.ra.HornetQResourceAdapter</resourceadapter-class>
- <config-property>
- <description>The transport
type</description>
-
<config-property-name>ConnectorClassName</config-property-name>
-
<config-property-type>java.lang.String</config-property-type>
-
<config-property-value>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</config-property-value>
- </config-property>
- <config-property>
- <description>The transport configuration. These values
must be in the form of key=val;key=val;</description>
-
<config-property-name>ConnectionParameters</config-property-name>
-
<config-property-type>java.lang.String</config-property-type>
-
<config-property-value>host=127.0.0.1;port=5446</config-property-value>
- </config-property>
+<resourceadapter-class>org.hornetq.ra.HornetQResourceAdapter</resourceadapter-class>
+ <config-property>
+ <description>The transport type</description>
+
<config-property-name>ConnectorClassName</config-property-name>
+
<config-property-type>java.lang.String</config-property-type>
+
<config-property-value>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</config-property-value>
+ </config-property>
+ <config-property>
+ <description>The transport configuration. These values must be in the
form of key=val;key=val;</description>
+
<config-property-name>ConnectionParameters</config-property-name>
+
<config-property-type>java.lang.String</config-property-type>
+
<config-property-value>host=127.0.0.1;port=5446</config-property-value>
+</config-property>
</programlisting>
+ <para>
+ If you want to provide a list of servers that the adapter can connect
to you can provide a list of
+ connectors, each separated by a comma.
+ </para>
+
+ <programlisting>
+<resourceadapter-class>org.hornetq.ra.HornetQResourceAdapter</resourceadapter-class>
+ <config-property>
+ <description>The transport type</description>
+
<config-property-name>ConnectorClassName</config-property-name>
+
<config-property-type>java.lang.String</config-property-type>
+
<config-property-value>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory,org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</config-property-value>
+ </config-property>
+ <config-property>
+ <description>The transport configuration. These values must be in the
form of key=val;key=val;</description>
+
<config-property-name>ConnectionParameters</config-property-name>
+
<config-property-type>java.lang.String</config-property-type>
+
<config-property-value>host=127.0.0.1;port=5446,host=127.0.0.2;port=5447</config-property-value>
+</config-property>
+ </programlisting>
+ <warning>
+ <title>provide all params</title>
+ <para>
+ Make sure you provide parameters for each connector configured. The
position of the params in the
+ list maps to each connector provided.
+ </para>
+ </warning>
<para>This configures the resource adapter to connect to a server
running on localhost listening on port
5446
</para>
@@ -920,23 +943,27 @@
</para>
<para>The following example shows a sample
configuration</para>
<programlisting>
- <tx-connection-factory>
- <jndi-name>RemoteJmsXA</jndi-name>
- <xa-transaction/>
- <rar-name>hornetq-ra.rar</rar-name>
-
<connection-definition>org.hornetq.ra.HornetQRAConnectionFactory</connection-definition>
- <config-property name="SessionDefaultType"
type="java.lang.String">javax.jms.Topic</config-property>
- <config-property name="ConnectorClassName"
type="java.lang.String">org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</config-property>
- <config-property name="ConnectionParameters"
type="java.lang.String">host=127.0.0.1;port=5446</config-property>
- <max-pool-size>20</max-pool-size>
- </tx-connection-factory>
+<tx-connection-factory>
+ <jndi-name>RemoteJmsXA</jndi-name>
+ <xa-transaction/>
+ <rar-name>hornetq-ra.rar</rar-name>
+
<connection-definition>org.hornetq.ra.HornetQRAConnectionFactory</connection-definition>
+ <config-property name="SessionDefaultType"
type="java.lang.String">javax.jms.Topic</config-property>
+ <config-property name="ConnectorClassName"
type="java.lang.String">org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</config-property>
+ <config-property name="ConnectionParameters"
type="java.lang.String">host=127.0.0.1;port=5446</config-property>
+ <max-pool-size>20</max-pool-size>
+</tx-connection-factory>
</programlisting>
<para>Again you will see that this uses the netty connector type
and will connect to the HornetQ server
running on localhost and listening on port 5446. JEE components can
access this by using JNDI and looking
up the connection factory using JNDI using
<literal>java:/RemoteJmsXA</literal>, you can see that this
is defined under the<literal>jndi-name</literal>
attribute. You will also note that the outgoing connection
- will be created by the resource adaptor configured under the directory
<literal>hornetq-ra.rar</literal> as explained in the last section.
+ will be created by the resource adaptor configured under the directory
<literal>hornetq-ra.rar</literal>
+ as explained in the last section.
</para>
+ <para>
+ Also if you want to configure multiple connectors do this as a comma
separated list as in the ra configuration.
+ </para>
</section>
<section>
@@ -1020,98 +1047,98 @@
copy it from the HornetQ distribution (again it can be found in the
<literal>hornetq-ra.rar</literal> archive)
and configure it as follows</para>
<programlisting>
- <?xml version="1.0"
encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
- <connector
xmlns="http://java.sun.com/xml/ns/j2ee"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
-
http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"
- version="1.5">
+<connector
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+
http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"
+ version="1.5">
- <description>HornetQ 2.0 Resource Adapter Alternate
Configuration</description>
- <display-name>HornetQ 2.0 Resource Adapter Alternate
Configuration</display-name>
+ <description>HornetQ 2.0 Resource Adapter Alternate
Configuration</description>
+ <display-name>HornetQ 2.0 Resource Adapter Alternate
Configuration</display-name>
- <vendor-name>Red Hat Middleware
LLC</vendor-name>
- <eis-type>JMS 1.1 Server</eis-type>
-
<resourceadapter-version>1.0</resourceadapter-version>
+ <vendor-name>Red Hat Middleware LLC</vendor-name>
+ <eis-type>JMS 1.1 Server</eis-type>
+ <resourceadapter-version>1.0</resourceadapter-version>
- <license>
- <description>
- Copyright 2009 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.
- </description>
-
<license-required>true</license-required>
- </license>
+ <license>
+ <description>
+Copyright 2009 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.
+ </description>
+ <license-required>true</license-required>
+ </license>
- <resourceadapter>
-
<resourceadapter-class>org.hornetq.ra.HornetQResourceAdapter</resourceadapter-class>
- <config-property>
- <description>The transport
type</description>
-
<config-property-name>ConnectorClassName</config-property-name>
-
<config-property-type>java.lang.String</config-property-type>
-
<config-property-value>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</config-property-value>
- </config-property>
- <config-property>
- <description>The transport configuration.
These values must be in the form of key=val;key=val;</description>
-
<config-property-name>ConnectionParameters</config-property-name>
-
<config-property-type>java.lang.String</config-property-type>
- <emphasis role="bold">
<config-property-value>host=127.0.0.1;port=5445</config-property-value></emphasis>
- </config-property>
+ <resourceadapter>
+
<resourceadapter-class>org.hornetq.ra.HornetQResourceAdapter</resourceadapter-class>
+ <config-property>
+ <description>The transport type</description>
+
<config-property-name>ConnectorClassName</config-property-name>
+
<config-property-type>java.lang.String</config-property-type>
+
<config-property-value>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</config-property-value>
+ </config-property>
+ <config-property>
+ <description>The transport configuration. These values must be in the
form of key=val;key=val;</description>
+
<config-property-name>ConnectionParameters</config-property-name>
+
<config-property-type>java.lang.String</config-property-type>
+ <emphasis role="bold">
<config-property-value>host=127.0.0.1;port=5445</config-property-value></emphasis>
+ </config-property>
- <outbound-resourceadapter>
- <connection-definition>
-
<managedconnectionfactory-class>org.hornetq.ra.HornetQRAManagedConnectionFactory</managedconnectionfactory-class>
+ <outbound-resourceadapter>
+ <connection-definition>
+
<managedconnectionfactory-class>org.hornetq.ra.HornetQRAManagedConnectionFactory</managedconnectionfactory-class>
- <config-property>
- <description>The default session
type</description>
-
<config-property-name>SessionDefaultType</config-property-name>
-
<config-property-type>java.lang.String</config-property-type>
-
<config-property-value>javax.jms.Queue</config-property-value>
- </config-property>
- <config-property>
- <description>Try to obtain a lock within
specified number of seconds; less than or equal to 0 disable this
functionality</description>
-
<config-property-name>UseTryLock</config-property-name>
-
<config-property-type>java.lang.Integer</config-property-type>
-
<config-property-value>0</config-property-value>
- </config-property>
+ <config-property>
+ <description>The default session type</description>
+
<config-property-name>SessionDefaultType</config-property-name>
+
<config-property-type>java.lang.String</config-property-type>
+
<config-property-value>javax.jms.Queue</config-property-value>
+ </config-property>
+ <config-property>
+ <description>Try to obtain a lock within specified number of
seconds; less than or equal to 0 disable this functionality</description>
+
<config-property-name>UseTryLock</config-property-name>
+
<config-property-type>java.lang.Integer</config-property-type>
+ <config-property-value>0</config-property-value>
+ </config-property>
-
<connectionfactory-interface>org.hornetq.ra.HornetQRAConnectionFactory</connectionfactory-interface>
-
<connectionfactory-impl-class>org.hornetq.ra.HornetQRAConnectionFactoryImpl</connectionfactory-impl-class>
-
<connection-interface>javax.jms.Session</connection-interface>
-
<connection-impl-class>org.hornetq.ra.HornetQRASession</connection-impl-class>
- </connection-definition>
-
<transaction-support>XATransaction</transaction-support>
- <authentication-mechanism>
-
<authentication-mechanism-type>BasicPassword</authentication-mechanism-type>
-
<credential-interface>javax.resource.spi.security.PasswordCredential</credential-interface>
- </authentication-mechanism>
-
<reauthentication-support>false</reauthentication-support>
- </outbound-resourceadapter>
+
<connectionfactory-interface>org.hornetq.ra.HornetQRAConnectionFactory</connectionfactory-interface>
+
<connectionfactory-impl-class>org.hornetq.ra.HornetQRAConnectionFactoryImpl</connectionfactory-impl-class>
+
<connection-interface>javax.jms.Session</connection-interface>
+
<connection-impl-class>org.hornetq.ra.HornetQRASession</connection-impl-class>
+ </connection-definition>
+ <transaction-support>XATransaction</transaction-support>
+ <authentication-mechanism>
+
<authentication-mechanism-type>BasicPassword</authentication-mechanism-type>
+
<credential-interface>javax.resource.spi.security.PasswordCredential</credential-interface>
+ </authentication-mechanism>
+ <reauthentication-support>false</reauthentication-support>
+ </outbound-resourceadapter>
- <inbound-resourceadapter>
- <messageadapter>
- <messagelistener>
-
<messagelistener-type>javax.jms.MessageListener</messagelistener-type>
- <activationspec>
-
<activationspec-class>org.hornetq.ra.inflow.HornetQActivationSpec</activationspec-class>
- <required-config-property>
-
<config-property-name>destination</config-property-name>
- </required-config-property>
- </activationspec>
- </messagelistener>
- </messageadapter>
- </inbound-resourceadapter>
+ <inbound-resourceadapter>
+ <messageadapter>
+ <messagelistener>
+
<messagelistener-type>javax.jms.MessageListener</messagelistener-type>
+ <activationspec>
+
<activationspec-class>org.hornetq.ra.inflow.HornetQActivationSpec</activationspec-class>
+ <required-config-property>
+
<config-property-name>destination</config-property-name>
+ </required-config-property>
+ </activationspec>
+ </messagelistener>
+ </messageadapter>
+ </inbound-resourceadapter>
- </resourceadapter>
- </connector>
+ </resourceadapter>
+</connector>
</programlisting>
<para>The important part of this configuration is the part in
bold, i.e.
<config-property-value>host=127.0.0.1;port=5445</config-property-value>.
@@ -1131,24 +1158,24 @@
(in fact you can call this anything you want as long as it ends in
<literal>-ds.xml</literal>). Then
add the following:</para>
<programlisting>
- <connection-factories>
- <!--
- JMS XA Resource adapter, use this for outbound JMS connections.
- Inbound connections are defined at the @MDB activation or at the
resource-adapter properties.
- -->
- <tx-connection-factory>
- <jndi-name>RemoteJmsXA</jndi-name>
- <xa-transaction/>
- <rar-name>hornetq-ra.rar</rar-name>
-
<connection-definition>org.hornetq.ra.HornetQRAConnectionFactory</connection-definition>
- <config-property name="SessionDefaultType"
type="java.lang.String">javax.jms.Topic</config-property>
- <config-property name="ConnectorClassName"
type="java.lang.String">org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</config-property>
- <config-property name="ConnectionParameters"
type="java.lang.String">host=127.0.0.1;port=5445</config-property>
- <max-pool-size>20</max-pool-size>
- </tx-connection-factory>
+<connection-factories>
+ <!--
+ JMS XA Resource adapter, use this for outbound JMS connections.
+ Inbound connections are defined at the @MDB activation or at the resource-adapter
properties.
+ -->
+ <tx-connection-factory>
+ <jndi-name>RemoteJmsXA</jndi-name>
+ <xa-transaction/>
+ <rar-name>hornetq-ra.rar</rar-name>
+
<connection-definition>org.hornetq.ra.HornetQRAConnectionFactory</connection-definition>
+ <config-property name="SessionDefaultType"
type="java.lang.String">javax.jms.Topic</config-property>
+ <config-property name="ConnectorClassName"
type="java.lang.String">org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</config-property>
+ <config-property name="ConnectionParameters"
type="java.lang.String">host=127.0.0.1;port=5445</config-property>
+ <max-pool-size>20</max-pool-size>
+ </tx-connection-factory>
- </connection-factories>
+</connection-factories>
</programlisting>
<para>Again you will see that the host and port are configured
here to match the remote HornetQ servers
configuration. The other important attributes are:</para>
@@ -1170,10 +1197,10 @@
<para>The steps to do this are exactly the same as for JBoss 4, you
will have to create a jboss.xml definition
file for your MDB with the following entry</para>
<programlisting>
- <message-driven>
- <ejb-name>MyMDB</ejb-name>
-
<resource-adapter-name>jms-ra.rar</resource-adapter-name>
- </message-driven>
+<message-driven>
+ <ejb-name>MyMDB</ejb-name>
+ <resource-adapter-name>jms-ra.rar</resource-adapter-name>
+ </message-driven>
</programlisting>
<para>Also you will need to edit the
<literal>standardjboss.xml</literal> and uncomment the section with the
following 'Uncomment to use JMS message inflow from jmsra.rar' and
then comment out the invoker-proxy-binding
@@ -1226,6 +1253,7 @@
<property
name="com.arjuna.ats.jta.recovery.XAResourceRecovery.HornetQ1"
value="org.hornetq.jms.server.recovery.HornetQXAResourceRecovery;[connection
configuration]"/>
+ <property name="com.arjuna.ats.jta.xaRecoveryNode"
value="1"/>
</properties>
</programlisting>
<para>The <literal>[connection configuration]</literal>
contains all the information
@@ -1255,6 +1283,9 @@
parameters).</para>
</listitem>
</itemizedlist>
+ <para>Also note the
<literal>com.arjuna.ats.jta.xaRecoveryNode</literal> parameter. If you want
recovery
+ enabled then this must be configured to what ever the tx node id is set to,
this is configured in the
+ same file by the
<literal>com.arjuna.ats.arjuna.xa.nodeIdentifier</literal>
property.</para>
<note>
<para>HornetQ must have a valid acceptor which corresponds to the
connector
specified in
<literal>conf/jbossts-properties.xml</literal>.</para>
@@ -1293,8 +1324,8 @@
<para>If the recovery must use <literal>admin,
adminpass</literal>, the
configuration would have been:</para>
<programlisting>
- <property
name="com.arjuna.ats.jta.recovery.XAResourceRecovery.HORNETQ1"
-
value="org.hornetq.jms.server.recovery.HornetQXAResourceRecovery;org.hornetq.core.remoting.impl.netty.NettyConnectorFactory,
admin, adminpass, port=8888"/>
+<property
name="com.arjuna.ats.jta.recovery.XAResourceRecovery.HORNETQ1"
+
value="org.hornetq.jms.server.recovery.HornetQXAResourceRecovery;org.hornetq.core.remoting.impl.netty.NettyConnectorFactory,
admin, adminpass, port=8888"/>
</programlisting>
<para>Configuring HornetQ with an invm acceptor and configuring the
Recovery Manager
with an invm connector is the recommended way to enable XA
Recovery.</para>
Modified: branches/Branch_2_2_EAP/docs/user-manual/en/clusters.xml
===================================================================
--- branches/Branch_2_2_EAP/docs/user-manual/en/clusters.xml 2011-03-08 15:07:51 UTC (rev
10305)
+++ branches/Branch_2_2_EAP/docs/user-manual/en/clusters.xml 2011-03-08 15:32:17 UTC (rev
10306)
@@ -95,16 +95,18 @@
broadcast-groups</literal> element.</para>
<para>Let's take a look at an example broadcast group from <literal
hornetq-configuration.xml</literal>:</para>
-
<programlisting><broadcast-groups>
- <broadcast-group name="my-broadcast-group">
- <local-bind-address>172.16.9.3</local-bind-address>
- <local-bind-port>5432</local-bind-port>
- <group-address>231.7.7.7</group-address>
- <group-port>9876</group-port>
- <broadcast-period>2000</broadcast-period>
- <connector-ref connector-name="netty-connector"/>
- </broadcast-group>
- </broadcast-groups></programlisting>
+ <programlisting>
+<broadcast-groups>
+ <broadcast-group name="my-broadcast-group">
+ <local-bind-address>172.16.9.3</local-bind-address>
+ <local-bind-port>5432</local-bind-port>
+ <group-address>231.7.7.7</group-address>
+ <group-port>9876</group-port>
+ <broadcast-period>2000</broadcast-period>
+ <connector-ref connector-name="netty-connector"/>
+ </broadcast-group>
+</broadcast-groups>
+ </programlisting>
<para>Some of the broadcast group parameters are optional and
you'll normally use the
defaults, but we specify them all in the above example for clarity.
Let's discuss
each one in turn:</para>
@@ -185,14 +187,16 @@
groups must be defined inside a
<literal>discovery-groups</literal> element. There
can be many discovery groups defined by HornetQ server. Let's
look at an
example:</para>
- <programlisting><discovery-groups>
- <discovery-group name="my-discovery-group">
- <local-bind-address>172.16.9.7</local-bind-address>
- <group-address>231.7.7.7</group-address>
- <group-port>9876</group-port>
- <refresh-timeout>10000</refresh-timeout>
- </discovery-group>
- </discovery-groups></programlisting>
+ <programlisting>
+<discovery-groups>
+ <discovery-group name="my-discovery-group">
+ <local-bind-address>172.16.9.7</local-bind-address>
+ <group-address>231.7.7.7</group-address>
+ <group-port>9876</group-port>
+ <refresh-timeout>10000</refresh-timeout>
+ </discovery-group>
+</discovery-groups>
+ </programlisting>
<para>We'll consider each parameter of the discovery
group:</para>
<itemizedlist>
<listitem>
@@ -240,12 +244,14 @@
discovery group to use for your JMS connection factory in the
server side xml
configuration <literal>hornetq-jms.xml</literal>.
Let's take a look at an
example:</para>
- <programlisting><connection-factory
name="ConnectionFactory">
- <discovery-group-ref
discovery-group-name="my-discovery-group"/>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory></programlisting>
+ <programlisting>
+<connection-factory name="ConnectionFactory">
+ <discovery-group-ref
discovery-group-name="my-discovery-group"/>
+ <entries>
+ <entry name="ConnectionFactory"/>
+ </entries>
+</connection-factory>
+ </programlisting>
<para>The element
<literal>discovery-group-ref</literal> specifies the name of a
discovery group defined in
<literal>hornetq-configuration.xml</literal>.</para>
<para>When this connection factory is downloaded from JNDI by a
client application
@@ -256,16 +262,18 @@
- you're instantiating the JMS connection factory directly
then you can specify
the discovery group parameters directly when creating the JMS
connection
factory. Here's an
- example:<programlisting>final String groupAddress =
"231.7.7.7";
+ example:<programlisting>
+final String groupAddress = "231.7.7.7";
- final int groupPort = 9876;
+final int groupPort = 9876;
- ConnectionFactory jmsConnectionFactory =
- HornetQJMSClient.createConnectionFactory(new
DiscoveryGroupConfiguration(groupAddress, groupPort), , JMSFactoryType.CF);
+ConnectionFactory jmsConnectionFactory =
+ HornetQJMSClient.createConnectionFactory(new
DiscoveryGroupConfiguration(groupAddress, groupPort), , JMSFactoryType.CF);
- Connection jmsConnection1 = jmsConnectionFactory.createConnection();
+Connection jmsConnection1 = jmsConnectionFactory.createConnection();
- Connection jmsConnection2 =
jmsConnectionFactory.createConnection();</programlisting></para>
+Connection jmsConnection2 = jmsConnectionFactory.createConnection();
+ </programlisting></para>
<para>The <literal>refresh-timeout</literal> can be
set directly on the DiscoveryGroupConfiguration
by using the setter method
<literal>setDiscoveryRefreshTimeout()</literal> if you
want to change the default value.</para>
@@ -284,11 +292,11 @@
discovery group parameters directly when creating the session
factory. Here's an
example:
<programlisting>
- final String groupAddress = "231.7.7.7";
- final int groupPort = 9876;
- SessionFactory factory =
HornetQClient.createClientSessionFactory(new DiscoveryGroupConfiguration(groupAddress,
groupPort));
- ClientSession session1 = factory.createClientSession(...);
ClientSession
- session2 = factory.createClientSession(...);
+final String groupAddress = "231.7.7.7";
+final int groupPort = 9876;
+SessionFactory factory = HornetQClient.createClientSessionFactory(new
DiscoveryGroupConfiguration(groupAddress, groupPort));
+ClientSession session1 = factory.createClientSession(...); ClientSession
+session2 = factory.createClientSession(...);
</programlisting></para>
<para>The <literal>refresh-timeout</literal> can be
set directly on the DiscoveryGroupConfiguration
@@ -330,16 +338,17 @@
configuration <literal>hornetq-jms.xml</literal>.
Let's take a look at an
example:</para>
<programlisting>
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- <connector-ref connector-name="netty-connector2"/>
- <connector-ref connector-name="netty-connector3"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory></programlisting>
+<connection-factory name="ConnectionFactory">
+ <connectors>
+ <connector-ref connector-name="netty-connector"/>
+ <connector-ref connector-name="netty-connector2"/>
+ <connector-ref connector-name="netty-connector3"/>
+ </connectors>
+ <entries>
+ <entry name="ConnectionFactory"/>
+ </entries>
+</connection-factory>
+ </programlisting>
<para>
The element <literal>connectors</literal> contains a
list of pre defined connectors in the
<literal>hornetq-configuration.xml</literal> file.
When this connection factory is downloaded
@@ -352,34 +361,34 @@
the JMS connection factory. Here's an example:
</para>
<programlisting>
- HashMap<String, Object> map = new HashMap<String, Object>();
- map.put("host", "myhost");
- map.put("port", "5445");
- TransportConfiguration server1 = new
TransportConfiguration(NettyConnectorFactory.class.getName(), map);
- HashMap<String, Object> map2 = new HashMap<String, Object>();
- map2.put("host", "myhost2");
- map2.put("port", "5446");
- TransportConfiguration server2 = new
TransportConfiguration(NettyConnectorFactory.class.getName(), map2);
+HashMap<String, Object> map = new HashMap<String, Object>();
+map.put("host", "myhost");
+map.put("port", "5445");
+TransportConfiguration server1 = new
TransportConfiguration(NettyConnectorFactory.class.getName(), map);
+HashMap<String, Object> map2 = new HashMap<String, Object>();
+map2.put("host", "myhost2");
+map2.put("port", "5446");
+TransportConfiguration server2 = new
TransportConfiguration(NettyConnectorFactory.class.getName(), map2);
- HornetQConnectionFactory cf =
HornetQJMSClient.createConnectionFactoryWithHA(JMSFactoryType.CF, server1, server2);
+HornetQConnectionFactory cf =
HornetQJMSClient.createConnectionFactoryWithHA(JMSFactoryType.CF, server1, server2);
</programlisting>
</section>
<section>
<title>Configuring client discovery using
JMS</title>
<para>If you are using the core API then the same can be
done as follows:</para>
<programlisting>
- HashMap<String, Object> map = new HashMap<String, Object>();
- map.put("host", "myhost");
- map.put("port", "5445");
- TransportConfiguration server1 = new
TransportConfiguration(NettyConnectorFactory.class.getName(), map);
- HashMap<String, Object> map2 = new HashMap<String, Object>();
- map2.put("host", "myhost2");
- map2.put("port", "5446");
- TransportConfiguration server2 = new
TransportConfiguration(NettyConnectorFactory.class.getName(), map2);
+HashMap<String, Object> map = new HashMap<String, Object>();
+map.put("host", "myhost");
+map.put("port", "5445");
+TransportConfiguration server1 = new
TransportConfiguration(NettyConnectorFactory.class.getName(), map);
+HashMap<String, Object> map2 = new HashMap<String, Object>();
+map2.put("host", "myhost2");
+map2.put("port", "5446");
+TransportConfiguration server2 = new
TransportConfiguration(NettyConnectorFactory.class.getName(), map2);
- ServerLocator locator = HornetQClient.createServerLocatorWithHA(server1, server2);
- ClientSessionFactory factory = locator.createSessionFactory();
- ClientSession session = factory.createSession();
+ServerLocator locator = HornetQClient.createServerLocatorWithHA(server1, server2);
+ClientSessionFactory factory = locator.createSessionFactory();
+ClientSession session = factory.createSession();
</programlisting>
</section>
</section>
@@ -526,18 +535,18 @@
servers for discovery then you can do it like this.
</para>
<programlisting>
- <cluster-connection name="my-cluster">
- <address>jms</address>
- <connector-ref>netty-connector</connector-ref>
- <retry-interval>500</retry-interval>
- <use-duplicate-detection>true</use-duplicate-detection>
-
<forward-when-no-consumers>true</forward-when-no-consumers>
- <max-hops>1</max-hops>
- <static-connectors>
- <connector-ref>server0-connector</connector-ref>
- <connector-ref>server1-connector</connector-ref>
- </static-connectors>
- </cluster-connection>
+<cluster-connection name="my-cluster">
+ <address>jms</address>
+ <connector-ref>netty-connector</connector-ref>
+ <retry-interval>500</retry-interval>
+ <use-duplicate-detection>true</use-duplicate-detection>
+ <forward-when-no-consumers>true</forward-when-no-consumers>
+ <max-hops>1</max-hops>
+ <static-connectors>
+ <connector-ref>server0-connector</connector-ref>
+ <connector-ref>server1-connector</connector-ref>
+ </static-connectors>
+</cluster-connection>
</programlisting>
<para>
Here we have defined 2 servers that we know for sure will that at least
one will be available. There may
@@ -637,17 +646,17 @@
configured as follows:
</para>
<programlisting>
- <cluster-connection name="my-cluster">
- <address>jms</address>
- <connector-ref>netty-connector</connector-ref>
- <retry-interval>500</retry-interval>
- <use-duplicate-detection>true</use-duplicate-detection>
-
<forward-when-no-consumers>true</forward-when-no-consumers>
- <max-hops>1</max-hops>
- <static-connectors allow-direct-connections-only="true">
- <connector-ref>server1-connector</connector-ref>
- </static-connectors>
- </cluster-connection>
+<cluster-connection name="my-cluster">
+ <address>jms</address>
+ <connector-ref>netty-connector</connector-ref>
+ <retry-interval>500</retry-interval>
+ <use-duplicate-detection>true</use-duplicate-detection>
+ <forward-when-no-consumers>true</forward-when-no-consumers>
+ <max-hops>1</max-hops>
+ <static-connectors allow-direct-connections-only="true">
+ <connector-ref>server1-connector</connector-ref>
+ </static-connectors>
+</cluster-connection>
</programlisting>
<para>
In this example we have set the attribute
<literal>allow-direct-connections-only</literal> which means that
@@ -678,7 +687,8 @@
address settings, please see <xref
linkend="queue-attributes"/>.</para>
<para>Here's an address settings snippet from
<literal>hornetq-configuration.xml</literal>
showing how message redistribution is enabled for a set of
queues:</para>
- <programlisting><address-settings>
+ <programlisting>
+ <address-settings>
<address-setting match="jms.#">
<redistribution-delay>0</redistribution-delay>
</address-setting>
Modified: branches/Branch_2_2_EAP/docs/user-manual/en/configuration-index.xml
===================================================================
--- branches/Branch_2_2_EAP/docs/user-manual/en/configuration-index.xml 2011-03-08
15:07:51 UTC (rev 10305)
+++ branches/Branch_2_2_EAP/docs/user-manual/en/configuration-index.xml 2011-03-08
15:32:17 UTC (rev 10306)
@@ -47,6 +47,18 @@
</thead>
<tbody>
<row>
+ <entry><link
linkend="ha.allow-fail-back">allow-failback</link></entry>
+ <entry>Boolean</entry>
+ <entry>Will this server automatically shutdown if the
original live server comes back up</entry>
+ <entry>false</entry>
+ </row>
+ <row>
+ <entry><link
linkend="ha/mode.shared.configuration">backup</link></entry>
+ <entry>Boolean</entry>
+ <entry>Is this server a backup server</entry>
+ <entry>false</entry>
+ </row>
+ <row>
<entry><link
linkend="configuring.bindings.journal"
bindings-directory</link></entry>
<entry>String</entry>
@@ -104,6 +116,12 @@
<entry>true</entry>
</row>
<row>
+ <entry><link
linkend="ha.allow-fail-back">failover-on-shutdown</link></entry>
+ <entry>Boolean</entry>
+ <entry>Will this backup server come live on a normal
server shutdown</entry>
+ <entry>false</entry>
+ </row>
+ <row>
<entry><link
linkend="duplicate.id.cache">id-cache-size</link></entry>
<entry>Integer</entry>
<entry>the size of the cache for pre creating message
id's</entry>
@@ -214,6 +232,12 @@
<entry>org.hornetq</entry>
</row>
<row>
+ <entry>log-delegate-factory-class-name</entry>
+ <entry>String</entry>
+ <entry>todo</entry>
+ <entry>todo</entry>
+ </row>
+ <row>
<entry><link
linkend="large.message.configuring"
large-messages-directory</link></entry>
<entry>String</entry>
@@ -319,6 +343,18 @@
<entry>true</entry>
</row>
<row>
+ <entry>remoting-interceptors</entry>
+ <entry>todo</entry>
+ <entry>todo</entry>
+ <entry>todo</entry>
+ </row>
+ <row>
+ <entry><link
linkend="ha.mode.shared">shared-store</link></entry>
+ <entry>Boolean</entry>
+ <entry>is this server using a shared store for
failover</entry>
+ <entry>false</entry>
+ </row>
+ <row>
<entry><link
linkend="server.scheduled.thread.pool"
scheduled-thread-pool-max-size</link></entry>
<entry>Integer</entry>
Modified: branches/Branch_2_2_EAP/docs/user-manual/en/configuring-transports.xml
===================================================================
--- branches/Branch_2_2_EAP/docs/user-manual/en/configuring-transports.xml 2011-03-08
15:07:51 UTC (rev 10305)
+++ branches/Branch_2_2_EAP/docs/user-manual/en/configuring-transports.xml 2011-03-08
15:32:17 UTC (rev 10306)
@@ -143,8 +143,10 @@
"org.hornetq.core.remoting.impl.netty.NettyConnectorFactory",
connectionParams);
-ClientSessionFactory sessionFactory =
HornetQClient.createClientSessionFactory(transportConfiguration);
+ServerLocator locator =
HornetQClient.createServerLocatorWithoutHA(transportConfiguration);
+ClientSessionFactory sessionFactory = locator.createClientSessionFactory();
+
ClientSession session = sessionFactory.createSession(...);
etc
@@ -162,7 +164,7 @@
"org.hornetq.core.remoting.impl.netty.NettyConnectorFactory",
connectionParams);
-ConnectionFactory connectionFactory =
HornetQJMSClient.createConnectionFactory(transportConfiguration);
+ConnectionFactory connectionFactory =
HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF,
transportConfiguration);
Connection jmsConnection = connectionFactory.createConnection();
Modified: branches/Branch_2_2_EAP/docs/user-manual/en/connection-ttl.xml
===================================================================
--- branches/Branch_2_2_EAP/docs/user-manual/en/connection-ttl.xml 2011-03-08 15:07:51 UTC
(rev 10305)
+++ branches/Branch_2_2_EAP/docs/user-manual/en/connection-ttl.xml 2011-03-08 15:32:17 UTC
(rev 10306)
@@ -34,13 +34,16 @@
<para>Here's an example of a well behaved core client application
closing its session and
session factory in a finally block:</para>
<programlisting>
+ServerLocator locator = null;
ClientSessionFactory sf = null;
ClientSession session = null;
try
{
- sf = HornetQClient.createClientSessionFactory(...);
+ locator = HornetQClient.createServerLocatorWithoutHA(..);
+ sf = locator.createClientSessionFactory();;
+
session = sf.createSession(...);
... do some stuff with the session...
@@ -56,6 +59,11 @@
{
sf.close();
}
+
+ if(locator != null)
+ {
+ locator.close();
+ }
}
</programlisting>
<para>And here's an example of a well behaved JMS client
application:</para>
@@ -64,7 +72,7 @@
try
{
- ConnectionFactory jmsConnectionFactory =
HornetQJMSClient.createConnectionFactory(...);
+ ConnectionFactory jmsConnectionFactory =
HornetQJMSClient.createConnectionFactoryWithoutHA(...);
jmsConnection = jmsConnectionFactory.createConnection();
Modified: branches/Branch_2_2_EAP/docs/user-manual/en/core-bridges.xml
===================================================================
--- branches/Branch_2_2_EAP/docs/user-manual/en/core-bridges.xml 2011-03-08 15:07:51 UTC
(rev 10305)
+++ branches/Branch_2_2_EAP/docs/user-manual/en/core-bridges.xml 2011-03-08 15:32:17 UTC
(rev 10306)
@@ -60,6 +60,7 @@
org.hornetq.jms.example.HatColourChangeTransformer
</transformer-class-name>
<retry-interval>1000</retry-interval>
+ <ha>true</ha>
<retry-interval-multiplier>1.0</retry-interval-multiplier>
<reconnect-attempts>-1</reconnect-attempts>
<failover-on-server-shutdown>false</failover-on-server-shutdown>
@@ -117,6 +118,12 @@
it.</para>
</listitem>
<listitem>
+ <para><literal>ha</literal>. This optional parameter
determines whether or not this
+ bridge should support high availability. True means it will connect to
any available
+ server in a cluster and support failover. The default value is
<literal
+ >false</literal>.</para>
+ </listitem>
+ <listitem>
<para><literal>retry-interval</literal>. This optional
parameter determines the
period in milliseconds between subsequent reconnection attempts, if
the
connection to the target server has failed. The default value is
<literal
Modified: branches/Branch_2_2_EAP/docs/user-manual/en/examples.xml
===================================================================
--- branches/Branch_2_2_EAP/docs/user-manual/en/examples.xml 2011-03-08 15:07:51 UTC (rev
10305)
+++ branches/Branch_2_2_EAP/docs/user-manual/en/examples.xml 2011-03-08 15:32:17 UTC (rev
10306)
@@ -37,6 +37,10 @@
directory and type <literal>./build.sh</literal> (or
<literal>build.bat</literal> if you
are on Windows).</para>
<para>Here's a listing of the examples with a brief
description.</para>
+ <section id="examples.applet">
+ <title>Applet</title>
+ <para>This example shows you how to send and receive JMS messages from
an Applet.</para>
+ </section>
<section id="application-level-failover">
<title>Application-Layer Failover</title>
<para>HornetQ also supports Application-Layer failover, useful in the
case that
@@ -85,6 +89,10 @@
be created to different nodes of the cluster. In other words it
demonstrates how
HornetQ does client-side load-balancing of sessions across the
cluster.</para>
</section>
+ <section id="examples.clustered.durable">
+ <title>Clustered Durable Subscription</title>
+ <para>This example demonstrates a clustered JMS durable
subscription</para>
+ </section>
<section id="examples.clustered.grouping">
<title>Clustered Grouping</title>
<para>This is similar to the message grouping example except that it
demonstrates it
@@ -100,12 +108,6 @@
consumers receive the sent messages in a round-robin
fashion.</para>
</section>
<section>
- <title>Static Clustered Queue</title>
- <para>The <literal>static-clustered-queue</literal> example
demonstrates a JMS queue deployed
- on two different nodes. Conversely to the
<literal>clustered-queue</literal> example which uses
- UDP to create the cluster, this example uses a list of static connectors
for each cluster node.</para>
- </section>
- <section>
<title>Clustered Standalone</title>
<para>The <literal>clustered-standalone</literal> example
demonstrates how to configure
and starts 3 cluster nodes on the same machine to form a cluster. A
subscriber for a
@@ -113,6 +115,16 @@
nodes. We then send some messages via the producer, and we verify that
the 3
subscribers receive all the sent messages.</para>
</section>
+ <section id="examples.clustered.static.discovery">
+ <title>Clustered Static Discovery</title>
+ <para>This example demonstrates how to configure a cluster using a list
of connectors rather
+ than UDP for discovery</para>
+ </section>
+ <section id="examples.clustered.static.oneway">
+ <title>Clustered Static Cluster One Way</title>
+ <para>This example demonstrates how to set up a cluster where cluster
connections are one way,
+ i.e. server A -> Server B -> Server C</para>
+ </section>
<section>
<title>Clustered Topic</title>
<para>The <literal>clustered-topic</literal> example
demonstrates a JMS topic deployed
@@ -172,15 +184,31 @@
Note that for the messages to be persisted, the messages sent to them
must be marked
as durable messages. </para>
</section>
- <section id="examples.embedded.jms.simple">
- <title>Embedded Simple</title>
- <para>The <literal>embedded</literal> example shows how to
embed JMS within your own code using regular HornetQ XML files.</para>
- </section>
<section id="examples.embedded.jms">
<title>Embedded</title>
<para>The <literal>embedded</literal> example shows how to
embed JMS
within your own code using POJO instantiation and no config
files.</para>
</section>
+ <section id="examples.embedded.jms.simple">
+ <title>Embedded Simple</title>
+ <para>The <literal>embedded</literal> example shows how to
embed JMS within your own code using regular HornetQ XML files.</para>
+ </section>
+ <section id="examples.expiry">
+ <title>Message Expiration</title>
+ <para>The <literal>expiry</literal> example shows you how
to define and deal with
+ message expiration. Messages can be retained in the messaging system for
a limited
+ period of time before being removed. JMS specification states that
clients should
+ not receive messages that have been expired (but it does not guarantee
this will not
+ happen).</para>
+ <para>HornetQ can assign an expiry address to a given queue so that
when messages
+ are expired, they are removed from the queue and sent to the expiry
address.
+ These "expired" messages can later be consumed from the expiry
address for
+ further inspection.</para>
+ </section>
+ <section id="examples.failover.manual.stop">
+ <title>Failover Manual Stop</title>
+ <para>This examples shows how to stop the server manually and cause
failover</para>
+ </section>
<section>
<title>HTTP Transport</title>
<para>The <literal>http-transport</literal> example shows
you how to configure HornetQ
@@ -237,16 +265,6 @@
<para>A typical example for last-value queue is for stock prices, where
you are only
interested by the latest price for a particular stock.</para>
</section>
- <section>
- <title>Load Balanced Clustered Queue</title>
- <para>The <literal>clustered-queue</literal> example
demonstrates a JMS queue deployed
- on two different nodes. The two nodes are configured to form a
cluster.</para>
- <para>We then create a consumer on the queue on each node, and we
create a producer on
- only one of the nodes. We then send some messages via the producer, and
we verify
- that both consumers receive the sent messages in a round-robin
fashion.</para>
- <para>In other words, HornetQ load balances the sent messages across
all consumers on
- the cluster</para>
- </section>
<section id="examples.management">
<title>Management</title>
<para>The <literal>management</literal> example shows how
to manage HornetQ using JMS
@@ -265,18 +283,6 @@
<para>The <literal>message-counters</literal> example shows
you how to use message
counters to obtain message information for a JMS queue.</para>
</section>
- <section id="examples.expiry">
- <title>Message Expiration</title>
- <para>The <literal>expiry</literal> example shows you how
to define and deal with
- message expiration. Messages can be retained in the messaging system for
a limited
- period of time before being removed. JMS specification states that
clients should
- not receive messages that have been expired (but it does not guarantee
this will not
- happen).</para>
- <para>HornetQ can assign an expiry address to a given queue so that
when messages
- are expired, they are removed from the queue and sent to the expiry
address.
- These "expired" messages can later be consumed from the expiry
address for
- further inspection.</para>
- </section>
<section id="examples.message-group">
<title>Message Group</title>
<para>The <literal>message-group</literal> example shows
you how to configure and use
@@ -314,6 +320,15 @@
at their destinations. Please consult the JMS 1.1 specification for full
details.</para>
</section>
+ <section id="examples.multiple.failover">
+ <title>Multiple Failover</title>
+ <para>This example demonstrates how to set up a live server with
multiple backups</para>
+ </section>
+ <section id="examples.multiple.failover.failback">
+ <title>Multiple Failover Failback</title>
+ <para>This example demonstrates how to set up a live server with
multiple backups but
+ forcing failover back to the original live server</para>
+ </section>
<section id="examples.no-consumer-buffering">
<title>No Consumer Buffering</title>
<para>By default, HornetQ consumers buffer messages from the server in
a client side
@@ -481,14 +496,14 @@
selectively consume messages using message selectors with topic
consumers.</para>
</section>
<section id="examples.transaction-failover">
- <title>Transaction Failover With Data Replication</title>
+ <title>Transaction Failover</title>
<para>The <literal>transaction-failover</literal> example
demonstrates two servers coupled
as a live-backup pair for high availability (HA), and a client using a
transacted JMS
session failing over from live to backup when the live server is
crashed.</para>
<para>HornetQ implements failover of client connections between
- live and backup servers. This is implemented by the replication of data
between
- live and backup nodes. When replication is configured and a live node
crashes, the
+ live and backup servers. This is implemented by the sharing of a journal
between the
+ servers. When a live node crashes, the
client connections can carry and continue to send and consume messages.
When transacted
sessions are used, once and only once message delivery is
guaranteed.</para>
</section>
@@ -560,7 +575,7 @@
</section>
<section>
<title>MDB (Message Driven Bean)</title>
- <para>A simple example of a message driven bean.</para>
+ <para>A simple set of examples of message driven beans, including
failover examples.</para>
</section>
<section>
<title>Servlet Transport</title>
Modified: branches/Branch_2_2_EAP/docs/user-manual/en/ha.xml
===================================================================
--- branches/Branch_2_2_EAP/docs/user-manual/en/ha.xml 2011-03-08 15:07:51 UTC (rev
10305)
+++ branches/Branch_2_2_EAP/docs/user-manual/en/ha.xml 2011-03-08 15:32:17 UTC (rev
10306)
@@ -33,7 +33,7 @@
<para>HornetQ allows servers to be linked together as <emphasis>live
-
backup</emphasis> groups where each live server can have 1 or more
backup servers.
A backup server is owned by only one live server. Backup servers are not
operational until
- failover occurs, however 1 chosen backup will be in passive mode announces
its status and waiting to take
+ failover occurs, however 1 chosen backup, which will be in passive mode,
announces its status and waits to take
over the live servers work</para>
<para>Before failover, only the live server is serving the HornetQ clients
while the backup
servers remain passive or awaiting to become a backup server. When a live
server crashes or is brought down
@@ -84,23 +84,26 @@
<para>To configure the live and backup servers to share their
store, configure
all
<literal>hornetq-configuration.xml</literal>:</para>
<programlisting>
- <shared-store>true<shared-store>
+<shared-store>true<shared-store>
</programlisting>
<para>Additionally, each backup server must be flagged
explicitly as a
backup:</para>
<programlisting>
- <backup>true</backup>
+<backup>true</backup>
</programlisting>
<para>In order for live - backup groups to operate properly
with a shared store,
both servers must have configured the location of journal
directory to point
to the <emphasis>same shared location</emphasis> (as
explained in <xref
linkend="configuring.message.journal"/>)</para>
+ <note>
+ <para>todo write something about GFS</para>
+ </note>
<para>Also each node, live and backups, will need to have a
cluster connection defined even if not
part of a cluster. The Cluster Connection info defines how backup
servers announce there presence
to it's live server or any other nodes in the cluster. refer
to <xref linkend="clusters"/> for details
on how this is done.</para>
</section>
- <section>
+ <section id="ha.allow-fail-back">
<title>Failing Back to live Server</title>
<para>After a live server has failed and a backup taken has
taken over its duties, you may want to
restart the live server and have clients fail back. To do this
simply restart the original live
@@ -112,7 +115,7 @@
configuration file like so:
</para>
<programlisting>
-
<failover-on-shutdown>true</failover-on-shutdown>
+<failover-on-shutdown>true</failover-on-shutdown>
</programlisting>
<para>
By default this is set to false, if by some chance you have set
this to false but still
@@ -125,7 +128,7 @@
<literal>hornetq-configuration.xml</literal>
configuration file as follows:
</para>
<programlisting>
- <allow-failback>true</allow-failback>
+<allow-failback>true</allow-failback>
</programlisting>
</section>
</section>
@@ -189,16 +192,6 @@
<literal>initial-connect-attempts</literal> in xml. The
default for this is <literal>0</literal>, that
is try only once. Once the number of attempts has been made an
exception will be thrown.
</para>
- <para>
- Similarly, when a cluster topology changed, i.e. a live server
crashes and a backup becomes live,
- there is a window where the topology has changes but the client has
yet to be notified. Again as
- above the client will try an initial number of connect attempts with
the live server but after that
- it is possible to try to connect to the backup server (if the client
knows of it). To do this
- set the property
<literal>FailoverOnInitialConnection</literal>, or
<literal>failover-on-initial-connection</literal>
- in xml, on the
<literal>ClientSessionFactoryImpl</literal> or
<literal>HornetQConnectionFactory</literal>.
- The default value for this parameter is
<literal>false</literal>. The client will use the property
- reconnect attempts to decide how many times to try the backup
server.
- </para>
</section>
<para>For examples of automatic failover with transacted and
non-transacted JMS
sessions, please see <xref
linkend="examples.transaction-failover"/> and <xref
Modified: branches/Branch_2_2_EAP/docs/user-manual/en/interoperability.xml
===================================================================
--- branches/Branch_2_2_EAP/docs/user-manual/en/interoperability.xml 2011-03-08 15:07:51
UTC (rev 10305)
+++ branches/Branch_2_2_EAP/docs/user-manual/en/interoperability.xml 2011-03-08 15:32:17
UTC (rev 10306)
@@ -35,11 +35,11 @@
you must configure a <literal>NettyAcceptor</literal> with a
<literal>protocol</literal>
parameter set to <literal>stomp</literal>:</para>
<programlisting>
- <acceptor name="stomp-acceptor">
- <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
- <param key="protocol" value="stomp"/>
- <param key="port" value="61613"/>
- </acceptor>
+<acceptor name="stomp-acceptor">
+
<factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+ <param key="protocol" value="stomp"/>
+ <param key="port" value="61613"/>
+</acceptor>
</programlisting>
<para>With this configuration, HornetQ will accept Stomp connections on
the port <literal>61613</literal> (which is the default port of
the Stomp brokers).</para>
Modified: branches/Branch_2_2_EAP/docs/user-manual/en/large-messages.xml
===================================================================
--- branches/Branch_2_2_EAP/docs/user-manual/en/large-messages.xml 2011-03-08 15:07:51 UTC
(rev 10305)
+++ branches/Branch_2_2_EAP/docs/user-manual/en/large-messages.xml 2011-03-08 15:32:17 UTC
(rev 10306)
@@ -70,10 +70,13 @@
<title>Using Core API</title>
<para>If the HornetQ Core API is used, the minimal large message size
is specified by
<literal>ClientSessionFactory.setMinLargeMessageSize</literal>.</para>
- <programlisting>ClientSessionFactory factory =
- HornetQClient.createClientSessionFactory(new
- TransportConfiguration(NettyConnectorFactory.class.getName()), null);
-factory.setMinLargeMessageSize(25 * 1024);</programlisting>
+ <programlisting>
+ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new
TransportConfiguration(NettyConnectorFactory.class.getName()))
+
+locator.setMinLargeMessageSize(25 * 1024);
+
+ClientSessionFactory factory = HornetQClient.createClientSessionFactory();
+ </programlisting>
<para><xref
linkend="configuring-transports.client.side"/> will provide more information
on how to instantiate the session factory.</para>
</section>
Modified: branches/Branch_2_2_EAP/docs/user-manual/en/project-info.xml
===================================================================
--- branches/Branch_2_2_EAP/docs/user-manual/en/project-info.xml 2011-03-08 15:07:51 UTC
(rev 10305)
+++ branches/Branch_2_2_EAP/docs/user-manual/en/project-info.xml 2011-03-08 15:32:17 UTC
(rev 10306)
@@ -72,21 +72,14 @@
</para>
<para>Red Hat kindly employs developers to work full time on HornetQ, they
are: <itemizedlist>
<listitem>
- <para>
- <ulink url="http://jbossfox.blogspot.com">Tim
Fox</ulink> (project lead)</para>
+ <para>Clebert Suconic (project lead)</para>
</listitem>
<listitem>
- <para>Howard Gao</para>
+ <para>Andy Taylor</para>
</listitem>
<listitem>
- <para><ulink
url="http://jmesnil.net/weblog/">Jeff
Mesnil</ulink></para>
+ <para>Howard Gao</para>
</listitem>
- <listitem>
- <para>Clebert Suconic</para>
- </listitem>
- <listitem>
- <para>Andy Taylor</para>
- </listitem>
</itemizedlist></para>
<para> And many thanks to all our contributors, both old and new who helped
create HornetQ,
for a full list of the people who made it happen, take a look at our <ulink
Modified: branches/Branch_2_2_EAP/docs/user-manual/en/thread-pooling.xml
===================================================================
--- branches/Branch_2_2_EAP/docs/user-manual/en/thread-pooling.xml 2011-03-08 15:07:51 UTC
(rev 10305)
+++ branches/Branch_2_2_EAP/docs/user-manual/en/thread-pooling.xml 2011-03-08 15:32:17 UTC
(rev 10306)
@@ -116,7 +116,9 @@
<para>To configure a <literal>ClientSessionFactory</literal>
instance to use its own pools,
simply use the appropriate setter methods immediately after creation, for
example:</para>
- <programlisting>ClientSessionFactory myFactory =
HornetQClient.createClientSessionFactory(...);
+ <programlisting>
+ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(...)
+ClientSessionFactory myFactory = locator.createClientSessionFactory();
myFactory.setUseGlobalPools(false);
myFactory.setScheduledThreadPoolMaxSize(10);
myFactory.setThreadPoolMaxSize(-1); </programlisting>
@@ -127,7 +129,8 @@
<para>If you're using JNDI to instantiate
<literal>HornetQConnectionFactory</literal>
instances, you can also set these parameters in the
<literal>hornetq-jms.xml</literal>
file where you describe your connection factory, for example:</para>
- <programlisting><connection-factory
name="ConnectionFactory">
+ <programlisting>
+<connection-factory name="ConnectionFactory">
<connectors>
<connector-ref connector-name="netty"/>
</connectors>
Modified: branches/Branch_2_2_EAP/docs/user-manual/en/using-core.xml
===================================================================
--- branches/Branch_2_2_EAP/docs/user-manual/en/using-core.xml 2011-03-08 15:07:51 UTC
(rev 10305)
+++ branches/Branch_2_2_EAP/docs/user-manual/en/using-core.xml 2011-03-08 15:32:17 UTC
(rev 10306)
@@ -120,13 +120,23 @@
a maximum of one address.</para>
</section>
<section>
+ <title>ServerLocator</title>
+ <para>Clients use <literal>ServerLocator</literal>
instances to create <literal
+ >ClientSessionFactory</literal> instances.
<literal>ServerLocator</literal>
+ instances are used to locate servers and create connections to them.
</para>
+ <para>In JMS terms think of a
<literal>ServerLocator</literal> in the same way you would a
+ JMS Connection Factory</para>
+ <para><literal>ServerLocator</literal> instances are
created using the
+ <literal>HornetQClient</literal> factory class.</para>
+ </section>
+ <section>
<title>ClientSessionFactory</title>
<para>Clients use <literal>ClientSessionFactory</literal>
instances to create <literal
ClientSession</literal> instances.
<literal>ClientSessionFactory</literal>
- instances know
how to connect to the server to create sessions, and are configurable
- with many settings.</para>
+ instances are basically the connection to a server</para>
+ <para> In JMS terms think of them as JMS Connections</para>
<para><literal>ClientSessionFactory</literal> instances are
created using the <literal
- >HornetQClient</literal> factory class.</para>
+ >ServerLocator</literal> class.</para>
</section>
<section>
<title>ClientSession</title>
@@ -178,10 +188,11 @@
<para>Here's a very simple program using the core messaging API to send
and receive a
message:</para>
<programlisting>
-ClientSessionFactory factory = HornetQClient.createClientSessionFactory(
- new TransportConfiguration(
+ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new
TransportConfiguration(
InVMConnectorFactory.class.getName()));
+ClientSessionFactory factory = locator.createClientSessionFactory();
+
ClientSession session = factory.createSession();
session.createQueue("example", "example", true);
Modified: branches/Branch_2_2_EAP/docs/user-manual/en/using-jms.xml
===================================================================
--- branches/Branch_2_2_EAP/docs/user-manual/en/using-jms.xml 2011-03-08 15:07:51 UTC (rev
10305)
+++ branches/Branch_2_2_EAP/docs/user-manual/en/using-jms.xml 2011-03-08 15:32:17 UTC (rev
10306)
@@ -271,7 +271,7 @@
<programlisting>
TransportConfiguration transportConfiguration =
new TransportConfiguration(NettyConnectorFactory.class.getName());
-ConnectionFactory cf = HornetQJMSClient.createConnectionFactory(transportConfiguration);
+ConnectionFactory cf =
HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF,transportConfiguration);
</programlisting>
<para>We also create the JMS Queue object via the HornetQJMSClient Utility
class:</para>
<programlisting>Queue orderQueue =
HornetQJMSClient.createQueue("OrderQueue");</programlisting>