jford       2004/08/03 18:24:51

  Added:       xdocs    messaging.xml
  Log:
  Added messaging service doc
  
  Revision  Changes    Path
  1.1                  jakarta-jetspeed/xdocs/messaging.xml
  
  Index: messaging.xml
  ===================================================================
  <?xml version="1.0"?>
  <!--
  Copyright 2004 The Apache Software Foundation
  
  Licensed 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.
  -->
  <document>
        <properties>
                <title>Jetspeed Messaging</title>
                <subtitle>Messaging Support in Jetspeed</subtitle>
                <authors>
                        <person name="Jeremy Ford" email="[EMAIL PROTECTED]"/>
                </authors>
        </properties>
        <body>
                <section name="Overview">
                        <subsection name="What is it?">
                                <p>
                                        As of Jetspeed 1.6, Jetspeed now supports the 
<a href="http://java.sun.com/products/jms/";>JMS API</a>.
                                        This is done through the new Messaging 
service.  While the interface is able to support a JMS 1.0.2 implementation, 
                                        the AbstractJMSMessagingService makes use of 
the JMS 1.1 API to provide easier integration with other JMS implementations.
                                </p>
                                <p>
                                        Currently, Jetspeed uses ActiveMQ as the JMS 
implementation.  In order to substitute another JMS 1.1 compatiable implementation, 
                                        all that needs to be done is to derive from 
the AbstractJMSMessagingService, implementing the createConnection method.  Also, any 
unique
                                        parameters that your JMS implementation needs 
will need to be configured in the new implementations init() method.
                                </p>
                        </subsection>
                        
                        <subsection name="What can it do?">
                                <p>
                                        The Messaging service allows Jetspeed to be 
ran in a multi-node configuration (multiple Jetspeed instances running in different VMs
                                        or different webapps).  When configured 
properly, Jetspeed's Registry and SecurityCache services will enable listeners on 
appropriate 
                                        JMS topics.  When a registry entry is updated 
or a change is made in the security (user/role/group), a message will be sent to the 
topic.  
                                        The other nodes will receive the message and 
clear their cache of the appropriate item.  The next access to the same item will 
cause Jetspeed 
                                        to reload the information from the underlying 
storage mechanism.
                                </p>
                        </subsection>
                </section>
                
                <section name="Setup">
                        <subsection name="ActiveMQ">
                                <p>
                                        <ul>
                                                <li>
                                                In order to use the Messaging service, 
you will need to download Active MQ 
                                                from the <a 
href="http://dist.codehaus.org/activemq/distributions/";>distribution site</a>.
                                                </li>
                                                
                                                <li>
                                                Unzip the distribution into your 
preferred directory.
                                                </li>
                                                
                                                <li>
                                                From the ActiveMQ root, type "maven 
server" to start the JMS server.
                                                </li>
                                        </ul>
                                </p>
                        </subsection>
                        
                        <subsection name="Jetspeed">
                                <p>
                                You will need to setup a central database where the 
data (Registry/Security) will be stored.  Without this, the Messaging service will 
yield 
                                no results.  When the services reload their data, they 
will still be loading from the local files.
                                </p>
                                <p>
                                In order to activate the messaging service, the 
following property will
                                need to be added to the JetspeedResources.properties 
file.
                                
                                <code>
                                
services.MessagingService.classname=org.apache.jetspeed.services.messaging.jms.activemq.MessagingServiceImpl
                                </code>
                                
                                No other configuration is needed.  If you wish to 
configure the service, see the section on <a href="#configuration">configuration</a>.
                                </p>
                                
                                <p>
                                This will enable the Messaging service.  However, the 
Registry and SecurityCache service will not use it by default. 
                                To enable the use of the Messaging service, add the 
following propertis to the JetspeedResources.properties file.
                                
                                <code>
                                        services.Registry.enable_messaging=true
                                        services.SecurityCache.enable_messaging=true
                                </code>
                                </p>
                        </subsection>
                </section>
                
                <section name="Configuration">
                        <a name="configuration"/>
                        
                        <subsection name="Connection URL">
                                <table>
                                        <tr>
                                                <th>Field</th>
                                                <th>Description</th>
                                                <th>Default Value</th>
                                                <th>Example</th>
                                        </tr>
                                        <tr>
                                                <td>url</td>
                                                <td>The URL for the service to connect 
to.  If this is specified, the other parameters are ignored</td>
                                                <td>Configured by the 
Implementation</td>
                                                <td>rmi://localhost:616161</td>
                                        </tr>
                                        <tr>
                                                <td>schema</td>
                                                <td>The connection schema</td>
                                                <td>Configured by the 
