[jboss-cvs] JBoss Messaging SVN: r6804 - trunk/docs/user-manual/en/modules.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri May 15 08:38:58 EDT 2009
Author: ataylor
Date: 2009-05-15 08:38:58 -0400 (Fri, 15 May 2009)
New Revision: 6804
Modified:
trunk/docs/user-manual/en/modules/configuring-transports.xml
Log:
added servlet param explanation
Modified: trunk/docs/user-manual/en/modules/configuring-transports.xml
===================================================================
--- trunk/docs/user-manual/en/modules/configuring-transports.xml 2009-05-15 12:24:37 UTC (rev 6803)
+++ trunk/docs/user-manual/en/modules/configuring-transports.xml 2009-05-15 12:38:58 UTC (rev 6804)
@@ -296,65 +296,98 @@
<listitem>
<para>Deploy the servlet. Here's an example web.xml describing a web application
that uses the servlet:</para>
- <programlisting>
-<?xml version="1.0" encoding="UTF-8"?>
+ <programlisting><?xml version="1.0" encoding="UTF-8"?>
<web-app 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/web-app_2_4.xsd"
- version="2.4">
- <context-param>
- <param-name>serverChannelName</param-name>
- <param-value>org.jboss.jbm</param-value>
- </context-param>
-
- <context-param>
- <param-name>streaming</param-name>
- <param-value>true</param-value>
- </context-param>
-
- <context-param>
- <param-name>reconnectTimeout</param-name>
- <param-value>3000</param-value>
- </context-param>
-
- <listener>
- <listener-class>org.jboss.netty.channel.socket.http.HttpTunnelingSessionListener</listener-class>
- </listener>
-
- <listener>
- <listener-class>org.jboss.netty.channel.socket.http.HttpTunnelingContextListener</listener-class>
- </listener>
-
- <servlet>
- <servlet-name>NettyServlet</servlet-name>
- <servlet-class>org.jboss.netty.channel.socket.http.HttpTunnelingServlet</servlet-class>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>NettyServlet</servlet-name>
- <url-pattern>/JBMServlet</url-pattern>
- </servlet-mapping>
-</web-app>
-
- </programlisting>
- <para>Any traffic with the /JBMServlet url pattern will be considered JBoss
- Messaging tunneling traffic and be redirected to the servlet</para>
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+ <context-param>
+ <param-name>serverChannelName</param-name>
+ <param-value>org.jboss.jbm</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>streaming</param-name>
+ <param-value>true</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>reconnectTimeout</param-name>
+ <param-value>3000</param-value>
+ </context-param>
+
+ <listener>
+ <listener-class>org.jboss.netty.channel.socket.http.HttpTunnelingSessionListener</listener-class>
+ </listener>
+
+ <listener>
+ <listener-class>org.jboss.netty.channel.socket.http.HttpTunnelingContextListener</listener-class>
+ </listener>
+
+ <servlet>
+ <servlet-name>NettyServlet</servlet-name>
+ <servlet-class>org.jboss.netty.channel.socket.http.HttpTunnelingServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>NettyServlet</servlet-name>
+ <url-pattern>/JBMServlet</url-pattern>
+ </servlet-mapping>
+</web-app>
+</programlisting>
</listitem>
<listitem>
<para>We also need to add a special Netty invm acceptor on the server side
- configuration. The servlet will forward all traffic to this acceptor. Here's
- a snippet from the <literal>jbm-configuration.xml</literal> file showing
- that acceptor being defined:</para>
+ configuration.</para>
+ <para>Here's a snippet from the <literal>jbm-configuration.xml</literal> file
+ showing that acceptor being defined:</para>
<programlisting>
-<acceptor name="netty-servlet">
- <factory-class>org.jboss.messaging.integration.transports.netty.NettyAcceptorFactory</factory-class>
- <param key="jbm.remoting.netty.useinvm" value="true" type="Boolean"/>
- <param key="jbm.remoting.netty.host" value="org.jboss.jbm" type="String"/>
-</acceptor>
+<acceptors>
+
+ <acceptor name="netty-invm">
+ <factory-class>org.jboss.messaging.integration.transports.netty.NettyAcceptorFactory</factory-class>
+ <param key="jbm.remoting.netty.useinvm" value="true" type="Boolean"/>
+ <param key="jbm.remoting.netty.host" value="org.jboss.jbm" type="String"/>
+ </acceptor>
+
+</acceptors>
</programlisting>
</listitem>
+ <listitem>
+ <para>Lastly we need a connector for the client, this again will be configured
+ in the <literal>jbm-configuration.xml</literal> file as such:</para>
+ <programlisting><connectors>
+
+ <connector name="netty-servlet">
+ <factory-class>org.jboss.messaging.integration.transports.netty.NettyConnectorFactory</factory-class>
+ <param key="jbm.remoting.netty.host" value="localhost" type="String"/>
+ <param key="jbm.remoting.netty.port" value="8080" type="Integer"/>
+ <param key="jbm.remoting.netty.useservlet" value="true" type="Boolean"/>
+ <param key="jbm.remoting.netty.servletpath" value="/messaging/JBMServlet" type="String"/>
+ </connector>
+
+ </connectors></programlisting>
+ </listitem>
</itemizedlist>
- <para>TODO need to explain what all these params on the servlet are and how they map to
- the netty transport constants.</para>
+ <para>Heres a list of the context params and what they are used for</para>
+ <itemizedlist>
+ <listitem>
+ <para>serverChannelName - This is the name of the netty acceptor that the
+ servlet will forward its packets too. You can see it matches the name of the
+ <literal>jbm.remoting.netty.host</literal> param.</para>
+ </listitem>
+ <listitem>
+ <para>streaming - set to true means that all packets will be streamed as one
+ continuous request rather than one request per packet.</para>
+ </listitem>
+ <listitem>
+ <para>reconnectTimeout - How long in milliseconds the servlet will await for the
+ client to reconnect after a connection being closed by the web server</para>
+ </listitem>
+ </itemizedlist>
+ <para>The servlet pattern configured in the <literal>web.xml</literal> is the path of
+ the URL that is used. The connector param <literal
+ >jbm.remoting.netty.servletpath</literal> on the connector config must match
+ this using the application context of the web app if there is one.</para>
</section>
</section>
<section>
More information about the jboss-cvs-commits
mailing list