[jboss-cvs] JBoss Messaging SVN: r6852 - trunk/docs/user-manual/en/modules.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon May 18 13:10:18 EDT 2009
Author: clebert.suconic at jboss.com
Date: 2009-05-18 13:10:18 -0400 (Mon, 18 May 2009)
New Revision: 6852
Modified:
trunk/docs/user-manual/en/modules/embedding-jbm.xml
trunk/docs/user-manual/en/modules/large-messages.xml
trunk/docs/user-manual/en/modules/paging.xml
Log:
Embedded chapter (not done yet)
Modified: trunk/docs/user-manual/en/modules/embedding-jbm.xml
===================================================================
--- trunk/docs/user-manual/en/modules/embedding-jbm.xml 2009-05-18 16:51:38 UTC (rev 6851)
+++ trunk/docs/user-manual/en/modules/embedding-jbm.xml 2009-05-18 17:10:18 UTC (rev 6852)
@@ -1,11 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<chapter id="embedding-jbm">
<title>Embedding JBoss Messaging</title>
- <para>blah</para>
+ <para>JBoss Messaging was designed as a simple set of POJOs, and it was designed to be
+ embeddable.</para>
+ <para>Embedding JBM can be done in very few easy steps. Instantiate the configuration object,
+ instantiate the server, start it, and you have a JBoss Messaging running in your virtual
+ machine. Easy and simple like that.</para>
<section>
- <title>Embedding JBM</title>
- <para></para>
+ <title>POJO instantiation</title>
+ <para>You can follow this step-by-step guide:</para>
+ <para>Create the configuration object. If you need a configuration file, use
+ FileConfigurationImpl</para>
+ <programlisting>import org.jboss.messaging.core.config.Configuration;
+import org.jboss.messaging.core.config.impl.FileConfiguration;
+
+...
+
+
+Configuration config = new FileConfiguration();
+config.setConfigurationUrl(urlToYourconfigfile);
+config.start();</programlisting>
+ <para>If you don't need to support a configuration file, just use <literal
+ >ConfigurationImpl</literal> and change the config parameters accordingly, such as
+ adding acceptors. </para>
+ <para>The acceptors are configured through <literal>ConfigurationImpl</literal>. Just add
+ the NettyAcceptorFactory on the transports the same way you would thorugh the main
+ configuration file.</para>
+ <programlisting>import org.jboss.messaging.core.config.Configuration;
+import org.jboss.messaging.core.config.impl.ConfigurationImpl;
+
+...
+
+Configuration config = new ConfigurationImpl();
+HashSet<TransportConfiguration> transports = new HashSet<TransportConfiguration>();
+
+transports.add(new TransportConfiguration(NettyAcceptorFactory.class.getName()));
+transports.add(new TransportConfiguration(InVMAcceptorFactory.class.getName()));
+
+config.setAcceptorConfigurations(transports);</programlisting>
+ <para>You need to instantiate and start JBoss Messaging server. The class <literal
+ >Messaging</literal> on package <literal>org.jboss.messaging.core.server</literal>
+ has a few static methods helpful on instantiating the server, which is aways our
+ preferable way of instantiating the server.</para>
+ <programlisting>import org.jboss.messaging.core.server.Messaging;
+import org.jboss.messaging.core.server.MessagingServer;
+
+...
+
+MessagingServer server = Messaging.newMessagingServer(config);
+
+server.start();</programlisting>
+ <para>You also have the option of instantiating <literal>MessagingServerImpl</literal>
+ directly:</para>
+ <programlisting>MessagingServer server = new MessagingServerImpl(config,
+ ManagementFactory.getPlatformMBeanServer(),
+ new JBMSecurityManagerImpl());
+server.start();
+ </programlisting>
</section>
-
-
+ <section>
+ <title>Dependency Frameworks</title>
+ <para>You may also choose to use a dependency injection framework such as JBoss Micro
+ Container or Spring.</para>
+ <para>TODO</para>
+ </section>
</chapter>
Modified: trunk/docs/user-manual/en/modules/large-messages.xml
===================================================================
--- trunk/docs/user-manual/en/modules/large-messages.xml 2009-05-18 16:51:38 UTC (rev 6851)
+++ trunk/docs/user-manual/en/modules/large-messages.xml 2009-05-18 17:10:18 UTC (rev 6852)
@@ -12,7 +12,7 @@
<section id="large.message.configuring">
<title>Configuring the server</title>
<para>Large messages are stored on a disk folder on the server side, as configured on the
- main configuration file (<xref linkend="usingserver.mainconfig"/>)</para>
+ main configuration file.</para>
<para>The configuration property <literal>large-messages-directory</literal> specifies where
large messages are stored.</para>
<programlisting><configuration xmlns="urn:jboss:messaging"
Modified: trunk/docs/user-manual/en/modules/paging.xml
===================================================================
--- trunk/docs/user-manual/en/modules/paging.xml 2009-05-18 16:51:38 UTC (rev 6851)
+++ trunk/docs/user-manual/en/modules/paging.xml 2009-05-18 17:10:18 UTC (rev 6852)
@@ -89,8 +89,7 @@
</section>
<section id="paging.main.config">
<title>Configuration</title>
- <para>Global paging parameters are specified on the main configuration file. (<xref
- linkend="usingserver.mainconfig"/>)</para>
+ <para>Global paging parameters are specified on the main configuration file.</para>
<programlisting><configuration xmlns="urn:jboss:messaging"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:jboss:messaging /schema/jbm-configuration.xsd">
More information about the jboss-cvs-commits
mailing list