[jboss-cvs] JBossAS SVN: r94138 - projects/docs/community/5/Clustering_Guide/en-US.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Sep 29 23:29:38 EDT 2009


Author: bstansberry at jboss.com
Date: 2009-09-29 23:29:37 -0400 (Tue, 29 Sep 2009)
New Revision: 94138

Modified:
   projects/docs/community/5/Clustering_Guide/en-US/Clustering_Guide_JBoss_Cache.xml
Log:
Make stuff fit on PDF

Modified: projects/docs/community/5/Clustering_Guide/en-US/Clustering_Guide_JBoss_Cache.xml
===================================================================
--- projects/docs/community/5/Clustering_Guide/en-US/Clustering_Guide_JBoss_Cache.xml	2009-09-30 03:16:43 UTC (rev 94137)
+++ projects/docs/community/5/Clustering_Guide/en-US/Clustering_Guide_JBoss_Cache.xml	2009-09-30 03:29:37 UTC (rev 94138)
@@ -64,45 +64,27 @@
           <para>The following is a redacted version of the "CacheConfigurationRegistry" 
           bean configuration:</para>
                 
-                <programlisting><![CDATA[
-<bean name="CacheConfigurationRegistry" 
+                <programlisting><![CDATA[<bean name="CacheConfigurationRegistry" 
       class="org.jboss.ha.cachemanager.DependencyInjectedConfigurationRegistry">
    
-      <!-- If users wish to add configs using a more familiar JBC config format
-           they can add them to a cache-configs.xml file specified by this property.
-           However, use of the microcontainer format used below is recommended.
-      <property name="configResource">META-INF/jboss-cache-configs.xml</property>      
-      -->
+   <!-- If users wish to add configs using a more familiar JBC config format
+        they can add them to a cache-configs.xml file specified by this property.
+        However, use of the microcontainer format used below is recommended.
+   <property name="configResource">META-INF/jboss-cache-configs.xml</property>      
+   -->
       
-      <!-- The configurations. A Map<String name, Configuration config> -->
-      <property name="newConfigurations">
-        <map keyClass="java.lang.String" valueClass="org.jboss.cache.config.Configuration">
+   <!-- The configurations. A Map<String name, Configuration config> -->
+   <property name="newConfigurations">
+      <map keyClass="java.lang.String" valueClass="org.jboss.cache.config.Configuration">
    
    <!-- The standard configurations follow.  You can add your own and/or edit these. -->   
       
    <!-- Standard cache used for web sessions -->
    <entry><key>standard-session-cache</key>
    <value>      
-      <bean name="StandardSessionCacheConfig" class="org.jboss.cache.config.Configuration">
-         
-         <!-- Provides batching functionality for caches that don't want to 
-              interact with regular JTA Transactions -->
-         <property name="transactionManagerLookupClass">
-            org.jboss.cache.transaction.BatchModeTransactionManagerLookup
-         </property>
-               
-         <!-- Name of cluster. Needs to be the same for all members -->
-         <property name="clusterName">${jboss.partition.name:DefaultPartition}-SessionCache</property>
-         <!-- Use a UDP (multicast) based stack. Need JGroups flow control (FC)
-              because we are using asynchronous replication. -->
-         <property name="multiplexerStack">${jboss.default.jgroups.stack:udp}</property>
-         <property name="fetchInMemoryState">true</property>
-         
-         <property name="nodeLockingScheme">PESSIMISTIC</property>
-         <property name="isolationLevel">REPEATABLE_READ</property>
-         <property name="cacheMode">REPL_ASYNC</property>
+      <bean name="StandardSessionCacheConfig" class="org.jboss.cache.config.Configuration">                 
       
-          .... more details of the standard-session-cache configuration
+          .... details of the standard-session-cache configuration
       </bean>      
    </value>
    </entry>
@@ -144,13 +126,14 @@
             beans that make up a JBoss Cache configuration can be seen in the 
             JBoss Cache javadocs.  Here is a fairly complete example:</para>
             
-            <programlisting><![CDATA[
-<bean name="StandardSFSBCacheConfig" class="org.jboss.cache.config.Configuration">
+            <programlisting><![CDATA[<bean name="StandardSFSBCacheConfig" class="org.jboss.cache.config.Configuration">
 
    <!--  No transaction manager lookup -->
          
    <!-- Name of cluster. Needs to be the same for all members -->
-   <property name="clusterName">${jboss.partition.name:DefaultPartition}-SFSBCache</property>
+   <property name="clusterName">
+      ${jboss.partition.name:DefaultPartition}-SFSBCache
+   </property>
    <!-- Use a UDP (multicast) based stack. Need JGroups flow control (FC)
         because we are using asynchronous replication. -->
    <property name="multiplexerStack">${jboss.default.jgroups.stack:udp}</property>
@@ -542,8 +525,7 @@
          inject a reference to the Channel Factory service as well as specifying
          the protocol stack configuration:</para>
          
-         <programlisting><![CDATA[
-<property name="runtimeConfig">
+         <programlisting><![CDATA[<property name="runtimeConfig">
    <bean class="org.jboss.cache.config.RuntimeConfig">
       <property name="muxChannelFactory"><inject bean="JChannelFactory"/></property>
    </bean>
@@ -560,8 +542,7 @@
          this attribute, and set the protocol stack name via the <literal>MultiplexerStack</literal>
          attribute:</para>
          
-         <programlisting><![CDATA[
-<attribute name="MuxChannelFactory"><inject bean="JChannelFactory"/></attribute>
+         <programlisting><![CDATA[<attribute name="MuxChannelFactory"><inject bean="JChannelFactory"/></attribute>
 <attribute name="MultiplexerStack">udp</attribute>]]></programlisting>
       </section>
       
@@ -627,8 +608,7 @@
            <literal>standard-session-cache</literal> config serves as a good
            example:</para>
            
-           <programlisting><![CDATA[
-<property name="cacheLoaderConfig">
+           <programlisting><![CDATA[<property name="cacheLoaderConfig">
    <bean class="org.jboss.cache.config.CacheLoaderConfig">
           <!-- Do not change these -->
           <property name="passivation">true</property>
@@ -734,8 +714,7 @@
          an example we'll look at the buddy replication configuration section
          from the CacheManager service's <literal>standard-session-cache</literal>
          config:</para>
-         <programlisting><![CDATA[
-<property name="buddyReplicationConfig">
+         <programlisting><![CDATA[<property name="buddyReplicationConfig">
    <bean class="org.jboss.cache.config.BuddyReplicationConfig">
                
       <!--  Just set to true to turn on buddy replication -->
@@ -817,8 +796,7 @@
        To add a new configuration, you would add an additional element inside 
        that bean's <literal>newConfigurations</literal> &lt;map&gt;:</para>
        
-       <programlisting><![CDATA[
-<bean name="CacheConfigurationRegistry" 
+       <programlisting><![CDATA[<bean name="CacheConfigurationRegistry" 
       class="org.jboss.ha.cachemanager.DependencyInjectedConfigurationRegistry">
    .....
    <property name="newConfigurations">
@@ -854,8 +832,7 @@
              the simplest mechanism is to have it inject the CacheManager into
              your service.</para>
              
-             <programlisting><![CDATA[
-<bean name="MyService" class="com.example.MyService">
+             <programlisting><![CDATA[<bean name="MyService" class="com.example.MyService">
    <property name="cacheManager"><inject bean="CacheManager"/></property>
 </bean>]]></programlisting>
              </listitem>
@@ -863,8 +840,7 @@
              <para>Alternatively, you can find look up the CacheManger is
              JNDI. It is bound under <literal>java:CacheManager</literal>.</para>
              
-             <programlisting><![CDATA[
-import org.jboss.ha.cachemanager.CacheManager;
+             <programlisting><![CDATA[import org.jboss.ha.cachemanager.CacheManager;
 
 public class MyService {
    private CacheManager cacheManager;
@@ -879,8 +855,7 @@
              <para>JBoss AS also provides a service locator object that can 
              be used to access the CacheManager.</para>
              
-             <programlisting><![CDATA[
-import org.jboss.ha.cachemanager.CacheManager;
+             <programlisting><![CDATA[import org.jboss.ha.cachemanager.CacheManager;
 import org.jboss.ha.framework.server.CacheManagerLocator;
 
 public class MyService {
@@ -906,8 +881,7 @@
           used; the manager will stop the cache when all callers that have asked
           for the cache have released it.</para>
              
-             <programlisting><![CDATA[
-import org.jboss.cache.Cache;
+             <programlisting><![CDATA[import org.jboss.cache.Cache;
 import org.jboss.ha.cachemanager.CacheManager;
 import org.jboss.ha.framework.server.CacheManagerLocator;
 
@@ -934,8 +908,7 @@
           <para>The CacheManager can also be used to access instances of
           POJO Cache.</para>
              
-             <programlisting><![CDATA[
-import org.jboss.cache.pojo.PojoCache;
+             <programlisting><![CDATA[import org.jboss.cache.pojo.PojoCache;
 import org.jboss.ha.cachemanager.CacheManager;
 import org.jboss.ha.framework.server.CacheManagerLocator;
 
@@ -973,8 +946,7 @@
        <literal>org.jboss.cache.jmx.CacheJmxWrapper</literal>. Here's an
        example:</para>
        
-       <programlisting><![CDATA[
-<?xml version="1.0" encoding="UTF-8"?>
+       <programlisting><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
 
 <server>
   <mbean code="org.jboss.cache.jmx.CacheJmxWrapper" 
@@ -1018,54 +990,56 @@
        <literal>deploy</literal> dir, or packaged in an ear or sar. Following
        is an example:</para>
        
-       <programlisting><![CDATA[
-<?xml version="1.0" encoding="UTF-8"?>
+       <programlisting><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
 
 <deployment xmlns="urn:jboss:bean-deployer:2.0">
 
-   <!-- First we create a Configuration object for the cache -->
-   <bean name="ExampleCacheConfig"
-         class="org.jboss.cache.config.Configuration">
+  <!-- First we create a Configuration object for the cache -->
+  <bean name="ExampleCacheConfig"
+        class="org.jboss.cache.config.Configuration">
 
-      <!-- Externally injected services -->  
-      <property name="runtimeConfig">
-         <bean name="ExampleCacheRuntimeConfig" class="org.jboss.cache.config.RuntimeConfig">
-            <property name="transactionManager">
-               <inject bean="jboss:service=TransactionManager" 
-                       property="TransactionManager"/>
-            </property>
-            <property name="muxChannelFactory"><inject bean="JChannelFactory"/></property>
-         </bean>
-      </property>
+    <!-- Externally injected services -->  
+    <property name="runtimeConfig">
+      <bean name="ExampleCacheRuntimeConfig" 
+            class="org.jboss.cache.config.RuntimeConfig">
+        <property name="transactionManager">
+          <inject bean="jboss:service=TransactionManager" 
+                  property="TransactionManager"/>
+        </property>
+        <property name="muxChannelFactory"><inject bean="JChannelFactory"/></property>
+      </bean>
+    </property>
       
-      <property name="multiplexerStack">udp</property>
-      <property name="clusterName">Example-EntityCache</property>        
-      <property name="isolationLevel">REPEATABLE_READ</property>
-      <property name="cacheMode">REPL_SYNC</property>
-      <property name="initialStateRetrievalTimeout">15000</property>
-      <property name="syncReplTimeout">20000</property>
-      <property name="lockAcquisitionTimeout">15000</property>
-      <property name="exposeManagementStatistics">true</property>
+    <property name="multiplexerStack">udp</property>
+    <property name="clusterName">Example-EntityCache</property>        
+    <property name="isolationLevel">REPEATABLE_READ</property>
+    <property name="cacheMode">REPL_SYNC</property>
+    <property name="initialStateRetrievalTimeout">15000</property>
+    <property name="syncReplTimeout">20000</property>
+    <property name="lockAcquisitionTimeout">15000</property>
+    <property name="exposeManagementStatistics">true</property>
 
-   </bean>
+  </bean>
  
-   <!-- Factory to build the Cache. -->
-   <bean name="DefaultCacheFactory" class="org.jboss.cache.DefaultCacheFactory">      
-      <constructor factoryClass="org.jboss.cache.DefaultCacheFactory" />
-   </bean>
+  <!-- Factory to build the Cache. -->
+  <bean name="DefaultCacheFactory" class="org.jboss.cache.DefaultCacheFactory">      
+    <constructor factoryClass="org.jboss.cache.DefaultCacheFactory" />
+  </bean>
   
-   <!-- The cache itself -->
-   <bean name="ExampleCache" class="org.jboss.cache.Cache">
-      <constructor factoryMethod="createCache">
-          <factory bean="DefaultCacheFactory"/>
-          <parameter class="org.jboss.cache.config.Configuration"><inject bean="ExampleCacheConfig"/></parameter>
-          <parameter class="boolean">false</false>
-      </constructor>
-   </bean>
+  <!-- The cache itself -->
+  <bean name="ExampleCache" class="org.jboss.cache.Cache">
+    <constructor factoryMethod="createCache">
+      <factory bean="DefaultCacheFactory"/>
+      <parameter class="org.jboss.cache.config.Configuration">
+        <inject bean="ExampleCacheConfig"/>
+      </parameter>
+      <parameter class="boolean">false</false>
+    </constructor>
+  </bean>
    
-   <bean name="ExampleService" class="org.foo.ExampleService">
-      <property name="cache"><inject bean="ExampleCache"/></property>
-   </bean>
+  <bean name="ExampleService" class="org.foo.ExampleService">
+    <property name="cache"><inject bean="ExampleCache"/></property>
+  </bean>
 
 </deployment>]]></programlisting>
 
@@ -1090,32 +1064,33 @@
        be visible in JMX. Here's an alternate approach that results in
        the cache being bound into JMX:</para>
        
-       <programlisting><![CDATA[
-<?xml version="1.0" encoding="UTF-8"?>
+       <programlisting><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
 
 <deployment xmlns="urn:jboss:bean-deployer:2.0">
 
-   <!-- First we create a Configuration object for the cache -->
-   <bean name="ExampleCacheConfig"
-         class="org.jboss.cache.config.Configuration">
+  <!-- First we create a Configuration object for the cache -->
+  <bean name="ExampleCacheConfig"
+        class="org.jboss.cache.config.Configuration">
 
       .... same as above
 
-   </bean>
+  </bean>
  
-   <bean name="ExampleCacheJmxWrapper" class="org.jboss.cache.jmx.CacheJmxWrapper">
+  <bean name="ExampleCacheJmxWrapper" class="org.jboss.cache.jmx.CacheJmxWrapper">
          
-      <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="foo:service=ExampleCacheJmxWrapper",
-                  exposedInterface=org.jboss.cache.jmx.CacheJmxWrapperMBean.class, registerDirectly=true)
-      </annotation>
+    <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(
+          name="foo:service=ExampleCacheJmxWrapper",
+          exposedInterface=org.jboss.cache.jmx.CacheJmxWrapperMBean.class, 
+          registerDirectly=true)
+    </annotation>
       
-      <property name="configuration"><inject bean="ExampleCacheConfig"/></property>
+    <property name="configuration"><inject bean="ExampleCacheConfig"/></property>
       
-   </bean>
+  </bean>
    
-   <bean name="ExampleService" class="org.foo.ExampleService">
-      <property name="cache"><inject bean="ExampleCacheJmxWrapper" property="cache"/></property>
-   </bean>
+  <bean name="ExampleService" class="org.foo.ExampleService">
+    <property name="cache"><inject bean="ExampleCacheJmxWrapper" property="cache"/></property>
+  </bean>
 
 </deployment>]]></programlisting>
      
@@ -1124,7 +1099,7 @@
      a JBoss Cache class that provides an MBean interface for a cache.
      Adding an &lt;annotation&gt; element binds the JBoss Microcontainer
      <literal>@JMX</literal> annotation to the bean; that in turn results
-     in JBoss AS registering the bean in JXM as part of the deployment process.
+     in JBoss AS registering the bean in JMX as part of the deployment process.
      </para>
      
      <para>The actual underlying <literal>org.jboss.cache.Cache</literal> instance




More information about the jboss-cvs-commits mailing list