Skip to content

Commit

Permalink
doc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
andytaylor committed Jan 21, 2013
1 parent 93cb198 commit b2cb36c
Show file tree
Hide file tree
Showing 5 changed files with 120 additions and 64 deletions.
64 changes: 47 additions & 17 deletions docs/user-manual/en/clusters.xml
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,8 @@ final String groupAddress = "231.7.7.7";
final int groupPort = 9876;

ConnectionFactory jmsConnectionFactory =
HornetQJMSClient.createConnectionFactory(new DiscoveryGroupConfiguration(groupAddress, groupPort), , JMSFactoryType.CF);
HornetQJMSClient.createConnectionFactory(new DiscoveryGroupConfiguration(groupAddress, groupPort,
new UDPBroadcastGroupConfiguration(groupAddress, groupPort, null, -1)), JMSFactoryType.CF);

Connection jmsConnection1 = jmsConnectionFactory.createConnection();

Expand All @@ -432,7 +433,8 @@ Connection jmsConnection2 = jmsConnectionFactory.createConnection();</programlis
<programlisting>
final String groupAddress = "231.7.7.7";
final int groupPort = 9876;
ServerLocator factory = HornetQClient.createServerLocatorWithHA(new DiscoveryGroupConfiguration(groupAddress, groupPort));
ServerLocator factory = HornetQClient.createServerLocatorWithHA(new DiscoveryGroupConfiguration(groupAddress, groupPort,
new UDPBroadcastGroupConfiguration(groupAddress, groupPort, null, -1))));
ClientSessionFactory factory = locator.createSessionFactory();
ClientSession session1 = factory.createSession();
ClientSession session2 = factory.createSession();</programlisting>
Expand Down Expand Up @@ -567,10 +569,21 @@ ClientSession session = factory.createSession();</programlisting>
&lt;cluster-connections>
&lt;cluster-connection name="my-cluster">
&lt;address>jms&lt;/address>
&lt;check-period>1000&lt;/check-period>
&lt;connection-ttl>5000@lt;/connection-ttl>
&lt;min-large-message-size>50000&lt;/min-large-message-size>
&lt;call-timeout>5000&lt;/call-timeout>
&lt;retry-interval>500&lt;/retry-interval>
&lt;retry-interval-multiplier>1.0&lt;/retry-interval-multiplier>
&lt;max-retry-interval>5000&lt;/max-retry-interval>
&lt;reconnect-attempts>-1&lt;/reconnect-attempts>
&lt;use-duplicate-detection>true&lt;/use-duplicate-detection>
&lt;forward-when-no-consumers>false&lt;/forward-when-no-consumers>
&lt;max-hops>1&lt;/max-hops>
&lt;confirmation-window-size>32000&lt;/confirmation-window-size>
&lt;call-failover-timeout>30000&lt;/call-failover-timeout>
&lt;notification-interval>1000&lt;/notification-interval>
&lt;notification-attempts>2&lt;/notification-attempts>
&lt;discovery-group-ref discovery-group-name="my-discovery-group"/>
&lt;/cluster-connection>
&lt;/cluster-connections></programlisting>
Expand All @@ -596,6 +609,21 @@ ClientSession session = factory.createSession();</programlisting>
one cluster connection, possibly resulting in duplicate deliveries. </para>
<para>This parameter is mandatory.</para>
</listitem>
<listitem>
<para><literal>check-period</literal>. The period (in milliseconds) used to check if the cluster connection
has failed to receive pings from another server</para>
</listitem>
<listitem>
<para><literal>connection-ttl</literal>. This is how long a cluster connection should stay alive if it
stops receiving messages from a specific node in the cluster</para>
</listitem>
<listitem>
<para><literal>min-large-message-size</literal></para>
</listitem>
<listitem>
<para><literal>call-timeout</literal>. When a packet is sent via a cluster connection and is a blocking
call, i.e. for acknowledgements, this is how long it will wait for the reply before throwing an exception</para>
</listitem>
<listitem>
<para><literal>max-retry-interval</literal>. This is how many times a cluster connection should try
to reconnect if the connection fails, -1 means for ever.</para>
Expand All @@ -617,6 +645,12 @@ ClientSession session = factory.createSession();</programlisting>
<para><literal>retry-interval-multiplier</literal>. This is a multiplier used to increase the
<literal>retry-interval</literal> after each reconnect attempt, default is 1.</para>
</listitem>
<listitem>
<para><literal>max-retry-interval</literal>. The maximum delay for retries</para>
</listitem>
<listitem>
<para><literal>reconnect-attempts</literal>. How many attempts should be made to reconnect after failure</para>
</listitem>
<listitem>
<para><literal>use-duplicate-detection</literal>. Internally cluster connections
use bridges to link the nodes, and bridges can be configured to add a
Expand Down Expand Up @@ -678,29 +712,25 @@ ClientSession session = factory.createSession();</programlisting>
connected to this server. This parameter is optional.</para>
</listitem>
<listitem>
<para><literal>discovery-group-ref</literal>. This parameter determines which
discovery group is used to obtain the list of other servers in the cluster
that this cluster connection will make connections to.</para>
</listitem>
<listitem>
<para><literal>connection-ttl</literal>. This is how long a cluster connection should stay alive if it
stops receiving messages from a specific node in the cluster</para>
<para><literal>confirmation-window-size</literal>. The size of the window used for sending confirmations
from the server connected to, default is -1 which is no window.</para>
</listitem>
<listitem>
<para><literal>check-period</literal>. The period (in milliseconds) used to check if the cluster connection
has failed to receive pings from another server</para>
<para><literal>call-failover-timeout</literal>. Similar to <literal>call-timeout</literal> but used
when a call is made during a failover attempt</para>
</listitem>
<listitem>
<para><literal>call-timeout</literal>. When a packet is sent via a cluster connection and is a blocking
call, i.e. for acknowledgements, this is how long it will wait for the reply before throwing an exception</para>
<para><literal>notification-interval</literal>. How often the cluster connection should broadcast itself
when attaching to the cluster</para>
</listitem>
<listitem>
<para><literal>call-failover-timeout</literal>. Similar to <literal>call-timeout</literal> but used
when a call is made during a failover attempt</para>
<para><literal>notification-attempts</literal>. How many times the cluster connection should broadcast itself
when connecting to the cluster</para>
</listitem>
<listitem>
<para><literal>confirmation-window-size</literal>. The size of the window used for sending confirmations
from the server connected to, default is -1 which is no window.</para>
<para><literal>discovery-group-ref</literal>. This parameter determines which
discovery group is used to obtain the list of other servers in the cluster
that this cluster connection will make connections to.</para>
</listitem>
</itemizedlist>
<para>
Expand Down
45 changes: 34 additions & 11 deletions docs/user-manual/en/examples.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@
<para>The <literal>client-kickoff</literal> example shows how to terminate client
connections given an IP address using the JMX management API.</para>
</section>
<section>
<title>Client side failover listener</title>
<para>The <literal>client-side-failoverlistener</literal> example shows how to register a listener to monitor
failover events</para>
</section>
<section>
<title>Client-Side Load-Balancing</title>
<para>The <literal>client-side-load-balancing</literal> example demonstrates how
Expand Down Expand Up @@ -213,9 +218,10 @@
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 id="examples.hornetq-ra-rar">
<title>HornetQ Resource Adapter example</title>
<para>This examples shows how to build the hornetq resource adapteras a rar for deployment in other Application
Server's</para>
</section>
<section>
<title>HTTP Transport</title>
Expand Down Expand Up @@ -416,10 +422,32 @@
retry the connection, and reattach to the server when it becomes available again across
the network.</para>
</section>
<section>
<title>Replicated Failback example</title>
<para>An example showing how failback works when using replication, In this example a live server will replicate
all its Journal to a backup server as it updates it. When the live server crashes the backup takes over
from the live server and the client reconnects and carries on from where it left off.</para>
</section>
<section>
<title>Replicated Failback static example</title>
<para>An example showing how failback works when using replication, but this time with static connectors</para>
</section>
<section>
<title>Replicated multiple failover example</title>
<para>An example showing how to configure multiple backups when using replication</para>
</section>
<section>
<title>Replicated Failover transaction example</title>
<para>An example showing how failover works with a transaction when using replication</para>
</section>
<section>
<title>Request-Reply example</title>
<para>A simple example showing the JMS request-response pattern.</para>
</section>
<section>
<title>Rest example</title>
<para>An example showing how to use the HornetQ Rest API</para>
</section>
<section id="examples.scheduled-message">
<title>Scheduled Message</title>
<para>The <literal>scheduled-message</literal> example shows you how to send a scheduled
Expand Down Expand Up @@ -561,18 +589,13 @@
<section>
<title>Java EE Examples</title>
<para>Most of the Java EE examples can be run the following way. simply cd into the
appropriate example directory and type <literal>ant deploy</literal>. This will create a
new JBoss AS profile and start the server. When the server is started from a different
window type <literal>ant run</literal> to run the example. Some examples require further
steps, please refer to the examples documentation for further instructions.</para>
appropriate example directory and type <literal>mvn test</literal>. This will use Arquillian to run the Application
Server and deploy the application. Note that you must have jboss AS 7 installed and the JBOSS_HOME environment
variable set. Please refer to the examples documentation for further instructions.</para>
<section>
<title>EJB/JMS Transaction</title>
<para>An example that shows using an EJB and JMS together within a transaction.</para>
</section>
<section>
<title>HAJNDI (High Availability)</title>
<para>A simple example demonstrating using JNDI within a cluster.</para>
</section>
<section>
<title>Resource Adapter Configuration</title>
<para>This example demonstrates how to configure several properties on the HornetQ JCA
Expand Down
2 changes: 0 additions & 2 deletions docs/user-manual/en/ha.xml
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,6 @@
.
&lt;cluster-connections>
&lt;cluster-connection name="my-cluster">
&lt;cluster-user>fish&lt;cluster-user>
&lt;cluster-password>ILikeToSwim&lt;cluster-password>
...
&lt;/cluster-connection>
&lt;/cluster-connections></programlisting>
Expand Down
18 changes: 10 additions & 8 deletions docs/user-manual/en/using-jms.xml
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,16 @@ java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces</programlisting
<literal>hornetq-beans.xml</literal> by setting properties on the <literal
>JNDIServer</literal> bean:</para>
<programlisting>
&lt;bean name="JNDIServer" class="org.jnp.server.Main">
&lt;property name="namingInfo">
&lt;inject bean="Naming"/>
&lt;/property>
&lt;property name="port">1099&lt;/property>
&lt;property name="bindAddress">localhost&lt;/property>
&lt;property name="rmiPort">1098&lt;/property>
&lt;property name="rmiBindAddress">localhost&lt;/property>
&lt;bean name="StandaloneServer" class="org.hornetq.jms.server.impl.StandaloneNamingServer">
&lt;constructor>
&lt;parameter>
&lt;inject bean="HornetQServer"/>
&lt;/parameter>
&lt;/constructor>
&lt;property name="port">${jnp.port:1099}&lt;/property>
&lt;property name="bindAddress">${jnp.host:localhost}&lt;/property>
&lt;property name="rmiPort">${jnp.rmiPort:1098}&lt;/property>
&lt;property name="rmiBindAddress">${jnp.host:localhost}&lt;/property>
&lt;/bean></programlisting>
<note>
<para>If you want your JNDI server to be available to non local clients make sure you
Expand Down
55 changes: 29 additions & 26 deletions docs/user-manual/en/using-server.xml
Original file line number Diff line number Diff line change
Expand Up @@ -202,40 +202,27 @@
<para>
<programlisting>
&lt;?xml version="1.0" encoding="UTF-8"?>