Implementation</td>
                                                <td>http, rmi, tcp</td>
                                        </tr>
                                        <tr>
                                                <td>host</td>
                                                <td>The server to connect to</td>
                                                <td>Configured by the 
Implementation</td>
                                                <td>localhost</td>
                                        </tr>
                                        <tr>
                                                <td>port</td>
                                                <td>The port to connect to</td>
                                                <td>Configured by the 
Implementation</td>
                                                <td>8080, 61616</td>
                                        </tr>
                                        <tr>
                                                <td>name</td>
                                                <td>Extra path information, servlet 
name</td>
                                                <td>Configured by the 
Implementation</td>
                                                <td>jmsservlet</td>
                                        </tr>
                                </table>
                        </subsection>
                        
                        <subsection name="JNDI">
                                If your implementation supports JNDI, then use the 
following parameters:
                                <table>
                                        <tr>
                                                <th>Field</th>
                                                <th>Description</th>
                                                <th>Default Value</th>
                                                <th>Example</th>
                                        </tr>
                                        <tr>
                                                <td>connection_factory</td>
                                                <td>Classname of the JNDI connection 
factory</td>
                                                <td>Configured by the 
Implementation</td>
                                                <td>org.apache.jndi.my.factory</td>
                                        </tr>
                                </table>
                        </subsection>
                        
                        <subsection name="Session">
                                <table>
                                        <tr>
                                                <th>Field</th>
                                                <th>Description</th>
                                                <th>Default Value</th>
                                                <th>Example</th>
                                        </tr>
                                        <tr>
                                                <td>transacted</td>
                                                <td>Whether the messages should be 
transacted or not</td>
                                                <td>false</td>
                                                <td>true/false</td>
                                        </tr>
                                        <tr>
                                                <td>ack_mode</td>
                                                <td>The acknowledgement mode of the 
session</td>
                                                <td>auto</td>
                                                <td>auto, client, dups_ok</td>
                                        </tr>
                                </table>
                        </subsection>
                        
                        <subsection name="Message">
                                <table>
                                        <tr>
                                                <th>Field</th>
                                                <th>Description</th>
                                                <th>Default Value</th>
                                                <th>Example</th>
                                        </tr>
                                        <tr>
                                                <td>topic_enabled</td>
                                                <td>Chooses between queues and 
topics</td>
                                                <td>true</td>
                                                <td>true/false</td>
                                        </tr>
                                        <tr>
                                                <td>durable</td>
                                                <td>Enables the client to receive 
messages that are persistent and were sent while the client was not listening</td>
                                                <td>false</td>
                                                <td>true/false</td>
                                        </tr>
                                        <tr>
                                                <td>nolocal</td>
                                                <td>Whether the local node should also 
receive messages generated by the same node.</td>
                                                <td>true</td>
                                                <td>true/false</td>
                                        </tr>
                                </table>
                        </subsection>
                        
                        <subsection name="Producer">
                                <table>
                                        <tr>
                                                <th>Field</th>
                                                <th>Description</th>
                                                <th>Default Value</th>
                                                <th>Example</th>
                                        </tr>
                                        <tr>
                                                <td>delivery_mode</td>
                                                <td>Whether messages should persist 
beyond the life of the sender</td>
                                                <td>non_persistent</td>
                                                <td>non_persistent, persistent</td>
                                        </tr>
                                        <tr>
                                                <td>priority</td>
                                                <td>The priority of the message being 
sent</td>
                                                <td>0</td>
                                                <td>0 &lt; X &lt; 10</td>
                                        </tr>
                                        <tr>
                                                <td>time_to_live</td>
                                                <td>How long the message should 
live</td>
                                                <td>0</td>
                                                <td>0 &lt; 2^16</td>
                                        </tr>
                                </table>
                        </subsection>
                        
                        <subsection name="ActiveMQ">
                                <table>
                                        <tr>
                                                <th>Field</th>
                                                <th>Description</th>
                                                <th>Default Value</th>
                                                <th>Example</th>
                                        </tr>
                                        <tr>
                                                <td>username</td>
                                                <td>The username to access the JMS 
server</td>
                                                <td>Configured by the 
Implementation</td>
                                                <td>myusername</td>
                                        </tr>
                                        <tr>
                                                <td>password</td>
                                                <td>The password to access the JMS 
server</td>
                                                <td>Configured by the 
Implementation</td>
                                                <td>wordpass</td>
                                        </tr>
                                </table>
                        </subsection>
                </section>
        </body>
  </document>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to