[jboss-cvs] JBoss Messaging SVN: r6855 - in trunk/docs: user-manual/en/modules and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon May 18 14:52:15 EDT 2009
Author: clebert.suconic at jboss.com
Date: 2009-05-18 14:52:15 -0400 (Mon, 18 May 2009)
New Revision: 6855
Modified:
trunk/docs/reference-guide/en/modules/server-configuration.xml
trunk/docs/user-manual/en/modules/security.xml
trunk/docs/user-manual/en/modules/using-jms.xml
trunk/docs/user-manual/en/modules/using-server.xml
Log:
just few tweaks (fitting examples on PDF)
Modified: trunk/docs/reference-guide/en/modules/server-configuration.xml
===================================================================
--- trunk/docs/reference-guide/en/modules/server-configuration.xml 2009-05-18 18:34:25 UTC (rev 6854)
+++ trunk/docs/reference-guide/en/modules/server-configuration.xml 2009-05-18 18:52:15 UTC (rev 6855)
@@ -353,23 +353,6 @@
</varlistentry>
</variablelist>
</section>
- <section id="paging-max-threads.configuration">
- <title>paging-max-threads</title>
- <variablelist>
- <varlistentry>
- <term>type</term>
- <listitem><para>TODO</para></listitem>
- </varlistentry>
- <varlistentry>
- <term>default</term>
- <listitem><para>TODO</para></listitem>
- </varlistentry>
- <varlistentry>
- <term>description</term>
- <listitem><para>TODO</para></listitem>
- </varlistentry>
- </variablelist>
- </section>
<section id="paging-directory.configuration">
<title>paging-directory</title>
<variablelist>
Modified: trunk/docs/user-manual/en/modules/security.xml
===================================================================
--- trunk/docs/user-manual/en/modules/security.xml 2009-05-18 18:34:25 UTC (rev 6854)
+++ trunk/docs/user-manual/en/modules/security.xml 2009-05-18 18:52:15 UTC (rev 6855)
@@ -42,8 +42,9 @@
message from a queue bound to matching addresses.</para>
</listitem>
<listitem>
- <para><literal>manage</literal>. This permission allows the user to invoke management operations by sending
- management messages to the management address.</para>
+ <para><literal>manage</literal>. This permission allows the user to invoke
+ management operations by sending management messages to the management
+ address.</para>
</listitem>
</itemizedlist>
<para>For each permission, a list of roles who are granted that permission is specified. If
@@ -123,7 +124,8 @@
be added into this file.</para>
<para>Let's take a look at an example file:</para>
<programlisting>
-<configuration xmlns="urn:jboss:messaging" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+<configuration xmlns="urn:jboss:messaging"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:jboss:messaging ../schemas/jbm-users.xsd ">
<defaultuser name="guest" password="guest">
@@ -165,7 +167,8 @@
Messaging server when the JBoss Microcontainer starts up the beans.</para>
<para>Let's take a look at a snippet from the default beans file:</para>
<programlisting>
-<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+<bean name="JBMSecurityManager"
+ class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
<start ignored="true"/>
<stop ignored="true"/>
</bean>
@@ -192,7 +195,8 @@
you need to specify the security manager as a JAASSecurityManager in the beans file.
Here's an example:</para>
<programlisting>
-<bean name="JBMSecurityManager" class="org.jboss.messaging.integration.security.JAASSecurityManager">
+<bean name="JBMSecurityManager"
+ class="org.jboss.messaging.integration.security.JAASSecurityManager">
<start ignored="true"/>
<stop ignored="true"/>
@@ -222,8 +226,8 @@
</itemizedlist>
<section>
<title>Example</title>
- <para>The <ulink url="../../../../examples/jms/jaas/readme.html"><literal>jaas</literal> example</ulink>
- shows how JBoss Messaging can be configured to use JAAS.</para>
+ <para>The <ulink url="../../../../examples/jms/jaas/readme.html"><literal>jaas</literal>
+ example</ulink> shows how JBoss Messaging can be configured to use JAAS.</para>
</section>
</section>
<section>
@@ -240,10 +244,11 @@
</section>
<section>
<title>Changing the Management password for Clustering</title>
- <para>In order for cluster connections to work correctly, each node in the cluster must register for management notifications
- from other nodes. To do this they must perform these actions as a user with a role that has <literal>admin</literal> permissions
- on the management addresses.</para>
- <para>This password should always be changed from its default after installation. Please see the management chapter for instructions
- on how to do this.</para>
+ <para>In order for cluster connections to work correctly, each node in the cluster must
+ register for management notifications from other nodes. To do this they must perform
+ these actions as a user with a role that has <literal>admin</literal> permissions on the
+ management addresses.</para>
+ <para>This password should always be changed from its default after installation. Please see
+ the management chapter for instructions on how to do this.</para>
</section>
</chapter>
Modified: trunk/docs/user-manual/en/modules/using-jms.xml
===================================================================
--- trunk/docs/user-manual/en/modules/using-jms.xml 2009-05-18 18:34:25 UTC (rev 6854)
+++ trunk/docs/user-manual/en/modules/using-jms.xml 2009-05-18 18:52:15 UTC (rev 6855)
@@ -1,33 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<chapter id="using-jms">
<title>Using JMS</title>
- <para>Although JBoss Messaging provides a JMS agnostic messaging API, many users will be more comfortable using JMS.</para>
- <para>JMS is a very popular API standard for messaging, and most messaging systems provide a JMS API. If you are completely
- new to JMS we suggest you following the Sun JMS tutorial [link] - a full JMS tutorial is out of scope for this guide.</para>
- <para>JBoss Messaging also ships with a wide range of examples, many of which demonstrate JMS API usage. A good place to start would be to play around
- with the simple JMS Queue and Topic example, but we also provide examples for many other parts of the JMS API.</para>
- <para>In this section we'll go through the main steps in configuring the server for JMS and creating a simple JMS program. We'll also show
- how to configure and use JNDI, and also how to use JMS with JBoss Messaging without using any JNDI.</para>
+ <para>Although JBoss Messaging provides a JMS agnostic messaging API, many users will be more
+ comfortable using JMS.</para>
+ <para>JMS is a very popular API standard for messaging, and most messaging systems provide a JMS
+ API. If you are completely new to JMS we suggest you following the Sun JMS tutorial [link] -
+ a full JMS tutorial is out of scope for this guide.</para>
+ <para>JBoss Messaging also ships with a wide range of examples, many of which demonstrate JMS
+ API usage. A good place to start would be to play around with the simple JMS Queue and Topic
+ example, but we also provide examples for many other parts of the JMS API.</para>
+ <para>In this section we'll go through the main steps in configuring the server for JMS and
+ creating a simple JMS program. We'll also show how to configure and use JNDI, and also how
+ to use JMS with JBoss Messaging without using any JNDI.</para>
<section>
<title>A simple ordering system</title>
- <para>For this chapter we're going to use a very simple ordering system as our example. It's a somewhat contrived example because of
- its extreme simplicity, but it serves to demonstrates the very basics of setting up and using JMS.</para>
- <para>We will have a single JMS Queue <literal>OrderQueue</literal>, and we will have a single <literal>MessageProducer</literal>
- sending an order message to the queue and a single <literal>MessageConsumer</literal> consuming the order message from the queue.</para>
- <para>The queue will be a <literal>durable</literal> queue, i.e. it will survive a server restart or crash. We also want to predeploy the
- queue, i.e. specifiy the queue in the server JMS config so it's created automatically without us having to explicitly create it
- from the client.</para>
- <para></para>
+ <para>For this chapter we're going to use a very simple ordering system as our example. It's
+ a somewhat contrived example because of its extreme simplicity, but it serves to
+ demonstrates the very basics of setting up and using JMS.</para>
+ <para>We will have a single JMS Queue <literal>OrderQueue</literal>, and we will have a
+ single <literal>MessageProducer</literal> sending an order message to the queue and a
+ single <literal>MessageConsumer</literal> consuming the order message from the
+ queue.</para>
+ <para>The queue will be a <literal>durable</literal> queue, i.e. it will survive a server
+ restart or crash. We also want to predeploy the queue, i.e. specifiy the queue in the
+ server JMS config so it's created automatically without us having to explicitly create
+ it from the client.</para>
+ <para/>
</section>
-
<section>
<title>JMS Server Configuration</title>
- <para>The file <literal>jbm-jms.xml</literal> on the server classpath contains any JMS Queue, Topic and ConnectionFactory instances
- that we wish to pre-deploy into the JNDI server so we can look them up.</para>
- <para>A JMS ConnectionFactory object is used by the client to make connections to the server. It knows the location of the server
- it is connecting to, as well as many other configuration parameters. In most cases the defaults will be acceptable.</para>
- <para>We'll deploy a single JMS Queue and a single JMS Connection Factory instance on the server for this example but there
- are no limits to the number of Queues, Topics and Connection Factory instances you can deploy from the file. Here's our config:</para>
+ <para>The file <literal>jbm-jms.xml</literal> on the server classpath contains any JMS
+ Queue, Topic and ConnectionFactory instances that we wish to pre-deploy into the JNDI
+ server so we can look them up.</para>
+ <para>A JMS ConnectionFactory object is used by the client to make connections to the
+ server. It knows the location of the server it is connecting to, as well as many other
+ configuration parameters. In most cases the defaults will be acceptable.</para>
+ <para>We'll deploy a single JMS Queue and a single JMS Connection Factory instance on the
+ server for this example but there are no limits to the number of Queues, Topics and
+ Connection Factory instances you can deploy from the file. Here's our config:</para>
<programlisting>
<configuration xmlns="urn:jboss:messaging"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -46,29 +56,35 @@
</configuration>
</programlisting>
- <para>We deploy one ConnectionFactory called <literal>ConnectionFactory</literal> and bind it in just one place in JNDI as given by
- the <literal>entry</literal> element. ConnectionFactory instances can be bound in many places in JNDI if you require.
- </para>
- <para>Note that the JMS connection factory references a <literal>connector</literal> called <literal>netty</literal>. This is
- a reference to a connector object deployed in the main core configuration file <literal>jbm-configuration.xml</literal> which
- defines the transport and parameters used to actually connect to the server.</para>
- </section>
+ <para>We deploy one ConnectionFactory called <literal>ConnectionFactory</literal> and bind
+ it in just one place in JNDI as given by the <literal>entry</literal> element.
+ ConnectionFactory instances can be bound in many places in JNDI if you require. </para>
+ <para>Note that the JMS connection factory references a <literal>connector</literal> called
+ <literal>netty</literal>. This is a reference to a connector object deployed in the
+ main core configuration file <literal>jbm-configuration.xml</literal> which defines the
+ transport and parameters used to actually connect to the server.</para>
+ </section>
<section>
<title>JNDI configuration</title>
- <para>When using JNDI from the client side you need to specify a set of JNDI properties which tell the JNDI client where to locate
- the JNDI server, amongst other things. These are often specified in a file jndi.properties on the client classpath, or you can
- specify them directly when creating the JNDI initial context. A full JNDI tutorial is outside the scope of this document, please
- see the Sun JNDI tutorial for more information on how to use JNDI. [LINK]</para>
- <para>For talking to the JBoss JNDI Server, the jndi properties will look something like this:</para>
+ <para>When using JNDI from the client side you need to specify a set of JNDI properties
+ which tell the JNDI client where to locate the JNDI server, amongst other things. These
+ are often specified in a file jndi.properties on the client classpath, or you can
+ specify them directly when creating the JNDI initial context. A full JNDI tutorial is
+ outside the scope of this document, please see the Sun JNDI tutorial for more
+ information on how to use JNDI. [LINK]</para>
+ <para>For talking to the JBoss JNDI Server, the jndi properties will look something like
+ this:</para>
<programlisting>
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=jnp://myhost:1099
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
</programlisting>
- <para>Where <literal>myhost</literal> is the hostname or IP address of the JNDI server. 1099 is the port used by the JNDI server
- and may vary depending on how you have configured your JNDI server.</para>
- <para>In the default standalone configuration, JNDI server ports are configured in the <literal>jbm-jboss-beans.xml</literal>
- file where the JNDIServer bean is confgured, here's a snippet from the file:</para>
+ <para>Where <literal>myhost</literal> is the hostname or IP address of the JNDI server. 1099
+ is the port used by the JNDI server and may vary depending on how you have configured
+ your JNDI server.</para>
+ <para>In the default standalone configuration, JNDI server ports are configured in the
+ <literal>jbm-jboss-beans.xml</literal> file where the JNDIServer bean is confgured,
+ here's a snippet from the file:</para>
<programlisting>
<bean name="JNDIServer" class="org.jnp.server.Main">
<property name="namingInfo">
@@ -80,12 +96,12 @@
<property name="rmiBindAddress">localhost</property>
</bean>
</programlisting>
- <para>If you want your JNDI server to be available to non local clients make sure you change it's bind address to something other
- than <literal>localhost</literal>!</para>
+ <para>If you want your JNDI server to be available to non local clients make sure you change
+ it's bind address to something other than <literal>localhost</literal>!</para>
</section>
<section>
<title>The code</title>
- <para>Here's the code for the example:</para>
+ <para>Here's the code for the example:</para>
<para>First we'll create a JNDI initial context from which to lookup our JMS objects:</para>
<programlisting>InitialContect ic = new InitialContext();</programlisting>
<para>Now we'll look up the connection factory:</para>
@@ -94,7 +110,8 @@
<programlisting>Queue orderQueue = (Queue)ic.lookup("/queues/OrderQueue");</programlisting>
<para>Next we create a JMS connection using the connection factory:</para>
<programlisting>Connection connection = cf.createConnection();</programlisting>
- <para>And we create a non transacted JMS Session, with AUTO_ACKNOWLEDGE acknowledge mode:</para>
+ <para>And we create a non transacted JMS Session, with AUTO_ACKNOWLEDGE acknowledge
+ mode:</para>
<programlisting>Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);</programlisting>
<para>We create a MessageProducer that will send orders to the queue:</para>
<programlisting>MessageProducer producer = session.createProducer(orderQueue);</programlisting>
@@ -109,27 +126,34 @@
<programlisting>TextMessage receivedMessage = (TextMessage)consumer.receive();
System.out.println("Got order: " + receivedMessage.getText());
</programlisting>
- <para>It's as simple as that. For a wide range of working JMS examples please see the examples directory in the distribution.</para>
- </section>
+ <para>It's as simple as that. For a wide range of working JMS examples please see the
+ examples directory in the distribution.</para>
+ </section>
<section>
- <title>Directly instantiating JMS Queue, Topic and ConnectionFactory instances without using JNDI</title>
- <para>Although it's a very common JMS usage pattern to lookup JMS <emphasis>Administered Objects</emphasis> (that's
- JMS Queues, Topics and Connection Factories) from JNDI, in some cases a JNDI server is not available and you still want to
- use JMS, or you just think "Why do I need JNDI? Why can't I just instantiate these objects directly?"</para>
- <para>With JBoss Messaging you can do exactly that. JBoss Messaging supports the direct instantiation of JMS Queue, Topic
- and Connection Factory instances, so you don't have to use JNDI at all.</para>
+ <title>Directly instantiating JMS Queue, Topic and ConnectionFactory instances without using
+ JNDI</title>
+ <para>Although it's a very common JMS usage pattern to lookup JMS <emphasis>Administered
+ Objects</emphasis> (that's JMS Queues, Topics and Connection Factories) from JNDI,
+ in some cases a JNDI server is not available and you still want to use JMS, or you just
+ think "Why do I need JNDI? Why can't I just instantiate these objects directly?"</para>
+ <para>With JBoss Messaging you can do exactly that. JBoss Messaging supports the direct
+ instantiation of JMS Queue, Topic and Connection Factory instances, so you don't have to
+ use JNDI at all.</para>
<para>For a full working example of direct instantiation please see the JMS examples.</para>
<para>Here's our simple example, rewritten to not use JNDI at all:</para>
- <para>We create the JMS ConnectionFactory object directly, note we need to provide connection params and specify which transport we are using:</para>
+ <para>We create the JMS ConnectionFactory object directly, note we need to provide
+ connection params and specify which transport we are using:</para>
<programlisting>
-TransportConfiguration transportConfiguration = new TransportConfiguration(NettyConnectorFactory.class.getName());
+TransportConfiguration transportConfiguration =
+ new TransportConfiguration(NettyConnectorFactory.class.getName());
ConnectionFactory cf = new JBossConnectionFactory();
</programlisting>
<para>We create the JMS Queue Object directly:</para>
<programlisting>Queue orderQueue = new JBossQueue("OrderQueue");</programlisting>
<para>Next we create a JMS connection using the connection factory:</para>
<programlisting>Connection connection = cf.createConnection();</programlisting>
- <para>And we create a non transacted JMS Session, with AUTO_ACKNOWLEDGE acknowledge mode:</para>
+ <para>And we create a non transacted JMS Session, with AUTO_ACKNOWLEDGE acknowledge
+ mode:</para>
<programlisting>Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);</programlisting>
<para>We create a MessageProducer that will send orders to the queue:</para>
<programlisting>MessageProducer producer = session.createProducer(orderQueue);</programlisting>
@@ -139,12 +163,10 @@
<programlisting>connection.start();</programlisting>
<para>We create a simple TextMessage and send it:</para>
<programlisting>TextMessage message = session.createTextMessage("This is an order");
- producer.send(message);</programlisting>
+producer.send(message);</programlisting>
<para>And we consume the message:</para>
<programlisting>TextMessage receivedMessage = (TextMessage)consumer.receive();
- System.out.println("Got order: " + receivedMessage.getText());
- </programlisting>
-
+System.out.println("Got order: " + receivedMessage.getText());
+ </programlisting>
</section>
-
</chapter>
Modified: trunk/docs/user-manual/en/modules/using-server.xml
===================================================================
--- trunk/docs/user-manual/en/modules/using-server.xml 2009-05-18 18:34:25 UTC (rev 6854)
+++ trunk/docs/user-manual/en/modules/using-server.xml 2009-05-18 18:52:15 UTC (rev 6855)
@@ -77,9 +77,9 @@
<title>System properties</title>
<para>JBoss Messaging also takes a couple of Java system properties on the command line for
configuring logging properties</para>
- <para>JBoss Messaging uses JDK logging to minimise dependencies on other logging systems. JDK
- logging can then be configured to delegate to some other framework, e.g. log4j if that's
- what you prefer.</para>
+ <para>JBoss Messaging uses JDK logging to minimise dependencies on other logging systems.
+ JDK logging can then be configured to delegate to some other framework, e.g. log4j if
+ that's what you prefer.</para>
<para>For more information on configuring logging, please see the section configuring
logging</para>
</section>
@@ -148,69 +148,68 @@
security manager being used.</para>
<para>Let's take a look at an example beans file from the stand-alone server:</para>
<para>
- <programlisting>
- <?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.jboss.messaging.core.config.impl.FileConfiguration">
- </bean>
-
- <!-- The security manager -->
- <bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
- <start ignored="true"/>
- <stop ignored="true"/>
- </bean>
-
- <!-- The core server -->
- <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
- <start ignored="true"/>
- <stop ignored="true"/>
- <constructor>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- <parameter>
- <inject bean="MBeanServer"/>
- </parameter>
- <parameter>
- <inject bean="JBMSecurityManager"/>
- </parameter>
- </constructor>
- </bean>
-
- <!-- The JMS server -->
- <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
- <constructor>
- <parameter>
- <inject bean="MessagingServer"/>
- </parameter>
- </constructor>
- </bean>
-
- </deployment>
-
- </programlisting>
+ <programlisting><?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.jboss.messaging.core.config.impl.FileConfiguration">
+</bean>
+
+<!-- The security manager -->
+<bean name="JBMSecurityManager"
+ class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+<start ignored="true"/>
+<stop ignored="true"/>
+</bean>
+
+<!-- The core server -->
+<bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
+<start ignored="true"/>
+<stop ignored="true"/>
+<constructor>
+<parameter>
+<inject bean="Configuration"/>
+</parameter>
+<parameter>
+<inject bean="MBeanServer"/>
+</parameter>
+<parameter>
+<inject bean="JBMSecurityManager"/>
+</parameter>
+</constructor>
+</bean>
+
+<!-- The JMS server -->
+<bean name="JMSServerManager"
+ class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
+<constructor>
+<parameter>
+<inject bean="MessagingServer"/>
+</parameter>
+</constructor>
+</bean>
+
+</deployment></programlisting>
</para>
<para>We can see that, as well as the core JBoss Messaging server, the stand-alone server
instantiates various different POJOs, lets look at them in turn:</para>
More information about the jboss-cvs-commits
mailing list