&lt;deployment xmlns="urn:jboss:bean-deployer:2.0">
&lt;bean name="Naming" class="org.jnp.server.NamingBeanImpl"/>
&lt;!-- JNDI server. Disable this if you don't want JNDI -->
&lt;bean name="JNDIServer" class="org.jnp.server.Main">
&lt;property name="namingInfo">
&lt;inject bean="Naming"/>
&lt;/property>
&lt;property name="port">1099&lt;/property>
&lt;property name="bindAddress">localhost&lt;/property>
&lt;property name="rmiPort">1098&lt;/property>
&lt;property name="rmiBindAddress">localhost&lt;/property>
&lt;/bean>

&lt;!-- MBean server -->
&lt;bean name="MBeanServer" class="javax.management.MBeanServer">
&lt;constructor factoryClass="java.lang.management.ManagementFactory"
factoryMethod="getPlatformMBeanServer"/>
factoryMethod="getPlatformMBeanServer"/>
&lt;/bean>

&lt;!-- The core configuration -->
&lt;bean name="Configuration" class="org.hornetq.core.config.impl.FileConfiguration">
&lt;/bean>

&lt;!-- The security manager -->
&lt;bean name="HornetQSecurityManager"
class="org.hornetq.spi.core.security.HornetQSecurityManagerImpl">
&lt;!-- The security manager -->
&lt;bean name="HornetQSecurityManager" class="org.hornetq.spi.core.security.HornetQSecurityManagerImpl">
&lt;start ignored="true"/>
&lt;stop ignored="true"/>
&lt;/bean>

&lt;!-- The core server -->
&lt;!-- The core server -->
&lt;bean name="HornetQServer" class="org.hornetq.core.server.impl.HornetQServerImpl">
&lt;start ignored="true"/>
&lt;stop ignored="true"/>
&lt;constructor>
&lt;parameter>
&lt;inject bean="Configuration"/>
Expand All @@ -247,28 +234,38 @@
&lt;inject bean="HornetQSecurityManager"/>
&lt;/parameter>
&lt;/constructor>
&lt;start ignored="true"/>
&lt;stop ignored="true"/>
&lt;/bean>

&lt;!-- The Stand alone server that controls the jndi server-->
&lt;bean name="StandaloneServer" class="org.hornetq.jms.server.impl.StandaloneNamingServer">
&lt;constructor>
&lt;parameter>
&lt;inject bean="HornetQServer"/>
&lt;/parameter>
&lt;/constructor>
&lt;property name="port">${jnp.port:1099}&lt;/property>
&lt;property name="bindAddress">${jnp.host:localhost}&lt;/property>
&lt;property name="rmiPort">${jnp.rmiPort:1098}&lt;/property>
&lt;property name="rmiBindAddress">${jnp.host:localhost}&lt;/property>
&lt;/bean>

&lt;!-- The JMS server -->
&lt;bean name="JMSServerManager"
class="org.hornetq.jms.server.impl.JMSServerManagerImpl">
&lt;bean name="JMSServerManager" class="org.hornetq.jms.server.impl.JMSServerManagerImpl">
&lt;constructor>
&lt;parameter>
&lt;inject bean="HornetQServer"/>
&lt;/parameter>
&lt;/constructor>
&lt;/bean>


&lt;/deployment></programlisting>
</para>
<para>We can see that, as well as the core HornetQ server, the stand-alone server
instantiates various different POJOs, lets look at them in turn:</para>
<itemizedlist>
<listitem>
<para>JNDIServer</para>
<para>Many clients like to look up JMS Objects from JNDI so we provide a JNDI server
for them to do that. If you don't need JNDI this can be commented out or
removed.</para>
</listitem>
<listitem>
<para>MBeanServer</para>
<para>In order to provide a JMX management interface a JMS MBean server is necessary
Expand Down Expand Up @@ -297,6 +294,12 @@
<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>
<para>This deploys any JMS Objects such as JMS Queues, Topics and ConnectionFactory
Expand Down

0 comments on commit b2cb36c

Please sign in to comment.