[jboss-cvs] JBossAS SVN: r81817 - in trunk: cluster/src/resources/jboss-cache-manager.sar/META-INF and 3 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Nov 29 23:19:59 EST 2008


Author: bstansberry at jboss.com
Date: 2008-11-29 23:19:58 -0500 (Sat, 29 Nov 2008)
New Revision: 81817

Removed:
   trunk/cluster/src/etc/jboss-cache-manager-jboss-beans.xml
Modified:
   trunk/cluster/src/resources/jboss-cache-manager.sar/META-INF/jboss-cache-configs.xml
   trunk/cluster/src/resources/jboss-cache-manager.sar/META-INF/jboss-cache-manager-jboss-beans.xml
   trunk/testsuite/src/main/org/jboss/test/classloader/leak/clstore/ClassLoaderStore.java
   trunk/testsuite/src/main/org/jboss/test/cluster/classloader/leak/test/FieldGranularityClassloaderLeakUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/web/test/SessionPassivationTestCase.java
Log:
[JBAS-6182] Add support for JBC MVCC locking in Hibernate 2nd Level Cache configs
[JBAS-6263] Use Microcontainer to build JBC configs

Deleted: trunk/cluster/src/etc/jboss-cache-manager-jboss-beans.xml
===================================================================
--- trunk/cluster/src/etc/jboss-cache-manager-jboss-beans.xml	2008-11-29 18:10:45 UTC (rev 81816)
+++ trunk/cluster/src/etc/jboss-cache-manager-jboss-beans.xml	2008-11-30 04:19:58 UTC (rev 81817)
@@ -1,245 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
-   <!-- Factory/registry for JBoss Cache and PojoCache instances used in the AS -->
-   <bean name="CacheManager" class="org.jboss.ha.cachemanager.CacheManager">
-
-      <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.cache:service=CacheManager",                                          exposedInterface=org.jboss.ha.cachemanager.CacheManagerMBean.class, registerDirectly=true)</annotation>
-
-      <!-- This doesn't seem to work, so the service binds itself for now
-      <annotation>@org.jboss.aop.microcontainer.aspects.jndi.JndiBinding(name="java:CacheManager")</annotation>
-      -->
-      <property name="jndiName">java:CacheManager</property>
-      
-      <property name="configurationRegistry"><inject bean="CacheConfigurationRegistry"/></property>
-      <property name="channelFactory"><inject bean="JChannelFactory"/></property>
-      
-      <!-- Aliases for cache names. Allows caches to be shared across different client types -->
-      <property name="configAliases">
-         <map keyClass="java.lang.String" valueClass="java.lang.String">
-            <!-- Use the HAPartition cache for ClusteredSSO caching -->
-            <entry>
-               <key>clustered-sso</key>
-               <value>ha-partition</value>
-            </entry>
-         </map>
-      </property>
-      
-   </bean>
-   
-   <!-- Provides batching functionality for caches that don't want to interact with regular JTA Transactions -->
-   <bean name="StandardJBossCacheBatchManager" class="org.jboss.cache.transaction.BatchModeTransactionManager"/>
-   
-   <!-- 
-     | Registry of named JBoss Cache configurations. Users of the CacheManager
-     | request a cache with a particular configuration by providing the name
-     | of one of these configurations.
-   -->
-   <bean name="CacheConfigurationRegistry" class="org.jboss.ha.cachemanager.DependencyInjectedConfigurationRegistry">
-   
-      <!-- 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 and EBJ3 SFSBs -->
-   <entry><key>standard-session-cache</key>
-   <value>      
-      <bean name="StandardSessionCacheConfig" class="org.jboss.cache.config.Configuration">
-
-         <property name="runtimeConfig">
-            <bean class="org.jboss.cache.config.RuntimeConfig">
-               <property name="transactionManager"><inject bean="StandardJBossCacheBatchManager"/></property>
-            </bean>
-         </property>
-         
-         <property name="multiplexerStack">${jboss.default.jgroups.stack:udp}</property>
-      
-         <property name="clusterName">${jboss.partition.name:DefaultPartition}-SessionCache</property>
-      
-         <property name="nodeLockingScheme">PESSIMISTIC</property>
-         <property name="isolationLevel">REPEATABLE_READ</property>
-         <property name="cacheMode">REPL_ASYNC</property>
-      
-         <property name="syncReplTimeout">17500</property>
-         <property name="lockAcquisitionTimeout">15000</property>
-         <property name="stateRetrievalTimeout">60000</property>
-      
-         <property name="useRegionBasedMarshalling">false</property>
-         <property name="inactiveOnStartup">false</property>
-           
-         <property name="exposeManagementStatistics">true</property>
-      
-         <property name="buddyReplicationConfig">
-            <bean class="org.jboss.cache.config.BuddyReplicationConfig">
-               
-               <property name="enabled">false</property>
-               <property name="buddyPoolName">default</property>
-               <property name="buddyCommunicationTimeout">17500</property>
-
-               <property name="autoDataGravitation">false</property>
-               <property name="dataGravitationRemoveOnFind">true</property>
-               <property name="dataGravitationSearchBackupTrees">true</property>
-               
-               <property name="buddyLocatorConfig">
-                  <bean class="org.jboss.cache.buddyreplication.NextMemberBuddyLocatorConfig">
-                     <property name="numBuddies">1</property>
-                     <property name="ignoreColocatedBuddies">true</property>
-                   </bean>
-               </property>
-            </bean>
-         </property>
-         <property name="cacheLoaderConfig">
-            <bean class="org.jboss.cache.config.CacheLoaderConfig">
-                  <property name="passivation">true</property>
-                   <property name="shared">false</property>
-                   <property name="individualCacheLoaderConfigs">
-                     <list>
-                        <bean class="org.jboss.cache.loader.FileCacheLoaderConfig">
-                           <property name="location">${jboss.server.data.dir}${/}sessions</property>
-                           <property name="async">false</property>
-                           <property name="fetchPersistentState">true</property>
-                           <property name="ignoreModifications">false</property>
-                           <property name="checkCharacterPortability">false</property>
-                        </bean>
-                     </list>
-                   </property>
-            </bean>
-         </property>
-      </bean>      
-   </value>
-   </entry>
-   
-   <!-- Appropriate for web sessions with FIELD granularity -->
-   <entry><key>field-granularity-session-cache</key>
-   <value>
-      
-      <bean name="FieldSessionCacheConfig" class="org.jboss.cache.config.Configuration">
-      
-         <property name="runtimeConfig">
-            <bean class="org.jboss.cache.config.RuntimeConfig">
-               <property name="transactionManager"><inject bean="StandardJBossCacheBatchManager"/></property>
-            </bean>
-         </property>
-         
-         <property name="multiplexerStack">${jboss.default.jgroups.stack:udp}</property>
-      
-         <property name="clusterName">${jboss.partition.name:DefaultPartition}-FieldSessionCache</property>
-      
-         <property name="nodeLockingScheme">PESSIMISTIC</property>
-         <property name="isolationLevel">REPEATABLE_READ</property>
-         <property name="cacheMode">REPL_ASYNC</property>
-      
-         <property name="syncReplTimeout">17500</property>
-         <property name="lockAcquisitionTimeout">15000</property>
-         <property name="stateRetrievalTimeout">60000</property>
-          
-         <!-- Field granularity requires region-based marshalling -->
-         <property name="useRegionBasedMarshalling">true</property>
-         <property name="inactiveOnStartup">true</property>
-           
-         <property name="exposeManagementStatistics">true</property>
-      
-         <property name="buddyReplicationConfig">
-            <bean class="org.jboss.cache.config.BuddyReplicationConfig">
-               
-               <property name="enabled">false</property>
-               <property name="buddyPoolName">default</property>
-               <property name="buddyCommunicationTimeout">17500</property>
-
-               <property name="autoDataGravitation">false</property>
-               <property name="dataGravitationRemoveOnFind">true</property>
-               <property name="dataGravitationSearchBackupTrees">true</property>
-               
-               <property name="buddyLocatorConfig">
-                  <bean class="org.jboss.cache.buddyreplication.NextMemberBuddyLocatorConfig">
-                     <property name="numBuddies">1</property>
-                     <property name="ignoreColocatedBuddies">true</property>
-                   </bean>
-               </property>
-            </bean>
-         </property>
-         <property name="cacheLoaderConfig">
-            <bean class="org.jboss.cache.config.CacheLoaderConfig">
-                  <property name="passivation">true</property>
-                   <property name="shared">false</property>
-                   <property name="individualCacheLoaderConfigs">
-                     <list>
-                        <bean class="org.jboss.cache.loader.FileCacheLoaderConfig">
-                           <property name="location">${jboss.server.data.dir}${/}field-session</property>
-                           <property name="async">false</property>
-                           <property name="fetchPersistentState">true</property>
-                           <property name="ignoreModifications">false</property>
-                           <property name="checkCharacterPortability">false</property>
-                        </bean>
-                     </list>
-                   </property>
-            </bean>
-         </property>
-        
-         <!-- FIELD granularity webapps use JBoss Cache eviction -->
-         <property name="evictionConfig">
-             <bean class="org.jboss.cache.config.EvictionConfig">
-               <property name="defaultEvictionPolicyClass">org.jboss.cache.eviction.NullEvictionPolicy</property>
-               <property name="wakeupIntervalSeconds">5</property>
-               <property name="evictionRegionConfigs">
-                  <list>
-                     <!-- Default region will never timeout. Do not change this -->
-                     <bean class="org.jboss.cache.config.EvictionRegionConfig">
-                        <property name="regionName">/_default_</property>
-                        <property name="evictionPolicyConfig">
-                           <bean class="org.jboss.cache.eviction.NullEvictionPolicyConfig"/>
-                        </property>
-                     </bean>
-                     <!-- JBossWeb integration code may programatically create other
-                          regions as webapps are deployed -->
-                  </list>
-            </property>
-            </bean>
-         </property>
-      </bean>
-   </value>
-   </entry>
-   
-   <!-- 
-      Appropriate for the HAPartition-based services, e.g. DistributedState, 
-      HA-JNDI. Also valid for use by the JBossWeb ClusteredSingleSignOn valve.
-    -->
-   <entry><key>ha-partition</key>
-   <value>
-      
-      <bean name="HAPartitionCache" class="org.jboss.cache.config.Configuration">
-
-         <property name="runtimeConfig">
-            <bean class="org.jboss.cache.config.RuntimeConfig">
-               <property name="transactionManager"><inject bean="StandardJBossCacheBatchManager"/></property>
-            </bean>
-         </property>
-         
-         <property name="multiplexerStack">${jboss.default.jgroups.stack:udp}</property>
-      
-         <property name="clusterName">${jboss.partition.name:DefaultPartition}-HAPartitionCache</property>
-      
-         <property name="nodeLockingSchemeString" class="java.lang.String">PESSIMISTIC</property>
-         <property name="isolationLevelString" class="java.lang.String">REPEATABLE_READ</property>
-         <property name="cacheModeString">REPL_SYNC</property>
-      
-         <property name="syncReplTimeout">17500</property>
-         <property name="lockAcquisitionTimeout">15000</property>
-         <property name="stateRetrievalTimeout">60000</property>
-      
-         <property name="useRegionBasedMarshalling">false</property>
-         <property name="inactiveOnStartup">false</property>
-           
-         <property name="exposeManagementStatistics">true</property>
-      </bean>
-   </value>
-   </entry>
-
-         </map>
-      </property>
-   </bean>
-    
-</deployment>
\ No newline at end of file

Modified: trunk/cluster/src/resources/jboss-cache-manager.sar/META-INF/jboss-cache-configs.xml
===================================================================
--- trunk/cluster/src/resources/jboss-cache-manager.sar/META-INF/jboss-cache-configs.xml	2008-11-29 18:10:45 UTC (rev 81816)
+++ trunk/cluster/src/resources/jboss-cache-manager.sar/META-INF/jboss-cache-configs.xml	2008-11-30 04:19:58 UTC (rev 81817)
@@ -1,1162 +1,38 @@
-<cache-configs>
+<?xml version="1.0" encoding="UTF-8"?>
+<registry:cache-configs xmlns="urn:jboss:jbosscache-core:config:3.0" 
+                        xmlns:registry="urn:jboss:jbosscache-core:cache-repo:3.0">
 
     <!-- 
-      | A config appropriate for HttpSession caches.
-      | Not for use with FIELD replication granularity webapps.
+       JBoss Cache configurations using the standard JBC 3.x config format
+       can be added to this file, and will usable by the AS's CacheManager
+       if the "configResource" property in the jboss-cache-manager-jboss-beans.xml
+       file's "CacheConfigurationRegistry" bean is uncommented. (It is
+       commented out by default.)
+       However, use of the microcontainer config format used in this
+       sar's jboss-cache-manager-jboss-beans.xml file is recommended.
     -->
-    <cache-config name="standard-session-cache">
-
-        <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.BatchModeTransactionManagerLookup</attribute>
-
-        <attribute name="NodeLockingScheme">PESSIMISTIC</attribute>
-        <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
-
-        <!-- Valid modes are REPL_ASYNC and REPL_SYNC -->
-        <attribute name="CacheMode">REPL_ASYNC</attribute>
-
-        <!-- Name of cluster. Needs to be the same for all members, in order
-             to find each other -->
-        <attribute name="ClusterName">${jboss.partition.name:DefaultPartition}-SessionCache</attribute>
-        
-        <!-- Use a UDP (multicast) based stack. Need JGroups flow control (FC)
-             because we are using asynchronous replication.
-        -->
-        <attribute name="MultiplexerStack">${jboss.default.jgroups.stack:udp}</attribute>
-
-        <!-- Must fetch state. -->
-        <attribute name="FetchInMemoryState">true</attribute>
-
-        <!--
-          The max amount of time (in milliseconds) we wait until the
-          state (ie. the contents of the cache) are retrieved from
-          existing members at startup.
-        -->
-        <attribute name="StateRetrievalTimeout">60000</attribute>
-
-        <!--
-            Number of milliseconds to wait until all responses for a
-            synchronous call have been received.
-        -->
-        <attribute name="SyncReplTimeout">17500</attribute>
-
-        <!-- Max number of milliseconds to wait for a lock acquisition -->
-        <attribute name="LockAcquisitionTimeout">15000</attribute>
-
-        <!-- Region-based marshalling is not needed. -->
-        <attribute name="UseRegionBasedMarshalling">false</attribute>
-        <!-- Must match the value of "UseRegionBasedMarshalling" -->
-        <attribute name="InactiveOnStartup">false</attribute>
-
-        <!-- Disable asynchronous RPC marshalling/sending -->
-        <attribute name="SerializationExecutorPoolSize">0</attribute>
-        
-        <!-- We have no asynchronous notification listeners -->
-        <attribute name="ListenerAsyncPoolSize">0</attribute>
-           
-        <attribute name="ExposeManagementStatistics">true</attribute>
-
-        <!-- Buddy Replication config -->
-        <attribute name="BuddyReplicationConfig">
-          <config>
-            <buddyReplicationEnabled>false</buddyReplicationEnabled>
-            <buddyLocatorClass>org.jboss.cache.buddyreplication.NextMemberBuddyLocator</buddyLocatorClass>
-            <!-- numBuddies is the number of backup nodes each node maintains.  
-                 ignoreColocatedBuddies means that each node will *try* to 
-                 select a buddy on a different physical host. If not able to do 
-                 so though, it will fall back to colocated nodes. -->
-            <buddyLocatorProperties>
-               numBuddies = 1
-               ignoreColocatedBuddies = true
-            </buddyLocatorProperties>
-
-            <!-- A way to specify a preferred replication group.  If specified, 
-                 we try and pick a buddy why shares the same pool name (falling 
-                 back to other buddies if not available).  This allows the sysdmin 
-                 to hint at backup buddies are picked, so for example, nodes may 
-                 be hinted topick buddies on a different physical rack or power 
-                 supply for added fault tolerance.  
-            -->
-            <buddyPoolName>default</buddyPoolName>
-            <!-- communication timeout for inter-buddy group organisation 
-                 messages (such as assigning to and removing from groups -->
-            <buddyCommunicationTimeout>17500</buddyCommunicationTimeout>
-
-            <!-- Do not change these -->
-            <autoDataGravitation>false</autoDataGravitation>
-            <dataGravitationRemoveOnFind>true</dataGravitationRemoveOnFind>
-            <dataGravitationSearchBackupTrees>true</dataGravitationSearchBackupTrees>
-
-          </config>
-        </attribute>
-        
-        <!-- Cache Loader for session passivation --> 
-        <attribute name="CacheLoaderConfig">
-          <config>
-            <passivation>true</passivation>
-            <shared>false</shared>
-
-            <purgeOnStartup>true</purgeOnStartup>
-
-            <cacheloader>
-               <class>org.jboss.cache.loader.FileCacheLoader</class>
-               <properties>
-                  location=${jboss.server.data.dir}${/}session
-               </properties>
-               <async>false</async>
-               <fetchPersistentState>true</fetchPersistentState>
-               <ignoreModifications>false</ignoreModifications>
-               <checkCharacterPortability>false</checkCharacterPortability>
-            </cacheloader>
-
-          </config>
-        </attribute>
-
-        <!-- 
-           JBoss Cache eviction is not needed; webapp or SFSB container 
-           manages eviction by itself.
-        -->
-
-    </cache-config>
-
-    <!-- 
-      | A config appropriate for HttpSession caches for webapps 
-      | that use FIELD replication granularity.
-    -->
-    <cache-config name="field-granularity-session-cache">
-
-        <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.BatchModeTransactionManagerLookup</attribute>
-
-        <attribute name="NodeLockingScheme">PESSIMISTIC</attribute>
-        <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
-
-        <!-- Valid modes are LOCAL
-                             REPL_ASYNC
-                             REPL_SYNC
-        -->
-        <attribute name="CacheMode">REPL_ASYNC</attribute>
-
-        <!-- Name of cluster. Needs to be the same for all members, in order
-             to find each other -->
-        <attribute name="ClusterName">${jboss.partition.name:DefaultPartition}-FieldSessionCache</attribute>
-        
-        <!-- Use a UDP (multicast) based stack. Need JGroups flow control (FC)
-             because we are using asynchronous replication.
-        -->
-        <attribute name="MultiplexerStack">${jboss.default.jgroups.stack:udp}</attribute>
-
-        <!-- Must fetch state. -->
-        <attribute name="FetchInMemoryState">true</attribute>
-
-        <!--
-          The max amount of time (in milliseconds) we wait until the
-          state (ie. the contents of the cache) are retrieved from
-          existing members at startup.
-        -->
-        <attribute name="StateRetrievalTimeout">60000</attribute>
-
-        <!--
-            Number of milliseconds to wait until all responses for a
-            synchronous call have been received.
-        -->
-        <attribute name="SyncReplTimeout">17500</attribute>
-
-        <!-- Max number of milliseconds to wait for a lock acquisition -->
-        <attribute name="LockAcquisitionTimeout">15000</attribute>
-
-        <!--
-          Indicate whether to use marshalling or not. Set this to true if you 
-          are running under a scoped class loader, e.g., inside an application 
-          server. Default is "false".
-        -->
-        <attribute name="UseRegionBasedMarshalling">true</attribute>
-        <!-- Must match the value of "useRegionBasedMarshalling" -->
-        <attribute name="InactiveOnStartup">true</attribute>
-
-        <!-- Disable asynchronous RPC marshalling/sending -->
-        <attribute name="SerializationExecutorPoolSize">0</attribute>
-        
-        <!-- We have no asynchronous notification listeners -->
-        <attribute name="ListenerAsyncPoolSize">0</attribute>
-           
-        <attribute name="ExposeManagementStatistics">true</attribute>
-
-        <!-- Buddy Replication config -->
-        <attribute name="BuddyReplicationConfig">
-          <config>
-            <buddyReplicationEnabled>false</buddyReplicationEnabled>
-            <buddyLocatorClass>org.jboss.cache.buddyreplication.NextMemberBuddyLocator</buddyLocatorClass>
-            <!-- numBuddies is the number of backup nodes each node maintains.  
-                 ignoreColocatedBuddies means that each node will *try* to 
-                 select a buddy on a different physical host. If not able to do 
-                 so though, it will fall back to colocated nodes. -->
-            <buddyLocatorProperties>
-               numBuddies = 1
-               ignoreColocatedBuddies = true
-            </buddyLocatorProperties>
-
-            <!-- A way to specify a preferred replication group.  If specified, 
-                 we try and pick a buddy why shares the same pool name (falling 
-                 back to other buddies if not available).  This allows the sysdmin 
-                 to hint at backup buddies are picked, so for example, nodes may 
-                 be hinted topick buddies on a different physical rack or power 
-                 supply for added fault tolerance.  
-            -->
-            <buddyPoolName>default</buddyPoolName>
-            <!-- communication timeout for inter-buddy group organisation 
-                 messages (such as assigning to and removing from groups -->
-            <buddyCommunicationTimeout>17500</buddyCommunicationTimeout>
-
-            <!-- Do not change these -->
-            <autoDataGravitation>false</autoDataGravitation>
-            <dataGravitationRemoveOnFind>true</dataGravitationRemoveOnFind>
-            <dataGravitationSearchBackupTrees>true</dataGravitationSearchBackupTrees>
-
-          </config>
-        </attribute>
-        
-        <!-- Cache Loader for session passivation --> 
-        <attribute name="CacheLoaderConfig">
-          <config>
-            <passivation>true</passivation>
-            <shared>false</shared>
-
-            <purgeOnStartup>true</purgeOnStartup>
-
-            <cacheloader>
-               <class>org.jboss.cache.loader.FileCacheLoader</class>
-               <properties>
-                  location=${jboss.server.data.dir}${/}field-session
-               </properties>
-               <async>false</async>
-               <fetchPersistentState>true</fetchPersistentState>
-               <ignoreModifications>false</ignoreModifications>
-               <checkCharacterPortability>false</checkCharacterPortability>
-            </cacheloader>
-
-          </config>
-        </attribute>
-
-        <!-- FIELD granularity webapps use JBoss Cache eviction -->
-        <attribute name="EvictionPolicyConfig">
-          <config>
-            <attribute name="wakeUpIntervalSeconds">5</attribute>
-            <!-- Name of the DEFAULT eviction policy class. -->
-            <attribute name="policyClass">org.jboss.cache.eviction.NullEvictionPolicy</attribute>
-            <!--  Cache wide default region -->
-            <region name="/_default_"/>
-            <!-- JBossWeb integration code will programatically create
-                 other regions as webapps are deployed -->
-          </config>
-        </attribute>
-
-    </cache-config>
-
-    <!-- 
-      | A config appropriate for EJB3 SFSB caching.
-    -->
-    <cache-config name="sfsb-cache">
-        <!--  No transaction manager lookup -->
-        
-        <attribute name="NodeLockingScheme">PESSIMISTIC</attribute>
-        <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
-
-        <!-- Valid modes are LOCAL
-                             REPL_ASYNC
-                             REPL_SYNC
-        -->
-        <attribute name="CacheMode">REPL_ASYNC</attribute>
-
-        <!-- Name of cluster. Needs to be the same for all members, in order
-             to find each other -->
-        <attribute name="ClusterName">${jboss.partition.name:DefaultPartition}-SFSBCache</attribute>
-        
-        <!-- Use a UDP (multicast) based stack. Need JGroups flow control (FC)
-             because we are using asynchronous replication.
-        -->
-        <attribute name="MultiplexerStack">${jboss.default.jgroups.stack:udp}</attribute>
-
-        <!-- Must fetch state. -->
-        <attribute name="FetchInMemoryState">true</attribute>
-
-        <!--
-          The max amount of time (in milliseconds) we wait until the
-          state (ie. the contents of the cache) are retrieved from
-          existing members at startup.
-        -->
-        <attribute name="StateRetrievalTimeout">60000</attribute>
-
-        <!--
-            Number of milliseconds to wait until all responses for a
-            synchronous call have been received.
-        -->
-        <attribute name="SyncReplTimeout">17500</attribute>
-
-        <!-- Max number of milliseconds to wait for a lock acquisition -->
-        <attribute name="LockAcquisitionTimeout">15000</attribute>
-
-        <!--
-          SFSBs use region-based marshalling to provide for partial state
-          transfer during deployment/undeployment.
-        -->
-        <attribute name="UseRegionBasedMarshalling">true</attribute>
-        <!-- Must match the value of "useRegionBasedMarshalling" -->
-        <attribute name="InactiveOnStartup">true</attribute>
-
-        <!-- Disable asynchronous RPC marshalling/sending -->
-        <attribute name="SerializationExecutorPoolSize">0</attribute>
-        
-        <!-- We have no asynchronous notification listeners -->
-        <attribute name="ListenerAsyncPoolSize">0</attribute>
-           
-        <attribute name="ExposeManagementStatistics">true</attribute>
-
-        <!-- Buddy Replication config -->
-        <attribute name="BuddyReplicationConfig">
-          <config>
-            <buddyReplicationEnabled>false</buddyReplicationEnabled>
-            <buddyLocatorClass>org.jboss.cache.buddyreplication.NextMemberBuddyLocator</buddyLocatorClass>
-            <!-- numBuddies is the number of backup nodes each node maintains.  
-                 ignoreColocatedBuddies means that each node will *try* to 
-                 select a buddy on a different physical host. If not able to do 
-                 so though, it will fall back to colocated nodes. -->
-            <buddyLocatorProperties>
-               numBuddies = 1
-               ignoreColocatedBuddies = true
-            </buddyLocatorProperties>
-
-            <!-- A way to specify a preferred replication group.  If specified, 
-                 we try and pick a buddy why shares the same pool name (falling 
-                 back to other buddies if not available).  This allows the sysdmin 
-                 to hint at backup buddies are picked, so for example, nodes may 
-                 be hinted topick buddies on a different physical rack or power 
-                 supply for added fault tolerance.  
-            -->
-            <buddyPoolName>default</buddyPoolName>
-            <!-- communication timeout for inter-buddy group organisation 
-                 messages (such as assigning to and removing from groups -->
-            <buddyCommunicationTimeout>17500</buddyCommunicationTimeout>
-
-            <!-- Do not change these -->
-            <autoDataGravitation>false</autoDataGravitation>
-            <dataGravitationRemoveOnFind>true</dataGravitationRemoveOnFind>
-            <dataGravitationSearchBackupTrees>true</dataGravitationSearchBackupTrees>
-
-          </config>
-        </attribute>
-        
-        <!-- Cache Loader for session passivation --> 
-        <attribute name="CacheLoaderConfig">
-          <config>
-            <passivation>true</passivation>
-            <shared>false</shared>
-
-            <purgeOnStartup>true</purgeOnStartup>
-
-            <cacheloader>
-               <class>org.jboss.cache.loader.FileCacheLoader</class>
-               <properties>
-                  location=${jboss.server.data.dir}${/}sfsb
-               </properties>
-               <async>false</async>
-               <fetchPersistentState>true</fetchPersistentState>
-               <ignoreModifications>false</ignoreModifications>
-               <checkCharacterPortability>false</checkCharacterPortability>
-            </cacheloader>
-
-          </config>
-        </attribute>
-
-        <!-- SFSBs use JBoss Cache eviction -->
-        <attribute name="EvictionPolicyConfig">
-          <config>
-            <attribute name="wakeUpIntervalSeconds">5</attribute>
-            <!-- Name of the DEFAULT eviction policy class. -->
-            <attribute name="policyClass">org.jboss.cache.eviction.NullEvictionPolicy</attribute>
-            <!--  Cache wide default region -->
-            <region name="/_default_"/>
-            <!-- EJB3 integration code will programatically create
-                 other regions as beans are deployed -->
-          </config>
-        </attribute>
-
-    </cache-config>
-
-    <!-- 
-      | A config appropriate for the HAPartition-based services, e.g.
-      | DistributedState, HA-JNDI. Also valid for use by the JBossWeb 
-      | ClusteredSingleSignOn valve.
-    -->
-    <cache-config name="ha-partition">
-
-        <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.BatchModeTransactionManagerLookup</attribute>
-
-        <attribute name="NodeLockingScheme">PESSIMISTIC</attribute>
-        <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
-
-        <attribute name="CacheMode">REPL_SYNC</attribute>
-
-        <attribute name="ClusterName">${jboss.partition.name:DefaultPartition}-HAPartitionCache</attribute>
-        
-        <!-- Use a UDP (multicast) based stack. Need JGroups flow control (FC)
-             because we are using asynchronous replication.
-        -->
-        <attribute name="MultiplexerStack">${jboss.default.jgroups.stack:udp}</attribute>
-
-        <attribute name="FetchInMemoryState">true</attribute>
-
-        <attribute name="StateRetrievalTimeout">60000</attribute>
-        <attribute name="SyncReplTimeout">17500</attribute>
-        <attribute name="LockAcquisitionTimeout">15000</attribute>
-
-        <attribute name="UseRegionBasedMarshalling">false</attribute>
-        <attribute name="InactiveOnStartup">false</attribute>
-
-        <!-- Disable asynchronous RPC marshalling/sending -->
-        <attribute name="SerializationExecutorPoolSize">0</attribute>
-        
-        <!-- We have no asynchronous notification listeners -->
-        <attribute name="ListenerAsyncPoolSize">0</attribute>
-           
-        <attribute name="ExposeManagementStatistics">true</attribute>
-
-    </cache-config>
-
-    <!-- 
-      | Following are JBoss Cache configurations suitable for different 
-      | Hibernate 2nd Level Cache uses (e.g. entities vs. queries).
-      |
-      | In all cases, TransactionManager configuration not required.
-      | Hibernate will plug in its own transaction manager integration. 
-    -->
     
-    
-    <!-- A config appropriate for entity/collection caching. -->
-    <cache-config name="optimistic-entity">
+    <!-- An example config; not intended for use; just to illustrate JBC 3's
+         config format and to comply with schema requirement for a cache-config
+         element. Removing this example is recommended if a real config is added.
+    --> 
+    <registry:cache-config name="example">
 
-        <!-- Node locking scheme -->
-        <attribute name="NodeLockingScheme">OPTIMISTIC</attribute>
-
-        <!-- Mode of communication with peer caches.
-        
-             INVALIDATION_SYNC is highly recommended as the mode for use
-             with entity and collection caches.
-        -->
-        <attribute name="CacheMode">INVALIDATION_SYNC</attribute>
-
-        <!-- Name of cluster. Needs to be the same for all members, in order
-             to find each other -->
-        <attribute name="ClusterName">${jboss.partition.name:DefaultPartition}-optimistic-entity</attribute>
-        
-        <!-- Use a UDP (multicast) based stack. A udp-sync stack might be
-             slightly better (no JGroups FC) but we stick with udp to
-             help ensure this cache and others like timestamps-cache
-             that require FC can use the same underlying JGroups resources. -->
-        <attribute name="MultiplexerStack">${jboss.default.jgroups.stack:udp}</attribute>
-
-        <!-- Whether or not to fetch state on joining a cluster. -->
-        <attribute name="FetchInMemoryState">false</attribute>
-
-        <!--
-          The max amount of time (in milliseconds) we wait until the
-          state (ie. the contents of the cache) are retrieved from
-          existing members at startup. Ignored if FetchInMemoryState=false.
-        -->
-        <attribute name="StateRetrievalTimeout">20000</attribute>
-
-        <!--
-            Number of milliseconds to wait until all responses for a
-            synchronous call have been received.
-        -->
-        <attribute name="SyncReplTimeout">20000</attribute>
-
-        <!-- Max number of milliseconds to wait for a lock acquisition -->
-        <attribute name="LockAcquisitionTimeout">15000</attribute>
-
-       <!--
-          Indicate whether to use marshalling or not. Set this to true if you 
-          are running under a scoped class loader, e.g., inside an application 
-          server.
-       -->
-       <attribute name="UseRegionBasedMarshalling">true</attribute>
-       <!-- Must match the value of "useRegionBasedMarshalling" -->
-       <attribute name="InactiveOnStartup">true</attribute>
-
-       <!-- Disable asynchronous RPC marshalling/sending -->
-       <attribute name="SerializationExecutorPoolSize">0</attribute>
-        
-       <!-- We have no asynchronous notification listeners -->
-       <attribute name="ListenerAsyncPoolSize">0</attribute>
-
-       <!--  Eviction policy configurations. -->
-       <attribute name="EvictionPolicyConfig">
-        <config>
-          <attribute name="wakeUpIntervalSeconds">5</attribute>
-          <!-- Name of the DEFAULT eviction policy class. -->
-          <attribute name="policyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
-          <!--  Cache wide default -->
-          <region name="/_default_">
-            <!-- Evict LRU node once we have more than this number of nodes -->
-            <attribute name="maxNodes">10000</attribute>
-            <!-- And, evict any node that hasn't been accessed in this many seconds -->
-            <attribute name="timeToLiveSeconds">1000</attribute>
-            <!-- Don't evict a node that's been accessed within this many seconds. 
-                 Set this to a value greater than your max expected transaction length. -->
-            <attribute name="minTimeToLiveSeconds">120</attribute>
-          </region>
-          <!--  Don't ever evict modification timestamps -->
-          <region name="/TS" policyClass="org.jboss.cache.eviction.NullEvictionPolicy"/>
-        </config>
-     </attribute>
-
-    </cache-config>
-
-    <!-- A config appropriate for entity/collection caching that
-         uses pessimistic locking -->
-    <cache-config name="pessimistic-entity">
-
-        <!-- Node locking scheme -->
-        <attribute name="NodeLockingScheme">PESSIMISTIC</attribute>
-
-        <!--
-            READ_COMMITTED is as strong as necessary for most 
-            2nd Level Cache use cases.
-        -->
-        <attribute name="IsolationLevel">READ_COMMITTED</attribute>
-
-        <!-- Mode of communication with peer caches.
-        
-             INVALIDATION_SYNC is highly recommended as the mode for use
-             with entity and collection caches.
-        -->
-        <attribute name="CacheMode">INVALIDATION_SYNC</attribute>
-
-        <!-- Name of cluster. Needs to be the same for all members, in order
-             to find each other -->
-        <attribute name="ClusterName">${jboss.partition.name:DefaultPartition}-pessimistic-entity</attribute>
-        
-        <!-- Use a UDP (multicast) based stack. A udp-sync stack might be
-             slightly better (no JGroups FC) but we stick with udp to
-             help ensure this cache and others like timestamps-cache
-             that require FC can use the same underlying JGroups resources. -->
-        <attribute name="MultiplexerStack">${jboss.default.jgroups.stack:udp}</attribute>
-
-        <!-- Whether or not to fetch state on joining a cluster. -->
-        <attribute name="FetchInMemoryState">false</attribute>
-
-        <!--
-          The max amount of time (in milliseconds) we wait until the
-          state (ie. the contents of the cache) are retrieved from
-          existing members at startup. Ignored if FetchInMemoryState=false.
-        -->
-        <attribute name="StateRetrievalTimeout">20000</attribute>
-
-        <!--
-            Number of milliseconds to wait until all responses for a
-            synchronous call have been received.
-        -->
-        <attribute name="SyncReplTimeout">20000</attribute>
-
-        <!-- Max number of milliseconds to wait for a lock acquisition -->
-        <attribute name="LockAcquisitionTimeout">15000</attribute>
-
-       <!--
-          Indicate whether to use marshalling or not. Set this to true if you 
-          are running under a scoped class loader, e.g., inside an application 
-          server.
-       -->
-       <attribute name="UseRegionBasedMarshalling">true</attribute>
-       <!-- Must match the value of "useRegionBasedMarshalling" -->
-       <attribute name="InactiveOnStartup">true</attribute>
-
-       <!-- Disable asynchronous RPC marshalling/sending -->
-       <attribute name="SerializationExecutorPoolSize">0</attribute>
-        
-       <!-- We have no asynchronous notification listeners -->
-       <attribute name="ListenerAsyncPoolSize">0</attribute>
-
-      <!--  Eviction policy configurations. -->
-      <attribute name="EvictionPolicyConfig">
-        <config>
-          <attribute name="wakeUpIntervalSeconds">5</attribute>
-          <!-- Name of the DEFAULT eviction policy class. -->
-          <attribute name="policyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
-          <!--  Cache wide default -->
-          <region name="/_default_">
-            <!-- Evict LRU node once we have more than this number of nodes -->
-            <attribute name="maxNodes">10000</attribute>
-            <!-- And, evict any node that hasn't been accessed in this many seconds -->
-            <attribute name="timeToLiveSeconds">1000</attribute>
-            <!-- Don't evict a node that's been accessed within this many seconds. 
-                 Set this to a value greater than your max expected transaction length. -->
-            <attribute name="minTimeToLiveSeconds">120</attribute>
-          </region>
-          <!--  Don't ever evict modification timestamps -->
-          <region name="/TS" policyClass="org.jboss.cache.eviction.NullEvictionPolicy"/>
-        </config>
-     </attribute>
-
-    </cache-config>        
+       <locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="15000" nodeLockingScheme="pessimistic"/>
+       <serialization useRegionBasedMarshalling="true"/>
+       <startup regionsInactiveOnStartup="true"/>
+       <clustering clusterName="${jboss.partition.name:DefaultPartition}-example" mode="r">
+         <stateRetrieval fetchInMemoryState="true" timeout="60000"/>
+         <jgroupsConfig multiplexerStack="${jboss.default.jgroups.stack:udp}"/>
+         <sync replTimeout="175000"/>
+       </clustering>
+       <eviction wakeUpInterval="5000">
+          <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm">
+             <property name="maxNodes" value="5000" />
+             <property name="timeToLive" value="1000" />
+          </default>
+       </eviction>
+    </registry:cache-config>
     
     
-
-    <!-- Same as "pessimistic-entity" but here we use REPEATABLE_READ
-         instead of READ_COMMITTED. REPEATABLE_READ is only useful if the 
-         application evicts/clears entities from the Hibernate Session and 
-         then expects to repeatably re-read them in the same transaction.
-         Otherwise, the Session's internal cache provides a repeatable-read 
-         semantic. Before choosing this config, carefully read the docs
-         and make sure you really need REPEATABLE_READ.
-    -->
-    <cache-config name="pessimistic-entity-repeatable">
-
-        <!-- Node locking scheme -->
-        <attribute name="NodeLockingScheme">PESSIMISTIC</attribute>
-
-        <!-- Here we  use REPEATABLE_READ. -->
-        <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
-
-        <!-- Mode of communication with peer caches.
-        
-             INVALIDATION_SYNC is highly recommended as the mode for use
-             with entity and collection caches.
-        -->
-        <attribute name="CacheMode">INVALIDATION_SYNC</attribute>
-
-        <!-- Name of cluster. Needs to be the same for all members, in order
-             to find each other -->
-        <attribute name="ClusterName">${jboss.partition.name:DefaultPartition}-pessimistic-entity-rr</attribute>
-        
-        <!-- Use a UDP (multicast) based stack. A udp-sync stack might be
-             slightly better (no JGroups FC) but we stick with udp to
-             help ensure this cache and others like timestamps-cache
-             that require FC can use the same underlying JGroups resources. -->
-        <attribute name="MultiplexerStack">${jboss.default.jgroups.stack:udp}</attribute>
-
-        <!-- Whether or not to fetch state on joining a cluster. -->
-        <attribute name="FetchInMemoryState">false</attribute>
-
-        <!--
-          The max amount of time (in milliseconds) we wait until the
-          state (ie. the contents of the cache) are retrieved from
-          existing members at startup. Ignored if FetchInMemoryState=false.
-        -->
-        <attribute name="StateRetrievalTimeout">20000</attribute>
-
-        <!--
-            Number of milliseconds to wait until all responses for a
-            synchronous call have been received.
-        -->
-        <attribute name="SyncReplTimeout">20000</attribute>
-
-        <!-- Max number of milliseconds to wait for a lock acquisition -->
-        <attribute name="LockAcquisitionTimeout">15000</attribute>
-
-       <!--
-          Indicate whether to use marshalling or not. Set this to true if you 
-          are running under a scoped class loader, e.g., inside an application 
-          server.
-       -->
-       <attribute name="UseRegionBasedMarshalling">true</attribute>
-       <!-- Must match the value of "useRegionBasedMarshalling" -->
-       <attribute name="InactiveOnStartup">true</attribute>
-
-       <!-- Disable asynchronous RPC marshalling/sending -->
-       <attribute name="SerializationExecutorPoolSize">0</attribute>
-        
-       <!-- We have no asynchronous notification listeners -->
-       <attribute name="ListenerAsyncPoolSize">0</attribute>
-
-       <!--  Eviction policy configurations. -->
-       <attribute name="EvictionPolicyConfig">
-        <config>
-          <attribute name="wakeUpIntervalSeconds">5</attribute>
-          <!-- Name of the DEFAULT eviction policy class. -->
-          <attribute name="policyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
-          <!--  Cache wide default -->
-          <region name="/_default_">
-            <!-- Evict LRU node once we have more than this number of nodes -->
-            <attribute name="maxNodes">10000</attribute>
-            <!-- And, evict any node that hasn't been accessed in this many seconds -->
-            <attribute name="timeToLiveSeconds">1000</attribute>
-            <!-- Don't evict a node that's been accessed within this many seconds. 
-                 Set this to a value greater than your max expected transaction length. -->
-            <attribute name="minTimeToLiveSeconds">120</attribute>
-          </region>
-          <!--  Don't ever evict modification timestamps -->
-          <region name="/TS" policyClass="org.jboss.cache.eviction.NullEvictionPolicy"/>
-        </config>
-     </attribute>
-
-    </cache-config>     
-
-
-
-    <!-- A config appropriate for query caching. Does not replicate
-         queries. DO NOT STORE TIMESTAMPS IN THIS CACHE.
-    -->
-    <cache-config name="local-query">
-
-        <!-- Node locking scheme -->
-        <attribute name="NodeLockingScheme">OPTIMISTIC</attribute>
-
-        <attribute name="CacheMode">LOCAL</attribute>
-
-        <!-- Max number of milliseconds to wait for a lock acquisition -->
-        <attribute name="LockAcquisitionTimeout">15000</attribute>
-
-        <!--  Eviction policy configurations. -->
-        <attribute name="EvictionPolicyConfig">
-          <config>
-            <attribute name="wakeUpIntervalSeconds">5</attribute>
-            <!-- Name of the DEFAULT eviction policy class. -->
-            <attribute name="policyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
-            <!--  Cache wide default -->
-            <region name="/_default_">
-               <!-- Evict LRU node once we have more than this number of nodes -->
-               <attribute name="maxNodes">10000</attribute>
-               <!-- And, evict any node that hasn't been accessed in this many seconds -->
-               <attribute name="timeToLiveSeconds">1000</attribute>
-               <!-- Don't evict a node that's been accessed within this many seconds. 
-                    Set this to a value greater than your max expected transaction length. -->
-               <attribute name="minTimeToLiveSeconds">120</attribute>
-            </region>
-            <!--  Don't ever evict modification timestamps -->
-            <region name="/TS" policyClass="org.jboss.cache.eviction.NullEvictionPolicy"/>
-          </config>
-       </attribute>
-
-    </cache-config> 
-    
-
-    <!-- A query cache that replicates queries. Replication is asynchronous.
-         DO NOT STORE TIMESTAMPS IN THIS CACHE as no initial state transfer
-         is performed.
-    -->
-    <cache-config name="replicated-query">
-
-        <!-- Node locking scheme -->
-        <attribute name="NodeLockingScheme">OPTIMISTIC</attribute>
-
-        <!-- Mode of communication with peer caches.
-        
-             REPL_ASYNC means replicate but sender does not block waiting for
-             peers to acknowledge applying the change. Valid for queries as
-             the timestamp cache mechanism will allow Hibernate to discard
-             out-of-date queries.
-        -->
-        <attribute name="CacheMode">REPL_ASYNC</attribute>
-
-        <!-- Name of cluster. Needs to be the same for all members, in order
-             to find each other -->
-        <attribute name="ClusterName">${jboss.partition.name:DefaultPartition}-replicated-query</attribute>
-        
-        <!-- Use a UDP (multicast) based stack -->
-        <attribute name="MultiplexerStack">${jboss.default.jgroups.stack:udp}</attribute>
-
-        <!-- Whether or not to fetch state on joining a cluster. -->
-        <attribute name="FetchInMemoryState">false</attribute>
-
-        <!--
-          The max amount of time (in milliseconds) we wait until the
-          state (ie. the contents of the cache) are retrieved from
-          existing members at startup. Ignored if FetchInMemoryState=false.
-        -->
-        <attribute name="StateRetrievalTimeout">20000</attribute>
-
-        <!--
-            Number of milliseconds to wait until all responses for a
-            synchronous call have been received.
-        -->
-        <attribute name="SyncReplTimeout">20000</attribute>
-
-        <!-- Max number of milliseconds to wait for a lock acquisition -->
-        <attribute name="LockAcquisitionTimeout">15000</attribute>
-
-       <!--
-          Indicate whether to use marshalling or not. Set this to true if you 
-          are running under a scoped class loader, e.g., inside an application 
-          server.
-       -->
-       <attribute name="UseRegionBasedMarshalling">true</attribute>
-       <!-- Must match the value of "useRegionBasedMarshalling" -->
-       <attribute name="InactiveOnStartup">true</attribute>
-
-       <!-- Disable asynchronous RPC marshalling/sending -->
-       <attribute name="SerializationExecutorPoolSize">0</attribute>
-        
-       <!-- We have no asynchronous notification listeners -->
-       <attribute name="ListenerAsyncPoolSize">0</attribute>
-
-       <!--  Eviction policy configurations. -->
-       <attribute name="EvictionPolicyConfig">
-        <config>
-          <attribute name="wakeUpIntervalSeconds">5</attribute>
-          <!-- Name of the DEFAULT eviction policy class. -->
-          <attribute name="policyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
-          <!--  Cache wide default -->
-          <region name="/_default_">
-            <!-- Evict LRU node once we have more than this number of nodes -->
-            <attribute name="maxNodes">10000</attribute>
-            <!-- And, evict any node that hasn't been accessed in this many seconds -->
-            <attribute name="timeToLiveSeconds">1000</attribute>
-            <!-- Don't evict a node that's been accessed within this many seconds. 
-                 Set this to a value greater than your max expected transaction length. -->
-            <attribute name="minTimeToLiveSeconds">120</attribute>
-          </region>
-          <!--  Don't ever evict modification timestamps -->
-          <region name="/TS" policyClass="org.jboss.cache.eviction.NullEvictionPolicy"/>
-        </config>
-     </attribute>
-
-    </cache-config>     
-    
-    
-
-    <!-- Optimized for timestamp caching. A clustered timestamp cache
-         is required if query caching is used, even if the query cache
-         itself is configured with CacheMode=LOCAL.
-    -->
-    <cache-config name="timestamps-cache">
-
-        <!-- Node locking scheme -->
-        <attribute name="NodeLockingScheme">PESSIMISTIC</attribute>
-
-        <!--
-            READ_COMMITTED is as strong as necessary.
-        -->
-        <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
-
-        <!-- Cannot be INVALIDATION. ASYNC for improved performance. -->
-        <attribute name="CacheMode">REPL_ASYNC</attribute>
-
-        <!-- Name of cluster. Needs to be the same for all members, in order
-             to find each other -->
-        <attribute name="ClusterName">${jboss.partition.name:DefaultPartition}-timestamps-cache</attribute>
-        
-        <!-- Use a UDP (multicast) based stack -->
-        <attribute name="MultiplexerStack">${jboss.default.jgroups.stack:udp}</attribute>
-
-        <!-- Used for timestamps, so must fetch state. -->
-        <attribute name="FetchInMemoryState">true</attribute>
-
-        <!--
-          The max amount of time (in milliseconds) we wait until the
-          state (ie. the contents of the cache) are retrieved from
-          existing members at startup. Ignored if FetchInMemoryState=false.
-        -->
-        <attribute name="StateRetrievalTimeout">20000</attribute>
-
-        <!--
-            Number of milliseconds to wait until all responses for a
-            synchronous call have been received.
-        -->
-        <attribute name="SyncReplTimeout">20000</attribute>
-
-        <!-- Max number of milliseconds to wait for a lock acquisition -->
-        <attribute name="LockAcquisitionTimeout">15000</attribute>
-
-       <!--
-          Indicate whether to use marshalling or not. Set this to true if you 
-          are running under a scoped class loader, e.g., inside an application 
-          server.
-       -->
-       <attribute name="UseRegionBasedMarshalling">true</attribute>
-       <!-- Must match the value of "useRegionBasedMarshalling" -->
-       <attribute name="InactiveOnStartup">true</attribute>
-
-       <!-- Disable asynchronous RPC marshalling/sending -->
-       <attribute name="SerializationExecutorPoolSize">0</attribute>
-        
-       <!-- We have no asynchronous notification listeners -->
-       <attribute name="ListenerAsyncPoolSize">0</attribute>
-
-      <!--  Eviction policy configurations. -->
-      <attribute name="EvictionPolicyConfig">
-        <config>
-          <attribute name="wakeUpIntervalSeconds">5</attribute>
-          <!-- Name of the DEFAULT eviction policy class. -->
-          <attribute name="policyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
-          <!--  Cache wide default -->
-          <region name="/_default_">
-            <!-- Evict LRU node once we have more than this number of nodes -->
-            <attribute name="maxNodes">10000</attribute>
-            <!-- And, evict any node that hasn't been accessed in this many seconds -->
-            <attribute name="timeToLiveSeconds">1000</attribute>
-            <!-- Don't evict a node that's been accessed within this many seconds. 
-                 Set this to a value greater than your max expected transaction length. -->
-            <attribute name="minTimeToLiveSeconds">120</attribute>
-          </region>
-          <!--  Don't ever evict modification timestamps -->
-          <region name="/TS" policyClass="org.jboss.cache.eviction.NullEvictionPolicy"/>
-        </config>
-     </attribute>
-
-    </cache-config>  
-    
-    
-
-    <!-- A config appropriate for a cache that's shared for
-         entity, collection, query and timestamp caching. Not an advised
-         configuration, since it requires cache mode REPL_SYNC, which is the 
-         least efficient mode. Also requires a full state transfer at startup,
-         which can be expensive. Uses optimistic locking -->
-    <cache-config name="optimistic-shared">
-
-        <!-- Node locking scheme -->
-        <attribute name="NodeLockingScheme">OPTIMISTIC</attribute>
-
-        <!-- Must use REPL since used for timestamp caching. 
-             Must use SYNC to maintain cache consistency for entities.
-        -->
-        <attribute name="CacheMode">REPL_SYNC</attribute>
-        
-        <!-- With OPTIMISTIC with replication we need to use synchronous commits. -->
-        <attribute name="SyncCommitPhase">true</attribute>
-        <attribute name="SyncRollbackPhase">true</attribute>
-        
-        <!-- Name of cluster. Needs to be the same for all members, in order
-             to find each other -->
-        <attribute name="ClusterName">${jboss.partition.name:DefaultPartition}-optimistic-shared</attribute>
-        
-        <!-- Use a UDP (multicast) based stack. Need JGroups flow control (FC)
-             because timestamp communication will not require a synchronous response.
-        -->
-        <attribute name="MultiplexerStack">${jboss.default.jgroups.stack:udp}</attribute>
-
-        <!-- Used for timestamps, so must fetch state. -->
-        <attribute name="FetchInMemoryState">true</attribute>
-
-        <!--
-          The max amount of time (in milliseconds) we wait until the
-          state (ie. the contents of the cache) are retrieved from
-          existing members at startup. Ignored if FetchInMemoryState=false.
-        -->
-        <attribute name="StateRetrievalTimeout">20000</attribute>
-
-        <!--
-            Number of milliseconds to wait until all responses for a
-            synchronous call have been received.
-        -->
-        <attribute name="SyncReplTimeout">20000</attribute>
-
-        <!-- Max number of milliseconds to wait for a lock acquisition -->
-        <attribute name="LockAcquisitionTimeout">15000</attribute>
-
-       <!--
-          Indicate whether to use marshalling or not. Set this to true if you 
-          are running under a scoped class loader, e.g., inside an application 
-          server.
-       -->
-       <attribute name="UseRegionBasedMarshalling">true</attribute>
-       <!-- Must match the value of "useRegionBasedMarshalling" -->
-       <attribute name="InactiveOnStartup">true</attribute>
-
-       <!-- Disable asynchronous RPC marshalling/sending -->
-       <attribute name="SerializationExecutorPoolSize">0</attribute>
-        
-       <!-- We have no asynchronous notification listeners -->
-       <attribute name="ListenerAsyncPoolSize">0</attribute>
-
-       <!--  Eviction policy configurations. -->
-       <attribute name="EvictionPolicyConfig">
-        <config>
-          <attribute name="wakeUpIntervalSeconds">5</attribute>
-          <!-- Name of the DEFAULT eviction policy class. -->
-          <attribute name="policyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
-          <!--  Cache wide default -->
-          <region name="/_default_">
-            <!-- Evict LRU node once we have more than this number of nodes -->
-            <attribute name="maxNodes">10000</attribute>
-            <!-- And, evict any node that hasn't been accessed in this many seconds -->
-            <attribute name="timeToLiveSeconds">1000</attribute>
-            <!-- Don't evict a node that's been accessed within this many seconds. 
-                 Set this to a value greater than your max expected transaction length. -->
-            <attribute name="minTimeToLiveSeconds">120</attribute>
-          </region>
-          <!--  Don't ever evict modification timestamps -->
-          <region name="/TS" policyClass="org.jboss.cache.eviction.NullEvictionPolicy"/>
-        </config>
-     </attribute>
-
-    </cache-config>   
-    
-    
-
-    <!-- A config appropriate for a cache that's shared for
-         entity, collection, query and timestamp caching. Not an advised
-         configuration, since it requires cache mode REPL_SYNC, which is the 
-         least efficient mode. Also requires a full state transfer at startup,
-         which can be expensive. Uses pessmistic locking.
-    -->
-    <cache-config name="pessimistic-shared">
-
-        <!-- Node locking scheme -->
-        <attribute name="NodeLockingScheme">PESSIMISTIC</attribute>
-
-        <!--
-            READ_COMMITTED is as strong as necessary for most 
-            2nd Level Cache use cases.
-        -->
-        <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
-
-        <!-- Must use REPL since used for timestamp caching. 
-             Must use SYNC to maintain cache consistency for entities.
-        -->
-        <attribute name="CacheMode">REPL_SYNC</attribute>
-
-        <!-- Name of cluster. Needs to be the same for all members, in order
-             to find each other -->
-        <attribute name="ClusterName">${jboss.partition.name:DefaultPartition}-pessimistic-shared</attribute>
-        
-        <!-- Use a UDP (multicast) based stack. Need JGroups flow control (FC)
-             because timestamp communication will not require a synchronous response.
-        -->
-        <attribute name="MultiplexerStack">${jboss.default.jgroups.stack:udp}</attribute>
-
-        <!-- Used for timestamps, so must fetch state. -->
-        <attribute name="FetchInMemoryState">true</attribute>
-
-        <!--
-          The max amount of time (in milliseconds) we wait until the
-          state (ie. the contents of the cache) are retrieved from
-          existing members at startup.
-        -->
-        <attribute name="StateRetrievalTimeout">20000</attribute>
-
-        <!--
-            Number of milliseconds to wait until all responses for a
-            synchronous call have been received.
-        -->
-        <attribute name="SyncReplTimeout">20000</attribute>
-
-        <!-- Max number of milliseconds to wait for a lock acquisition -->
-        <attribute name="LockAcquisitionTimeout">15000</attribute>
-
-       <!--
-          Indicate whether to use marshalling or not. Set this to true if you 
-          are running under a scoped class loader, e.g., inside an application 
-          server. Default is "false".
-       -->
-       <attribute name="UseRegionBasedMarshalling">true</attribute>
-       <!-- Must match the value of "useRegionBasedMarshalling" -->
-       <attribute name="InactiveOnStartup">true</attribute>
-
-       <!-- Disable asynchronous RPC marshalling/sending -->
-       <attribute name="SerializationExecutorPoolSize">0</attribute>
-        
-       <!-- We have no asynchronous notification listeners -->
-       <attribute name="ListenerAsyncPoolSize">0</attribute>
-
-       <!--  Eviction policy configurations. -->
-       <attribute name="EvictionPolicyConfig">
-        <config>
-          <attribute name="wakeUpIntervalSeconds">5</attribute>
-          <!-- Name of the DEFAULT eviction policy class. -->
-          <attribute name="policyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
-          <!--  Cache wide default -->
-          <region name="/_default_">
-            <!-- Evict LRU node once we have more than this number of nodes -->
-            <attribute name="maxNodes">10000</attribute>
-            <!-- And, evict any node that hasn't been accessed in this many seconds -->
-            <attribute name="timeToLiveSeconds">1000</attribute>
-            <!-- Don't evict a node that's been accessed within this many seconds. 
-                 Set this to a value greater than your max expected transaction length. -->
-            <attribute name="minTimeToLiveSeconds">120</attribute>
-          </region>
-          <!--  Don't ever evict modification timestamps -->
-          <region name="/TS" policyClass="org.jboss.cache.eviction.NullEvictionPolicy"/>
-        </config>
-     </attribute>
-
-    </cache-config>  
-    
-    
-
-    <!-- Same as "pessimistic-shared" but here we use REPEATABLE_READ
-         instead of READ_COMMITTED. REPEATABLE_READ is only useful if the 
-         application evicts/clears entities from the Hibernate Session and 
-         then expects to repeatably re-read them in the same transaction.
-         Otherwise, the Session's internal cache provides a repeatable-read 
-         semantic. Before choosing this config, carefully read the docs
-         and make sure you really need REPEATABLE_READ.
-    -->
-    <cache-config name="pessimistic-shared-repeatable">
-
-        <!-- Node locking scheme -->
-        <attribute name="NodeLockingScheme">PESSIMISTIC</attribute>
-
-        <!-- Here we  use REPEATABLE_READ. -->
-        <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
-
-        <!-- Must use REPL since used for timestamp caching. 
-             Must use SYNC to maintain cache coherency for entities.
-        -->
-        <attribute name="CacheMode">REPL_SYNC</attribute>
-
-        <!-- Name of cluster. Needs to be the same for all members, in order
-             to find each other -->
-        <attribute name="ClusterName">${jboss.partition.name:DefaultPartition}-pessimistic-shared-rr</attribute>
-        
-        <!-- Use a UDP (multicast) based stack. Need JGroups flow control (FC)
-             because timestamp communication will not require a synchronous response.
-        -->
-        <attribute name="MultiplexerStack">${jboss.default.jgroups.stack:udp}</attribute>
-
-        <!-- Used for timestamps, so must fetch state. -->
-        <attribute name="FetchInMemoryState">true</attribute>
-
-        <!--
-          The max amount of time (in milliseconds) we wait until the
-          state (ie. the contents of the cache) are retrieved from
-          existing members at startup.
-        -->
-        <attribute name="StateRetrievalTimeout">20000</attribute>
-
-        <!--
-            Number of milliseconds to wait until all responses for a
-            synchronous call have been received.
-        -->
-        <attribute name="SyncReplTimeout">20000</attribute>
-
-        <!-- Max number of milliseconds to wait for a lock acquisition -->
-        <attribute name="LockAcquisitionTimeout">15000</attribute>
-
-       <!--
-          Indicate whether to use marshalling or not. Set this to true if you 
-          are running under a scoped class loader, e.g., inside an application 
-          server.
-       -->
-       <attribute name="UseRegionBasedMarshalling">true</attribute>
-       <!-- Must match the value of "useRegionBasedMarshalling" -->
-       <attribute name="InactiveOnStartup">true</attribute>
-
-       <!-- Disable asynchronous RPC marshalling/sending -->
-       <attribute name="SerializationExecutorPoolSize">0</attribute>
-        
-       <!-- We have no asynchronous notification listeners -->
-       <attribute name="ListenerAsyncPoolSize">0</attribute>
-
-       <!--  Eviction policy configurations. -->
-       <attribute name="EvictionPolicyConfig">
-        <config>
-          <attribute name="wakeUpIntervalSeconds">5</attribute>
-          <!-- Name of the DEFAULT eviction policy class. -->
-          <attribute name="policyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
-          <!--  Cache wide default -->
-          <region name="/_default_">
-            <!-- Evict LRU node once we have more than this number of nodes -->
-            <attribute name="maxNodes">10000</attribute>
-            <!-- And, evict any node that hasn't been accessed in this many seconds -->
-            <attribute name="timeToLiveSeconds">1000</attribute>
-            <!-- Don't evict a node that's been accessed within this many seconds. 
-                 Set this to a value greater than your max expected transaction length. -->
-            <attribute name="minTimeToLiveSeconds">120</attribute>
-          </region>
-          <!--  Don't ever evict modification timestamps -->
-          <region name="/TS" policyClass="org.jboss.cache.eviction.NullEvictionPolicy"/>
-        </config>
-     </attribute>
-
-    </cache-config>
-    
-</cache-configs>
+</registry:cache-configs>

Modified: trunk/cluster/src/resources/jboss-cache-manager.sar/META-INF/jboss-cache-manager-jboss-beans.xml
===================================================================
--- trunk/cluster/src/resources/jboss-cache-manager.sar/META-INF/jboss-cache-manager-jboss-beans.xml	2008-11-29 18:10:45 UTC (rev 81816)
+++ trunk/cluster/src/resources/jboss-cache-manager.sar/META-INF/jboss-cache-manager-jboss-beans.xml	2008-11-30 04:19:58 UTC (rev 81817)
@@ -5,22 +5,18 @@
    <!-- Factory/registry for JBoss Cache and PojoCache instances used in the AS -->
    <bean name="CacheManager" class="org.jboss.ha.cachemanager.CacheManager">
 
-      <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.cache:service=CacheManager", exposedInterface=org.jboss.ha.cachemanager.CacheManagerMBean.class, registerDirectly=true)</annotation>
+      <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.cache:service=CacheManager",                                          exposedInterface=org.jboss.ha.cachemanager.CacheManagerMBean.class, registerDirectly=true)</annotation>
 
       <!-- This doesn't seem to work, so the service binds itself for now
       <annotation>@org.jboss.aop.microcontainer.aspects.jndi.JndiBinding(name="java:CacheManager")</annotation>
       -->
       <property name="jndiName">java:CacheManager</property>
       
-      <property name="configurationRegistry">
-          <bean name="CacheConfigurationRegistry" class="org.jboss.ha.cachemanager.DependencyInjectedConfigurationRegistry">
-             <property name="configResource">META-INF/jboss-cache-configs.xml</property>
-          </bean>
-      </property>
-      
+      <property name="configurationRegistry"><inject bean="CacheConfigurationRegistry"/></property>
       <property name="channelFactory"><inject bean="JChannelFactory"/></property>
       
-      <!-- Aliases for cache names. Allows caches to be shared across different client types -->
+      <!-- Aliases for cache names. Allows caches to be shared across 
+           services that may expect different cache config names. -->
       <property name="configAliases">
          <map keyClass="java.lang.String" valueClass="java.lang.String">
             <!-- Use the HAPartition cache for ClusteredSSO caching -->
@@ -36,7 +32,7 @@
             <!-- Handle the legacy name for the EJB3 Entity cache -->
             <entry>
                <key>jboss.cache:service=EJB3EntityTreeCache</key>
-               <value>pessimistic-shared</value>
+               <value>mvcc-shared</value>
             </entry>
          </map>
       </property>
@@ -50,5 +46,1432 @@
       -->
       
    </bean>
+   
+   <!-- 
+     | Registry of named JBoss Cache configurations. Users of the CacheManager
+     | request a cache with a particular configuration by providing the name
+     | of one of these configurations.
+   -->
+   <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>      
+      -->
+      
+      <!-- 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>
+      
+         <!-- Number of milliseconds to wait until all responses for a
+              synchronous call have been received. Make this longer 
+              than lockAcquisitionTimeout.-->
+         <property name="syncReplTimeout">17500</property>
+         <!-- Max number of milliseconds to wait for a lock acquisition -->
+         <property name="lockAcquisitionTimeout">15000</property>
+         <!-- The max amount of time (in milliseconds) we wait until the
+          state (ie. the contents of the cache) are retrieved from
+          existing members at startup. -->
+         <property name="stateRetrievalTimeout">60000</property>
+      
+         <!-- Not needed for a web session cache that doesn't use FIELD -->
+         <property name="useRegionBasedMarshalling">false</property>
+         <!-- Must match the value of "useRegionBasedMarshalling" -->
+         <property name="inactiveOnStartup">false</property>
+         
+         <!-- Disable asynchronous RPC marshalling/sending -->
+         <property name="serializationExecutorPoolSize">0</property>        
+         <!-- We have no asynchronous notification listeners -->
+         <property name="listenerAsyncPoolSize">0</property>
+           
+         <property name="exposeManagementStatistics">true</property>
+      
+         <property name="buddyReplicationConfig">
+            <bean class="org.jboss.cache.config.BuddyReplicationConfig">
+               
+               <!--  Just set to true to turn on buddy replication -->
+               <property name="enabled">false</property>
+               
+               <!-- A way to specify a preferred replication group.  We try
+                    and pick a buddy who shares the same pool name (falling 
+                    back to other buddies if not available). -->
+               <property name="buddyPoolName">default</property>
+               
+               <property name="buddyCommunicationTimeout">17500</property>
+               
+               <!-- Do not change these -->
+               <property name="autoDataGravitation">false</property>
+               <property name="dataGravitationRemoveOnFind">true</property>
+               <property name="dataGravitationSearchBackupTrees">true</property>
+               
+               <property name="buddyLocatorConfig">
+                  <bean class="org.jboss.cache.buddyreplication.NextMemberBuddyLocatorConfig">
+                     <!-- The number of backup copies we maintain -->
+                     <property name="numBuddies">1</property>
+                     <!-- Means that each node will *try* to select a buddy on 
+                          a different physical host. If not able to do so 
+                          though, it will fall back to colocated nodes. -->
+                     <property name="ignoreColocatedBuddies">true</property>
+                   </bean>
+               </property>
+            </bean>
+         </property>
+         <property name="cacheLoaderConfig">
+            <bean class="org.jboss.cache.config.CacheLoaderConfig">
+                   <!-- Do not change these -->
+                   <property name="passivation">true</property>
+                   <property name="shared">false</property>
+                   
+                   <property name="individualCacheLoaderConfigs">
+                     <list>
+                        <bean class="org.jboss.cache.loader.FileCacheLoaderConfig">
+                           <!-- Where passivated sessions are stored -->
+                           <property name="location">${jboss.server.data.dir}${/}session</property>
+                           <!-- Do not change these -->
+                           <property name="async">false</property>
+                           <property name="fetchPersistentState">true</property>
+                           <property name="purgeOnStartup">true</property>
+                           <property name="ignoreModifications">false</property>
+                           <property name="checkCharacterPortability">false</property>
+                        </bean>
+                     </list>
+                   </property>
+            </bean>
+         </property>
+      </bean>      
+   </value>
+   </entry>
+   
+   <!-- Appropriate for web sessions with FIELD granularity -->
+   <entry><key>field-granularity-session-cache</key>
+   <value>
+      
+      <bean name="FieldSessionCacheConfig" 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}-FieldSessionCache</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>
+      
+         <property name="syncReplTimeout">17500</property>
+         <property name="lockAcquisitionTimeout">15000</property>
+         <property name="stateRetrievalTimeout">60000</property>
+          
+         <!-- Field granularity requires region-based marshalling -->
+         <property name="useRegionBasedMarshalling">true</property>
+         <!-- Must match the value of "useRegionBasedMarshalling" -->
+         <property name="inactiveOnStartup">true</property>
+         
+         <!-- Disable asynchronous RPC marshalling/sending -->
+         <property name="serializationExecutorPoolSize">0</property>        
+         <!-- We have no asynchronous notification listeners -->
+         <property name="listenerAsyncPoolSize">0</property>
+           
+         <property name="exposeManagementStatistics">true</property>
+      
+         <property name="buddyReplicationConfig">
+            <bean class="org.jboss.cache.config.BuddyReplicationConfig">
+               
+               <!--  Just set to true to turn on buddy replication -->
+               <property name="enabled">false</property>
+               <!-- A way to specify a preferred replication group.  We try
+                    and pick a buddy who shares the same pool name (falling 
+                    back to other buddies if not available). -->
+               <property name="buddyPoolName">default</property>
+               <property name="buddyCommunicationTimeout">17500</property>
+
+               <!-- Do not change these -->
+               <property name="autoDataGravitation">false</property>
+               <property name="dataGravitationRemoveOnFind">true</property>
+               <property name="dataGravitationSearchBackupTrees">true</property>
+               
+               <property name="buddyLocatorConfig">
+                  <bean class="org.jboss.cache.buddyreplication.NextMemberBuddyLocatorConfig">
+                     <!-- The number of backup nodes we maintain -->
+                     <property name="numBuddies">1</property>
+                     <!-- Means that each node will *try* to select a buddy on 
+                          a different physical host. If not able to do so 
+                          though, it will fall back to colocated nodes. -->
+                     <property name="ignoreColocatedBuddies">true</property>
+                   </bean>
+               </property>
+            </bean>
+         </property>
+         <property name="cacheLoaderConfig">
+            <bean class="org.jboss.cache.config.CacheLoaderConfig">
+                   <!-- Do not change these -->
+                   <property name="passivation">true</property>
+                   <property name="shared">false</property>
+                   
+                   <property name="individualCacheLoaderConfigs">
+                     <list>
+                        <bean class="org.jboss.cache.loader.FileCacheLoaderConfig">
+                           <!-- Where passivated sessions are stored -->
+                           <property name="location">${jboss.server.data.dir}${/}field-session</property>
+                           <!-- Do not change these -->
+                           <property name="async">false</property>
+                           <property name="fetchPersistentState">true</property>
+                           <property name="purgeOnStartup">true</property>
+                           <property name="ignoreModifications">false</property>
+                           <property name="checkCharacterPortability">false</property>
+                        </bean>
+                     </list>
+                   </property>
+            </bean>
+         </property>
+
+      </bean>
+   </value>
+   </entry>  
+      
+   <!-- Standard cache used for EJB3 SFSB caching -->
+   <entry><key>sfsb-cache</key>
+   <value>      
+      <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>
+         <!-- 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>
+      
+         <!-- Number of milliseconds to wait until all responses for a
+              synchronous call have been received. Make this longer 
+              than lockAcquisitionTimeout.-->
+         <property name="syncReplTimeout">17500</property>
+         <!-- Max number of milliseconds to wait for a lock acquisition -->
+         <property name="lockAcquisitionTimeout">15000</property>
+         <!-- The max amount of time (in milliseconds) we wait until the
+          state (ie. the contents of the cache) are retrieved from
+          existing members at startup. -->
+         <property name="stateRetrievalTimeout">60000</property>
+      
+         <!--
+          SFSBs use region-based marshalling to provide for partial state
+          transfer during deployment/undeployment.
+         -->
+         <property name="useRegionBasedMarshalling">false</property>
+         <!-- Must match the value of "useRegionBasedMarshalling" -->
+         <property name="inactiveOnStartup">false</property>
+         
+         <!-- Disable asynchronous RPC marshalling/sending -->
+         <property name="serializationExecutorPoolSize">0</property>        
+         <!-- We have no asynchronous notification listeners -->
+         <property name="listenerAsyncPoolSize">0</property>
+           
+         <property name="exposeManagementStatistics">true</property>
+      
+         <property name="buddyReplicationConfig">
+            <bean class="org.jboss.cache.config.BuddyReplicationConfig">
+               
+               <!--  Just set to true to turn on buddy replication -->
+               <property name="enabled">false</property>
+               
+               <!-- A way to specify a preferred replication group.  We try
+                    and pick a buddy who shares the same pool name (falling 
+                    back to other buddies if not available). -->
+               <property name="buddyPoolName">default</property>
+               
+               <property name="buddyCommunicationTimeout">17500</property>
+               
+               <!-- Do not change these -->
+               <property name="autoDataGravitation">false</property>
+               <property name="dataGravitationRemoveOnFind">true</property>
+               <property name="dataGravitationSearchBackupTrees">true</property>
+               
+               <property name="buddyLocatorConfig">
+                  <bean class="org.jboss.cache.buddyreplication.NextMemberBuddyLocatorConfig">
+                     <!-- The number of backup nodes we maintain -->
+                     <property name="numBuddies">1</property>
+                     <!-- Means that each node will *try* to select a buddy on 
+                          a different physical host. If not able to do so 
+                          though, it will fall back to colocated nodes. -->
+                     <property name="ignoreColocatedBuddies">true</property>
+                   </bean>
+               </property>
+            </bean>
+         </property>
+         <property name="cacheLoaderConfig">
+            <bean class="org.jboss.cache.config.CacheLoaderConfig">
+                   <!-- Do not change these -->
+                   <property name="passivation">true</property>
+                   <property name="shared">false</property>
+                   
+                   <property name="individualCacheLoaderConfigs">
+                     <list>
+                        <bean class="org.jboss.cache.loader.FileCacheLoaderConfig">
+                           <!-- Where passivated sessions are stored -->
+                           <property name="location">${jboss.server.data.dir}${/}sfsb</property>
+                           <!-- Do not change these -->
+                           <property name="async">false</property>
+                           <property name="fetchPersistentState">true</property>
+                           <property name="purgeOnStartup">true</property>
+                           <property name="ignoreModifications">false</property>
+                           <property name="checkCharacterPortability">false</property>
+                        </bean>
+                     </list>
+                   </property>
+            </bean>
+         </property>
+        
+         <!-- EJBs use JBoss Cache eviction -->
+         <property name="evictionConfig">
+             <bean class="org.jboss.cache.config.EvictionConfig">
+               <property name="wakeupInterval">5000</property>
+               <!--  Overall default -->
+               <property name="defaultEvictionRegionConfig">
+                  <bean class="org.jboss.cache.config.EvictionRegionConfig">
+                     <property name="regionName">/</property>
+                     <property name="evictionAlgorithmConfig">
+                        <bean class="org.jboss.cache.eviction.NullEvictionAlgorithmConfig"/>
+                     </property>
+                  </bean>
+               </property>
+               <!-- EJB3 integration code will programatically create
+                    other regions as beans are deployed -->
+            </bean>
+         </property>
+      </bean>      
+   </value>
+   </entry>
+   
+   <!-- 
+      Appropriate for the HAPartition-based services, e.g. DistributedState, 
+      HA-JNDI. Also valid for use by the JBossWeb ClusteredSingleSignOn valve.
+    -->
+   <entry><key>ha-partition</key>
+   <value>
+      
+      <bean name="HAPartitionCache" 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>
+               
+         <property name="clusterName">${jboss.partition.name:DefaultPartition}-HAPartitionCache</property>
+         <property name="multiplexerStack">${jboss.default.jgroups.stack:udp}</property>
+         <property name="fetchInMemoryState">true</property>          
+      
+         <property name="nodeLockingSchemeString" class="java.lang.String">PESSIMISTIC</property>
+         <property name="isolationLevelString" class="java.lang.String">REPEATABLE_READ</property>
+         <property name="cacheModeString">REPL_SYNC</property>
+      
+         <property name="syncReplTimeout">17500</property>
+         <property name="lockAcquisitionTimeout">15000</property>
+         <property name="stateRetrievalTimeout">60000</property>
+      
+         <property name="useRegionBasedMarshalling">false</property>
+         <property name="inactiveOnStartup">false</property>
+         
+         <!-- Disable asynchronous RPC marshalling/sending -->
+         <property name="serializationExecutorPoolSize">0</property>        
+         <!-- We have no asynchronous notification listeners -->
+         <property name="listenerAsyncPoolSize">0</property>
+           
+         <property name="exposeManagementStatistics">true</property>
+      </bean>
+   </value>
+   </entry>
+
+    <!-- 
+      Following are JBoss Cache configurations suitable for different 
+      Hibernate 2nd Level Cache uses (e.g. entities vs. queries).
+      
+      In all cases, TransactionManager configuration not required.
+      Hibernate will plug in its own transaction manager integration. 
+    -->
     
+   <!-- A config appropriate for entity/collection caching that uses MVCC locking -->
+   <entry><key>mvcc-entity</key>
+   <value>      
+      <bean name="MVCCEntityCache" class="org.jboss.cache.config.Configuration">
+
+         <!-- Node locking scheme -->
+         <property name="nodeLockingScheme">MVCC</property>
+         <!-- READ_COMMITTED is as strong as necessary for most 
+              2nd Level Cache use cases. -->
+         <property name="isolationLevel">READ_COMMITTED</property>
+
+         <!-- Mode of communication with peer caches.        
+              INVALIDATION_SYNC is highly recommended as the mode for use
+              with entity and collection caches.     -->
+         <property name="cacheMode">INVALIDATION_SYNC</property> 
+
+         <!-- Name of cluster. Needs to be the same for all members -->
+         <property name="clusterName">${jboss.partition.name:DefaultPartition}-mvcc-entity</property>        
+         <!-- Use a UDP (multicast) based stack. A udp-sync stack might be
+              slightly better (no JGroups FC) but we stick with udp to
+              help ensure this cache and others like timestamps-cache
+              that require FC can use the same underlying JGroups resources. -->
+         <property name="multiplexerStack">${jboss.default.jgroups.stack:udp}</property>
+         <!-- Whether or not to fetch state on joining a cluster. -->
+         <property name="fetchInMemoryState">false</property>
+
+         <!-- The max amount of time (in milliseconds) we wait until the
+           state (ie. the contents of the cache) are retrieved from
+           existing members at startup. Ignored if FetchInMemoryState=false. -->
+         <property name="stateRetrievalTimeout">60000</property>
+
+         <!-- Number of milliseconds to wait until all responses for a
+               synchronous call have been received. -->
+         <property name="syncReplTimeout">17500</property>
+
+         <!-- Max number of milliseconds to wait for a lock acquisition -->
+         <property name="lockAcquisitionTimeout">15000</property>
+
+         <!-- Hibernate 2LC can replicate custom types, so we use marshalling -->
+         <property name="useRegionBasedMarshalling">true</property>
+         <!-- Must match the value of "useRegionBasedMarshalling" -->
+         <property name="inactiveOnStartup">true</property>
+
+         <!-- Disable asynchronous RPC marshalling/sending -->
+         <property name="serializationExecutorPoolSize">0</property>        
+         <!-- We have no asynchronous notification listeners -->
+         <property name="listenerAsyncPoolSize">0</property>
+         
+         <property name="evictionConfig">
+             <bean class="org.jboss.cache.config.EvictionConfig">
+               <property name="wakeupInterval">5000</property>
+               <!--  Overall default -->
+               <property name="defaultEvictionRegionConfig">
+                  <bean class="org.jboss.cache.config.EvictionRegionConfig">
+                     <property name="regionName">/</property>
+                     <property name="evictionAlgorithmConfig">
+                        <bean class="org.jboss.cache.eviction.LRUAlgorithmConfig">
+                           <!-- Evict LRU node once we have more than this number of nodes -->
+                           <property name="maxNodes">10000</property>
+                           <!-- And, evict any node that hasn't been accessed in this many seconds -->
+                           <property name="timeToLiveSeconds">1000</property>
+                           <!-- Don't evict a node that's been accessed within this many seconds. 
+                                Set this to a value greater than your max expected transaction length. -->
+                           <property name="minTimeToLiveSeconds">120</property>
+                        </bean>
+                     </property>
+                  </bean>
+               </property>
+               <property name="evictionRegionConfigs">
+                  <list>
+                     <!--  Don't ever evict modification timestamps -->
+                     <bean class="org.jboss.cache.config.EvictionRegionConfig">
+                        <property name="regionName">/TS</property>
+                        <property name="evictionAlgorithmConfig">
+                           <bean class="org.jboss.cache.eviction.NullEvictionAlgorithmConfig"/>
+                        </property>
+                     </bean>
+                  </list>
+               </property>
+            </bean>
+         </property>
+      </bean>
+   </value>
+   </entry>
+    
+   <!-- A config appropriate for entity/collection caching that uses optimistic locking. -->
+   <entry><key>optimistic-entity</key>
+   <value>      
+      <bean name="OptimisticEntityCache" class="org.jboss.cache.config.Configuration">
+
+         <!-- Node locking scheme -->
+         <property name="nodeLockingScheme">OPTIMISTIC</property>
+
+         <!-- Mode of communication with peer caches.        
+              INVALIDATION_SYNC is highly recommended as the mode for use
+              with entity and collection caches.     -->
+         <property name="cacheMode">INVALIDATION_SYNC</property> 
+
+         <!-- Name of cluster. Needs to be the same for all members -->
+         <property name="clusterName">${jboss.partition.name:DefaultPartition}-opt-entity</property>        
+         <!-- Use a UDP (multicast) based stack. A udp-sync stack might be
+              slightly better (no JGroups FC) but we stick with udp to
+              help ensure this cache and others like timestamps-cache
+              that require FC can use the same underlying JGroups resources. -->
+         <property name="multiplexerStack">${jboss.default.jgroups.stack:udp}</property>
+         <!-- Whether or not to fetch state on joining a cluster. -->
+         <property name="fetchInMemoryState">false</property>
+
+         <!-- The max amount of time (in milliseconds) we wait until the
+           state (ie. the contents of the cache) are retrieved from
+           existing members at startup. Ignored if FetchInMemoryState=false. -->
+         <property name="stateRetrievalTimeout">60000</property>
+
+         <!-- Number of milliseconds to wait until all responses for a
+               synchronous call have been received. -->
+         <property name="syncReplTimeout">17500</property>
+
+         <!-- Max number of milliseconds to wait for a lock acquisition -->
+         <property name="lockAcquisitionTimeout">15000</property>
+
+         <!-- Hibernate 2LC can replicate custom types, so we use marshalling -->
+         <property name="useRegionBasedMarshalling">true</property>
+         <!-- Must match the value of "useRegionBasedMarshalling" -->
+         <property name="inactiveOnStartup">true</property>
+
+         <!-- Disable asynchronous RPC marshalling/sending -->
+         <property name="serializationExecutorPoolSize">0</property>        
+         <!-- We have no asynchronous notification listeners -->
+         <property name="listenerAsyncPoolSize">0</property>
+         
+         <property name="evictionConfig">
+             <bean class="org.jboss.cache.config.EvictionConfig">
+               <property name="wakeupInterval">5000</property>
+               <!--  Overall default -->
+               <property name="defaultEvictionRegionConfig">
+                  <bean class="org.jboss.cache.config.EvictionRegionConfig">
+                     <property name="regionName">/</property>
+                     <property name="evictionAlgorithmConfig">
+                        <bean class="org.jboss.cache.eviction.LRUAlgorithmConfig">
+                           <!-- Evict LRU node once we have more than this number of nodes -->
+                           <property name="maxNodes">10000</property>
+                           <!-- And, evict any node that hasn't been accessed in this many seconds -->
+                           <property name="timeToLiveSeconds">1000</property>
+                           <!-- Don't evict a node that's been accessed within this many seconds. 
+                                Set this to a value greater than your max expected transaction length. -->
+                           <property name="minTimeToLiveSeconds">120</property>
+                        </bean>
+                     </property>
+                  </bean>
+               </property>
+               <property name="evictionRegionConfigs">
+                  <list>
+                     <!--  Don't ever evict modification timestamps -->
+                     <bean class="org.jboss.cache.config.EvictionRegionConfig">
+                        <property name="regionName">/TS</property>
+                        <property name="evictionAlgorithmConfig">
+                           <bean class="org.jboss.cache.eviction.NullEvictionAlgorithmConfig"/>
+                        </property>
+                     </bean>
+                  </list>
+               </property>
+            </bean>
+         </property>
+      </bean>
+   </value>
+   </entry>
+    
+   <!-- A config appropriate for entity/collection caching that uses pessimistic locking -->
+   <entry><key>pessimistic-entity</key>
+   <value>      
+      <bean name="PessimisticEntityCache" class="org.jboss.cache.config.Configuration">
+
+         <!-- Node locking scheme -->
+         <property name="nodeLockingScheme">PESSIMISTIC</property>
+         <!-- READ_COMMITTED is as strong as necessary for most 
+              2nd Level Cache use cases. -->
+         <property name="isolationLevel">READ_COMMITTED</property>
+
+         <!-- Mode of communication with peer caches.        
+              INVALIDATION_SYNC is highly recommended as the mode for use
+              with entity and collection caches.     -->
+         <property name="cacheMode">INVALIDATION_SYNC</property> 
+
+         <!-- Name of cluster. Needs to be the same for all members -->
+         <property name="clusterName">${jboss.partition.name:DefaultPartition}-pess-entity</property>        
+         <!-- Use a UDP (multicast) based stack. A udp-sync stack might be
+              slightly better (no JGroups FC) but we stick with udp to
+              help ensure this cache and others like timestamps-cache
+              that require FC can use the same underlying JGroups resources. -->
+         <property name="multiplexerStack">${jboss.default.jgroups.stack:udp}</property>
+         <!-- Whether or not to fetch state on joining a cluster. -->
+         <property name="fetchInMemoryState">false</property>
+
+         <!-- The max amount of time (in milliseconds) we wait until the
+           state (ie. the contents of the cache) are retrieved from
+           existing members at startup. Ignored if FetchInMemoryState=false. -->
+         <property name="stateRetrievalTimeout">60000</property>
+
+         <!-- Number of milliseconds to wait until all responses for a
+               synchronous call have been received. -->
+         <property name="syncReplTimeout">17500</property>
+
+         <!-- Max number of milliseconds to wait for a lock acquisition -->
+         <property name="lockAcquisitionTimeout">15000</property>
+
+         <!-- Hibernate 2LC can replicate custom types, so we use marshalling -->
+         <property name="useRegionBasedMarshalling">true</property>
+         <!-- Must match the value of "useRegionBasedMarshalling" -->
+         <property name="inactiveOnStartup">true</property>
+
+         <!-- Disable asynchronous RPC marshalling/sending -->
+         <property name="serializationExecutorPoolSize">0</property>        
+         <!-- We have no asynchronous notification listeners -->
+         <property name="listenerAsyncPoolSize">0</property>
+         
+         <property name="evictionConfig">
+             <bean class="org.jboss.cache.config.EvictionConfig">
+               <property name="wakeupInterval">5000</property>
+               <!--  Overall default -->
+               <property name="defaultEvictionRegionConfig">
+                  <bean class="org.jboss.cache.config.EvictionRegionConfig">
+                     <property name="regionName">/</property>
+                     <property name="evictionAlgorithmConfig">
+                        <bean class="org.jboss.cache.eviction.LRUAlgorithmConfig">
+                           <!-- Evict LRU node once we have more than this number of nodes -->
+                           <property name="maxNodes">10000</property>
+                           <!-- And, evict any node that hasn't been accessed in this many seconds -->
+                           <property name="timeToLiveSeconds">1000</property>
+                           <!-- Don't evict a node that's been accessed within this many seconds. 
+                                Set this to a value greater than your max expected transaction length. -->
+                           <property name="minTimeToLiveSeconds">120</property>
+                        </bean>
+                     </property>
+                  </bean>
+               </property>
+               <property name="evictionRegionConfigs">
+                  <list>
+                     <!--  Don't ever evict modification timestamps -->
+                     <bean class="org.jboss.cache.config.EvictionRegionConfig">
+                        <property name="regionName">/TS</property>
+                        <property name="evictionAlgorithmConfig">
+                           <bean class="org.jboss.cache.eviction.NullEvictionAlgorithmConfig"/>
+                        </property>
+                     </bean>
+                  </list>
+               </property>
+            </bean>
+         </property>
+      </bean>
+   </value>
+   </entry>
+    
+   <!-- Same as "mvcc-entity" but here we use REPEATABLE_READ
+        instead of READ_COMMITTED. REPEATABLE_READ is only useful if the 
+        application evicts/clears entities from the Hibernate Session and 
+        then expects to repeatably re-read them in the same transaction.
+        Otherwise, the Session's internal cache provides a repeatable-read 
+        semantic. Before choosing this config, carefully read the docs
+        and make sure you really need REPEATABLE_READ. -->
+   <entry><key>mvcc-entity-repeatable</key>
+   <value>      
+      <bean name="MVCCEntityRepeatableCache" class="org.jboss.cache.config.Configuration">
+
+         <!-- Node locking scheme -->
+         <property name="nodeLockingScheme">MVCC</property>
+         <!-- Here we  use REPEATABLE_READ. -->
+         <property name="isolationLevel">READ_COMMITTED</property>
+
+         <!-- Mode of communication with peer caches.        
+              INVALIDATION_SYNC is highly recommended as the mode for use
+              with entity and collection caches.     -->
+         <property name="cacheMode">INVALIDATION_SYNC</property> 
+
+         <!-- Name of cluster. Needs to be the same for all members -->
+         <property name="clusterName">${jboss.partition.name:DefaultPartition}-mvcc-entity-rr</property>        
+         <!-- Use a UDP (multicast) based stack. A udp-sync stack might be
+              slightly better (no JGroups FC) but we stick with udp to
+              help ensure this cache and others like timestamps-cache
+              that require FC can use the same underlying JGroups resources. -->
+         <property name="multiplexerStack">${jboss.default.jgroups.stack:udp}</property>
+         <!-- Whether or not to fetch state on joining a cluster. -->
+         <property name="fetchInMemoryState">false</property>
+
+         <!-- The max amount of time (in milliseconds) we wait until the
+           state (ie. the contents of the cache) are retrieved from
+           existing members at startup. Ignored if FetchInMemoryState=false. -->
+         <property name="stateRetrievalTimeout">60000</property>
+
+         <!-- Number of milliseconds to wait until all responses for a
+               synchronous call have been received. -->
+         <property name="syncReplTimeout">17500</property>
+
+         <!-- Max number of milliseconds to wait for a lock acquisition -->
+         <property name="lockAcquisitionTimeout">15000</property>
+
+         <!-- Hibernate 2LC can replicate custom types, so we use marshalling -->
+         <property name="useRegionBasedMarshalling">true</property>
+         <!-- Must match the value of "useRegionBasedMarshalling" -->
+         <property name="inactiveOnStartup">true</property>
+
+         <!-- Disable asynchronous RPC marshalling/sending -->
+         <property name="serializationExecutorPoolSize">0</property>        
+         <!-- We have no asynchronous notification listeners -->
+         <property name="listenerAsyncPoolSize">0</property>
+         
+         <property name="evictionConfig">
+             <bean class="org.jboss.cache.config.EvictionConfig">
+               <property name="wakeupInterval">5000</property>
+               <!--  Overall default -->
+               <property name="defaultEvictionRegionConfig">
+                  <bean class="org.jboss.cache.config.EvictionRegionConfig">
+                     <property name="regionName">/</property>
+                     <property name="evictionAlgorithmConfig">
+                        <bean class="org.jboss.cache.eviction.LRUAlgorithmConfig">
+                           <!-- Evict LRU node once we have more than this number of nodes -->
+                           <property name="maxNodes">10000</property>
+                           <!-- And, evict any node that hasn't been accessed in this many seconds -->
+                           <property name="timeToLiveSeconds">1000</property>
+                           <!-- Don't evict a node that's been accessed within this many seconds. 
+                                Set this to a value greater than your max expected transaction length. -->
+                           <property name="minTimeToLiveSeconds">120</property>
+                        </bean>
+                     </property>
+                  </bean>
+               </property>
+               <property name="evictionRegionConfigs">
+                  <list>
+                     <!--  Don't ever evict modification timestamps -->
+                     <bean class="org.jboss.cache.config.EvictionRegionConfig">
+                        <property name="regionName">/TS</property>
+                        <property name="evictionAlgorithmConfig">
+                           <bean class="org.jboss.cache.eviction.NullEvictionAlgorithmConfig"/>
+                        </property>
+                     </bean>
+                  </list>
+               </property>
+            </bean>
+         </property>
+      </bean>
+   </value>
+   </entry>
+   
+   <!-- Same as "pessimistic-entity" but here we use REPEATABLE_READ
+        instead of READ_COMMITTED. REPEATABLE_READ is only useful if the 
+        application evicts/clears entities from the Hibernate Session and 
+        then expects to repeatably re-read them in the same transaction.
+        Otherwise, the Session's internal cache provides a repeatable-read 
+        semantic. Before choosing this config, carefully read the docs
+        and make sure you really need REPEATABLE_READ.
+   -->
+   <entry><key>pessimistic-entity-repeatable</key>
+   <value>      
+      <bean name="PessimisticEntityRepeatableCache" class="org.jboss.cache.config.Configuration">
+
+         <!-- Node locking scheme -->
+         <property name="nodeLockingScheme">PESSIMISTIC</property>
+         <property name="isolationLevel">REPEATABLE_READ</property>
+
+         <!-- Mode of communication with peer caches.        
+              INVALIDATION_SYNC is highly recommended as the mode for use
+              with entity and collection caches.     -->
+         <property name="cacheMode">INVALIDATION_SYNC</property> 
+
+         <!-- Name of cluster. Needs to be the same for all members -->
+         <property name="clusterName">${jboss.partition.name:DefaultPartition}-pess-entity-rr</property>        
+         <!-- Use a UDP (multicast) based stack. A udp-sync stack might be
+              slightly better (no JGroups FC) but we stick with udp to
+              help ensure this cache and others like timestamps-cache
+              that require FC can use the same underlying JGroups resources. -->
+         <property name="multiplexerStack">${jboss.default.jgroups.stack:udp}</property>
+         <!-- Whether or not to fetch state on joining a cluster. -->
+         <property name="fetchInMemoryState">false</property>
+
+         <!-- The max amount of time (in milliseconds) we wait until the
+           state (ie. the contents of the cache) are retrieved from
+           existing members at startup. Ignored if FetchInMemoryState=false. -->
+         <property name="stateRetrievalTimeout">60000</property>
+
+         <!-- Number of milliseconds to wait until all responses for a
+               synchronous call have been received. -->
+         <property name="syncReplTimeout">17500</property>
+
+         <!-- Max number of milliseconds to wait for a lock acquisition -->
+         <property name="lockAcquisitionTimeout">15000</property>
+
+         <!-- Hibernate 2LC can replicate custom types, so we use marshalling -->
+         <property name="useRegionBasedMarshalling">true</property>
+         <!-- Must match the value of "useRegionBasedMarshalling" -->
+         <property name="inactiveOnStartup">true</property>
+
+         <!-- Disable asynchronous RPC marshalling/sending -->
+         <property name="serializationExecutorPoolSize">0</property>        
+         <!-- We have no asynchronous notification listeners -->
+         <property name="listenerAsyncPoolSize">0</property>
+                  
+         <property name="evictionConfig">
+             <bean class="org.jboss.cache.config.EvictionConfig">
+               <property name="wakeupInterval">5000</property>
+               <!--  Overall default -->
+               <property name="defaultEvictionRegionConfig">
+                  <bean class="org.jboss.cache.config.EvictionRegionConfig">
+                     <property name="regionName">/</property>
+                     <property name="evictionAlgorithmConfig">
+                        <bean class="org.jboss.cache.eviction.LRUAlgorithmConfig">
+                           <!-- Evict LRU node once we have more than this number of nodes -->
+                           <property name="maxNodes">10000</property>
+                           <!-- And, evict any node that hasn't been accessed in this many seconds -->
+                           <property name="timeToLiveSeconds">1000</property>
+                           <!-- Don't evict a node that's been accessed within this many seconds. 
+                                Set this to a value greater than your max expected transaction length. -->
+                           <property name="minTimeToLiveSeconds">120</property>
+                        </bean>
+                     </property>
+                  </bean>
+               </property>
+               <property name="evictionRegionConfigs">
+                  <list>
+                     <!--  Don't ever evict modification timestamps -->
+                     <bean class="org.jboss.cache.config.EvictionRegionConfig">
+                        <property name="regionName">/TS</property>
+                        <property name="evictionAlgorithmConfig">
+                           <bean class="org.jboss.cache.eviction.NullEvictionAlgorithmConfig"/>
+                        </property>
+                     </bean>
+                  </list>
+               </property>
+            </bean>
+         </property>
+      </bean>
+   </value>
+   </entry>
+
+   <!-- A config appropriate for query caching. Does not replicate
+        queries. DO NOT STORE TIMESTAMPS IN THIS CACHE. -->
+   <entry><key>local-query</key>
+   <value>      
+      <bean name="LocalQueryCache" class="org.jboss.cache.config.Configuration">
+
+         <!-- Node locking scheme -->
+         <property name="nodeLockingScheme">OPTIMISTIC</property>
+
+         <!-- LOCAL means don't communicate with other caches.  -->
+         <property name="cacheMode">LOCAL</property> 
+
+         <!-- Max number of milliseconds to wait for a lock acquisition -->
+         <property name="lockAcquisitionTimeout">15000</property>
+
+         <!-- We have no asynchronous notification listeners -->
+         <property name="listenerAsyncPoolSize">0</property>
+         
+         <property name="evictionConfig">
+             <bean class="org.jboss.cache.config.EvictionConfig">
+               <property name="wakeupInterval">5000</property>
+               <!--  Overall default -->
+               <property name="defaultEvictionRegionConfig">
+                  <bean class="org.jboss.cache.config.EvictionRegionConfig">
+                     <property name="regionName">/</property>
+                     <property name="evictionAlgorithmConfig">
+                        <bean class="org.jboss.cache.eviction.LRUAlgorithmConfig">
+                           <!-- Evict LRU node once we have more than this number of nodes -->
+                           <property name="maxNodes">10000</property>
+                           <!-- And, evict any node that hasn't been accessed in this many seconds -->
+                           <property name="timeToLiveSeconds">1000</property>
+                           <!-- Don't evict a node that's been accessed within this many seconds. 
+                                Set this to a value greater than your max expected transaction length. -->
+                           <property name="minTimeToLiveSeconds">120</property>
+                        </bean>
+                     </property>
+                  </bean>
+               </property>
+               <property name="evictionRegionConfigs">
+                  <list>
+                     <!--  Don't ever evict modification timestamps -->
+                     <bean class="org.jboss.cache.config.EvictionRegionConfig">
+                        <property name="regionName">/TS</property>
+                        <property name="evictionAlgorithmConfig">
+                           <bean class="org.jboss.cache.eviction.NullEvictionAlgorithmConfig"/>
+                        </property>
+                     </bean>
+                  </list>
+               </property>
+            </bean>
+         </property>
+      </bean>
+   </value>
+   </entry>
+
+   <!-- A query cache that replicates querie results. Replication is asynchronous.
+         DO NOT STORE TIMESTAMPS IN THIS CACHE as no initial state transfer
+         is performed. -->
+   <entry><key>replicated-query</key>
+   <value>      
+      <bean name="ReplicatedQueryCache" class="org.jboss.cache.config.Configuration">
+
+         <!-- Node locking scheme -->
+         <property name="nodeLockingScheme">OPTIMISTIC</property>
+
+         <!-- Mode of communication with peer caches.        
+              REPL_ASYNC means replicate but sender does not block waiting for
+              peers to acknowledge applying the change. Valid for queries as
+              the timestamp cache mechanism will allow Hibernate to discard
+              out-of-date queries.  -->
+         <property name="cacheMode">REPL_ASYNC</property> 
+
+         <!-- Name of cluster. Needs to be the same for all members -->
+         <property name="clusterName">${jboss.partition.name:DefaultPartition}-query</property>        
+         <!-- Use a UDP (multicast) based stack. Need JGroups flow control (FC)
+             because timestamp communication will not require a synchronous response. -->
+         <property name="multiplexerStack">${jboss.default.jgroups.stack:udp}</property>
+         <!-- Whether or not to fetch state on joining a cluster. -->
+         <property name="fetchInMemoryState">false</property>
+
+         <!-- The max amount of time (in milliseconds) we wait until the
+           state (ie. the contents of the cache) are retrieved from
+           existing members at startup. Ignored if FetchInMemoryState=false. -->
+         <property name="stateRetrievalTimeout">60000</property>
+
+         <!-- Number of milliseconds to wait until all responses for a
+               synchronous call have been received. -->
+         <property name="syncReplTimeout">17500</property>
+
+         <!-- Max number of milliseconds to wait for a lock acquisition -->
+         <property name="lockAcquisitionTimeout">15000</property>
+
+         <!-- Hibernate 2LC can replicate custom types, so we use marshalling -->
+         <property name="useRegionBasedMarshalling">true</property>
+         <!-- Must match the value of "useRegionBasedMarshalling" -->
+         <property name="inactiveOnStartup">true</property>
+
+         <!-- Disable asynchronous RPC marshalling/sending -->
+         <property name="serializationExecutorPoolSize">0</property>        
+         <!-- We have no asynchronous notification listeners -->
+         <property name="listenerAsyncPoolSize">0</property>         
+         
+         <property name="evictionConfig">
+             <bean class="org.jboss.cache.config.EvictionConfig">
+               <property name="wakeupInterval">5000</property>
+               <!--  Overall default -->
+               <property name="defaultEvictionRegionConfig">
+                  <bean class="org.jboss.cache.config.EvictionRegionConfig">
+                     <property name="regionName">/</property>
+                     <property name="evictionAlgorithmConfig">
+                        <bean class="org.jboss.cache.eviction.LRUAlgorithmConfig">
+                           <!-- Evict LRU node once we have more than this number of nodes -->
+                           <property name="maxNodes">10000</property>
+                           <!-- And, evict any node that hasn't been accessed in this many seconds -->
+                           <property name="timeToLiveSeconds">1000</property>
+                           <!-- Don't evict a node that's been accessed within this many seconds. 
+                                Set this to a value greater than your max expected transaction length. -->
+                           <property name="minTimeToLiveSeconds">120</property>
+                        </bean>
+                     </property>
+                  </bean>
+               </property>
+               <property name="evictionRegionConfigs">
+                  <list>
+                     <!--  Don't ever evict modification timestamps -->
+                     <bean class="org.jboss.cache.config.EvictionRegionConfig">
+                        <property name="regionName">/TS</property>
+                        <property name="evictionAlgorithmConfig">
+                           <bean class="org.jboss.cache.eviction.NullEvictionAlgorithmConfig"/>
+                        </property>
+                     </bean>
+                  </list>
+               </property>
+            </bean>
+         </property>
+      </bean>
+   </value>
+   </entry>
+
+   <!-- Optimized for timestamp caching. A clustered timestamp cache
+        is required if query caching is used, even if the query cache
+        itself is configured with CacheMode=LOCAL.
+   -->   
+   <entry><key>timestamps-cache</key>
+   <value>      
+      <bean name="TimestampsCache" class="org.jboss.cache.config.Configuration">
+
+         <!-- Node locking scheme -->
+         <property name="nodeLockingScheme">MVCC</property>
+         <!-- READ_COMMITTED is as strong as necessary -->
+         <property name="isolationLevel">READ_COMMITTED</property>
+
+         <!-- Cannot be INVALIDATION. ASYNC for improved performance. -->
+         <property name="cacheMode">REPL_ASYNC</property> 
+
+         <!-- Name of cluster. Needs to be the same for all members -->
+         <property name="clusterName">${jboss.partition.name:DefaultPartition}-timestamps</property>        
+         <!-- Use a UDP (multicast) based stack. Need JGroups flow control (FC)
+             because timestamp communication will not require a synchronous response. -->
+         <property name="multiplexerStack">${jboss.default.jgroups.stack:udp}</property>
+         <!-- Used for timestamps, so must fetch state. -->
+         <property name="fetchInMemoryState">true</property>
+
+         <!-- The max amount of time (in milliseconds) we wait until the
+           state (ie. the contents of the cache) are retrieved from
+           existing members at startup. Ignored if FetchInMemoryState=false. -->
+         <property name="stateRetrievalTimeout">60000</property>
+
+         <!-- Number of milliseconds to wait until all responses for a
+               synchronous call have been received. -->
+         <property name="syncReplTimeout">17500</property>
+
+         <!-- Max number of milliseconds to wait for a lock acquisition -->
+         <property name="lockAcquisitionTimeout">15000</property>
+
+         <!-- Hibernate 2LC can replicate custom types, so we use marshalling -->
+         <property name="useRegionBasedMarshalling">true</property>
+         <!-- Must match the value of "useRegionBasedMarshalling" -->
+         <property name="inactiveOnStartup">true</property>
+
+         <!-- Disable asynchronous RPC marshalling/sending -->
+         <property name="serializationExecutorPoolSize">0</property>        
+         <!-- We have no asynchronous notification listeners -->
+         <property name="listenerAsyncPoolSize">0</property>
+         
+         <!-- We should never evict timestamps, so eviction is disabled -->
+
+      </bean>
+   </value>
+   </entry>   
+   
+   <!-- A config appropriate for a cache that's shared for
+        entity, collection, query and timestamp caching. Not an advised
+        configuration, since it requires cache mode REPL_SYNC, which is the 
+        least efficient mode. Also requires a full state transfer at startup,
+        which can be expensive. Uses mvcc locking. -->
+   <entry><key>mvcc-shared</key>
+   <value>      
+      <bean name="MVCCSharedCache" class="org.jboss.cache.config.Configuration">
+
+         <!-- Node locking scheme -->
+         <property name="nodeLockingScheme">MVCC</property>
+         <!-- READ_COMMITTED is as strong as necessary for most 
+              2nd Level Cache use cases. -->
+         <property name="isolationLevel">READ_COMMITTED</property>
+
+         <!-- Must use REPL since used for timestamp caching. 
+              Must use SYNC to maintain cache coherency for entities. -->
+         <property name="cacheMode">REPL_SYNC</property> 
+
+         <!-- Name of cluster. Needs to be the same for all members -->
+         <property name="clusterName">${jboss.partition.name:DefaultPartition}-mvcc-shared</property>        
+         <!-- Use a UDP (multicast) based stack. Need JGroups flow control (FC)
+             because timestamp communication will not require a synchronous response. -->
+         <property name="multiplexerStack">${jboss.default.jgroups.stack:udp}</property>
+         <!-- Used for timestamps, so must fetch state. -->
+         <property name="fetchInMemoryState">true</property>
+
+         <!-- The max amount of time (in milliseconds) we wait until the
+           state (ie. the contents of the cache) are retrieved from
+           existing members at startup. Ignored if FetchInMemoryState=false. -->
+         <property name="stateRetrievalTimeout">60000</property>
+
+         <!-- Number of milliseconds to wait until all responses for a
+               synchronous call have been received. -->
+         <property name="syncReplTimeout">17500</property>
+
+         <!-- Max number of milliseconds to wait for a lock acquisition -->
+         <property name="lockAcquisitionTimeout">15000</property>
+
+         <!-- Hibernate 2LC can replicate custom types, so we use marshalling -->
+         <property name="useRegionBasedMarshalling">true</property>
+         <!-- Must match the value of "useRegionBasedMarshalling" -->
+         <property name="inactiveOnStartup">true</property>
+
+         <!-- Disable asynchronous RPC marshalling/sending -->
+         <property name="serializationExecutorPoolSize">0</property>        
+         <!-- We have no asynchronous notification listeners -->
+         <property name="listenerAsyncPoolSize">0</property>        
+         
+         <property name="evictionConfig">
+             <bean class="org.jboss.cache.config.EvictionConfig">
+               <property name="wakeupInterval">5000</property>
+               <!--  Overall default -->
+               <property name="defaultEvictionRegionConfig">
+                  <bean class="org.jboss.cache.config.EvictionRegionConfig">
+                     <property name="regionName">/</property>
+                     <property name="evictionAlgorithmConfig">
+                        <bean class="org.jboss.cache.eviction.LRUAlgorithmConfig">
+                           <!-- Evict LRU node once we have more than this number of nodes -->
+                           <property name="maxNodes">10000</property>
+                           <!-- And, evict any node that hasn't been accessed in this many seconds -->
+                           <property name="timeToLiveSeconds">1000</property>
+                           <!-- Don't evict a node that's been accessed within this many seconds. 
+                                Set this to a value greater than your max expected transaction length. -->
+                           <property name="minTimeToLiveSeconds">120</property>
+                        </bean>
+                     </property>
+                  </bean>
+               </property>
+               <property name="evictionRegionConfigs">
+                  <list>
+                     <!--  Don't ever evict modification timestamps -->
+                     <bean class="org.jboss.cache.config.EvictionRegionConfig">
+                        <property name="regionName">/TS</property>
+                        <property name="evictionAlgorithmConfig">
+                           <bean class="org.jboss.cache.eviction.NullEvictionAlgorithmConfig"/>
+                        </property>
+                     </bean>
+                  </list>
+               </property>
+            </bean>
+         </property>
+      </bean>
+   </value>
+   </entry>
+   
+   <!-- A config appropriate for a cache that's shared for
+        entity, collection, query and timestamp caching. Not an advised
+        configuration, since it requires cache mode REPL_SYNC, which is the 
+        least efficient mode. Also requires a full state transfer at startup,
+        which can be expensive. Uses optimistic locking -->
+   <entry><key>optimistic-shared</key>
+   <value>      
+      <bean name="OptimisticSharedCache" class="org.jboss.cache.config.Configuration">
+
+         <!-- Node locking scheme -->
+         <property name="nodeLockingScheme">OPTIMISTIC</property>
+
+         <!-- Must use REPL since used for timestamp caching. 
+              Must use SYNC to maintain cache coherency for entities. -->
+         <property name="cacheMode">REPL_SYNC</property> 
+
+         <!-- Name of cluster. Needs to be the same for all members -->
+         <property name="clusterName">${jboss.partition.name:DefaultPartition}-opt-shared</property>        
+         <!-- Use a UDP (multicast) based stack. Need JGroups flow control (FC)
+             because timestamp communication will not require a synchronous response. -->
+         <property name="multiplexerStack">${jboss.default.jgroups.stack:udp}</property>
+         <!-- Used for timestamps, so must fetch state. -->
+         <property name="fetchInMemoryState">true</property>
+
+         <!-- The max amount of time (in milliseconds) we wait until the
+           state (ie. the contents of the cache) are retrieved from
+           existing members at startup. Ignored if FetchInMemoryState=false. -->
+         <property name="stateRetrievalTimeout">60000</property>
+
+         <!-- Number of milliseconds to wait until all responses for a
+               synchronous call have been received. -->
+         <property name="syncReplTimeout">17500</property>
+
+         <!-- Max number of milliseconds to wait for a lock acquisition -->
+         <property name="lockAcquisitionTimeout">15000</property>
+
+         <!-- Hibernate 2LC can replicate custom types, so we use marshalling -->
+         <property name="useRegionBasedMarshalling">true</property>
+         <!-- Must match the value of "useRegionBasedMarshalling" -->
+         <property name="inactiveOnStartup">true</property>
+
+         <!-- Disable asynchronous RPC marshalling/sending -->
+         <property name="serializationExecutorPoolSize">0</property>        
+         <!-- We have no asynchronous notification listeners -->
+         <property name="listenerAsyncPoolSize">0</property>        
+         
+         <property name="evictionConfig">
+             <bean class="org.jboss.cache.config.EvictionConfig">
+               <property name="wakeupInterval">5000</property>
+               <!--  Overall default -->
+               <property name="defaultEvictionRegionConfig">
+                  <bean class="org.jboss.cache.config.EvictionRegionConfig">
+                     <property name="regionName">/</property>
+                     <property name="evictionAlgorithmConfig">
+                        <bean class="org.jboss.cache.eviction.LRUAlgorithmConfig">
+                           <!-- Evict LRU node once we have more than this number of nodes -->
+                           <property name="maxNodes">10000</property>
+                           <!-- And, evict any node that hasn't been accessed in this many seconds -->
+                           <property name="timeToLiveSeconds">1000</property>
+                           <!-- Don't evict a node that's been accessed within this many seconds. 
+                                Set this to a value greater than your max expected transaction length. -->
+                           <property name="minTimeToLiveSeconds">120</property>
+                        </bean>
+                     </property>
+                  </bean>
+               </property>
+               <property name="evictionRegionConfigs">
+                  <list>
+                     <!--  Don't ever evict modification timestamps -->
+                     <bean class="org.jboss.cache.config.EvictionRegionConfig">
+                        <property name="regionName">/TS</property>
+                        <property name="evictionAlgorithmConfig">
+                           <bean class="org.jboss.cache.eviction.NullEvictionAlgorithmConfig"/>
+                        </property>
+                     </bean>
+                  </list>
+               </property>
+            </bean>
+         </property>
+      </bean>
+   </value>
+   </entry>  
+   
+   <!-- A config appropriate for a cache that's shared for
+        entity, collection, query and timestamp caching. Not an advised
+        configuration, since it requires cache mode REPL_SYNC, which is the 
+        least efficient mode. Also requires a full state transfer at startup,
+        which can be expensive. Uses pessmistic locking. -->
+   <entry><key>pessimistic-shared</key>
+   <value>      
+      <bean name="PessimisticSharedCache" class="org.jboss.cache.config.Configuration">
+
+         <!-- Node locking scheme -->
+         <property name="nodeLockingScheme">PESSIMISTIC</property>
+         <!-- READ_COMMITTED is as strong as necessary for most 
+              2nd Level Cache use cases. -->
+         <property name="isolationLevel">READ_COMMITTED</property>
+
+         <!-- Must use REPL since used for timestamp caching. 
+              Must use SYNC to maintain cache coherency for entities. -->
+         <property name="cacheMode">REPL_SYNC</property> 
+
+         <!-- Name of cluster. Needs to be the same for all members -->
+         <property name="clusterName">${jboss.partition.name:DefaultPartition}-pess-shared</property>        
+         <!-- Use a UDP (multicast) based stack. Need JGroups flow control (FC)
+             because timestamp communication will not require a synchronous response. -->
+         <property name="multiplexerStack">${jboss.default.jgroups.stack:udp}</property>
+         <!-- Used for timestamps, so must fetch state. -->
+         <property name="fetchInMemoryState">true</property>
+
+         <!-- The max amount of time (in milliseconds) we wait until the
+           state (ie. the contents of the cache) are retrieved from
+           existing members at startup. Ignored if FetchInMemoryState=false. -->
+         <property name="stateRetrievalTimeout">60000</property>
+
+         <!-- Number of milliseconds to wait until all responses for a
+               synchronous call have been received. -->
+         <property name="syncReplTimeout">17500</property>
+
+         <!-- Max number of milliseconds to wait for a lock acquisition -->
+         <property name="lockAcquisitionTimeout">15000</property>
+
+         <!-- Hibernate 2LC can replicate custom types, so we use marshalling -->
+         <property name="useRegionBasedMarshalling">true</property>
+         <!-- Must match the value of "useRegionBasedMarshalling" -->
+         <property name="inactiveOnStartup">true</property>
+
+         <!-- Disable asynchronous RPC marshalling/sending -->
+         <property name="serializationExecutorPoolSize">0</property>        
+         <!-- We have no asynchronous notification listeners -->
+         <property name="listenerAsyncPoolSize">0</property>        
+         
+         <property name="evictionConfig">
+             <bean class="org.jboss.cache.config.EvictionConfig">
+               <property name="wakeupInterval">5000</property>
+               <!--  Overall default -->
+               <property name="defaultEvictionRegionConfig">
+                  <bean class="org.jboss.cache.config.EvictionRegionConfig">
+                     <property name="regionName">/</property>
+                     <property name="evictionAlgorithmConfig">
+                        <bean class="org.jboss.cache.eviction.LRUAlgorithmConfig">
+                           <!-- Evict LRU node once we have more than this number of nodes -->
+                           <property name="maxNodes">10000</property>
+                           <!-- And, evict any node that hasn't been accessed in this many seconds -->
+                           <property name="timeToLiveSeconds">1000</property>
+                           <!-- Don't evict a node that's been accessed within this many seconds. 
+                                Set this to a value greater than your max expected transaction length. -->
+                           <property name="minTimeToLiveSeconds">120</property>
+                        </bean>
+                     </property>
+                  </bean>
+               </property>
+               <property name="evictionRegionConfigs">
+                  <list>
+                     <!--  Don't ever evict modification timestamps -->
+                     <bean class="org.jboss.cache.config.EvictionRegionConfig">
+                        <property name="regionName">/TS</property>
+                        <property name="evictionAlgorithmConfig">
+                           <bean class="org.jboss.cache.eviction.NullEvictionAlgorithmConfig"/>
+                        </property>
+                     </bean>
+                  </list>
+               </property>
+            </bean>
+         </property>
+      </bean>
+   </value>
+   </entry>  
+   
+   <!-- Same as "mvcc-shared" but here we use REPEATABLE_READ
+        instead of READ_COMMITTED. REPEATABLE_READ is only useful if the 
+        application evicts/clears entities from the Hibernate Session and 
+        then expects to repeatably re-read them in the same transaction.
+        Otherwise, the Session's internal cache provides a repeatable-read 
+        semantic. Before choosing this config, carefully read the docs
+        and make sure you really need REPEATABLE_READ.  -->
+   <entry><key>mvcc-shared-repeatable</key>
+   <value>      
+      <bean name="MVCCSharedRepeatableCache" class="org.jboss.cache.config.Configuration">
+
+         <!-- Node locking scheme -->
+         <property name="nodeLockingScheme">MVCC</property>
+         <!-- READ_COMMITTED is as strong as necessary for most 
+              2nd Level Cache use cases. -->
+         <property name="isolationLevel">REPEATABLE_READ</property>
+
+         <!-- Must use REPL since used for timestamp caching. 
+              Must use SYNC to maintain cache coherency for entities. -->
+         <property name="cacheMode">REPL_SYNC</property> 
+
+         <!-- Name of cluster. Needs to be the same for all members -->
+         <property name="clusterName">${jboss.partition.name:DefaultPartition}-mvcc-shared-rr</property>        
+         <!-- Use a UDP (multicast) based stack. Need JGroups flow control (FC)
+             because timestamp communication will not require a synchronous response. -->
+         <property name="multiplexerStack">${jboss.default.jgroups.stack:udp}</property>
+         <!-- Used for timestamps, so must fetch state. -->
+         <property name="fetchInMemoryState">true</property>
+
+         <!-- The max amount of time (in milliseconds) we wait until the
+           state (ie. the contents of the cache) are retrieved from
+           existing members at startup. Ignored if FetchInMemoryState=false. -->
+         <property name="stateRetrievalTimeout">60000</property>
+
+         <!-- Number of milliseconds to wait until all responses for a
+               synchronous call have been received. -->
+         <property name="syncReplTimeout">17500</property>
+
+         <!-- Max number of milliseconds to wait for a lock acquisition -->
+         <property name="lockAcquisitionTimeout">15000</property>
+
+         <!-- Hibernate 2LC can replicate custom types, so we use marshalling -->
+         <property name="useRegionBasedMarshalling">true</property>
+         <!-- Must match the value of "useRegionBasedMarshalling" -->
+         <property name="inactiveOnStartup">true</property>
+
+         <!-- Disable asynchronous RPC marshalling/sending -->
+         <property name="serializationExecutorPoolSize">0</property>        
+         <!-- We have no asynchronous notification listeners -->
+         <property name="listenerAsyncPoolSize">0</property>        
+         
+         <property name="evictionConfig">
+             <bean class="org.jboss.cache.config.EvictionConfig">
+               <property name="wakeupInterval">5000</property>
+               <!--  Overall default -->
+               <property name="defaultEvictionRegionConfig">
+                  <bean class="org.jboss.cache.config.EvictionRegionConfig">
+                     <property name="regionName">/</property>
+                     <property name="evictionAlgorithmConfig">
+                        <bean class="org.jboss.cache.eviction.LRUAlgorithmConfig">
+                           <!-- Evict LRU node once we have more than this number of nodes -->
+                           <property name="maxNodes">10000</property>
+                           <!-- And, evict any node that hasn't been accessed in this many seconds -->
+                           <property name="timeToLiveSeconds">1000</property>
+                           <!-- Don't evict a node that's been accessed within this many seconds. 
+                                Set this to a value greater than your max expected transaction length. -->
+                           <property name="minTimeToLiveSeconds">120</property>
+                        </bean>
+                     </property>
+                  </bean>
+               </property>
+               <property name="evictionRegionConfigs">
+                  <list>
+                     <!--  Don't ever evict modification timestamps -->
+                     <bean class="org.jboss.cache.config.EvictionRegionConfig">
+                        <property name="regionName">/TS</property>
+                        <property name="evictionAlgorithmConfig">
+                           <bean class="org.jboss.cache.eviction.NullEvictionAlgorithmConfig"/>
+                        </property>
+                     </bean>
+                  </list>
+               </property>
+            </bean>
+         </property>
+      </bean>
+   </value>
+   </entry>
+   
+   <!-- Same as "pessimistic-shared" but here we use REPEATABLE_READ
+        instead of READ_COMMITTED. REPEATABLE_READ is only useful if the 
+        application evicts/clears entities from the Hibernate Session and 
+        then expects to repeatably re-read them in the same transaction.
+        Otherwise, the Session's internal cache provides a repeatable-read 
+        semantic. Before choosing this config, carefully read the docs
+        and make sure you really need REPEATABLE_READ. -->
+   <entry><key>pessimistic-shared-repeatable</key>
+   <value>      
+      <bean name="PessimisticSharedRepeatableCache" class="org.jboss.cache.config.Configuration">
+
+         <!-- Node locking scheme -->
+         <property name="nodeLockingScheme">PESSIMISTIC</property>
+         <property name="isolationLevel">REPEATABLE_READ</property>
+
+         <!-- Must use REPL since used for timestamp caching. 
+              Must use SYNC to maintain cache coherency for entities. -->
+         <property name="cacheMode">REPL_SYNC</property> 
+
+         <!-- Name of cluster. Needs to be the same for all members -->
+         <property name="clusterName">${jboss.partition.name:DefaultPartition}-pess-shared-rr</property>        
+         <!-- Use a UDP (multicast) based stack. Need JGroups flow control (FC)
+             because timestamp communication will not require a synchronous response. -->
+         <property name="multiplexerStack">${jboss.default.jgroups.stack:udp}</property>
+         <!-- Used for timestamps, so must fetch state. -->
+         <property name="fetchInMemoryState">true</property>
+
+         <!-- The max amount of time (in milliseconds) we wait until the
+           state (ie. the contents of the cache) are retrieved from
+           existing members at startup. Ignored if FetchInMemoryState=false. -->
+         <property name="stateRetrievalTimeout">60000</property>
+
+         <!-- Number of milliseconds to wait until all responses for a
+               synchronous call have been received. -->
+         <property name="syncReplTimeout">17500</property>
+
+         <!-- Max number of milliseconds to wait for a lock acquisition -->
+         <property name="lockAcquisitionTimeout">15000</property>
+
+         <!-- Hibernate 2LC can replicate custom types, so we use marshalling -->
+         <property name="useRegionBasedMarshalling">true</property>
+         <!-- Must match the value of "useRegionBasedMarshalling" -->
+         <property name="inactiveOnStartup">true</property>
+
+         <!-- Disable asynchronous RPC marshalling/sending -->
+         <property name="serializationExecutorPoolSize">0</property>        
+         <!-- We have no asynchronous notification listeners -->
+         <property name="listenerAsyncPoolSize">0</property>        
+         
+         <property name="evictionConfig">
+             <bean class="org.jboss.cache.config.EvictionConfig">
+               <property name="wakeupInterval">5000</property>
+               <!--  Overall default -->
+               <property name="defaultEvictionRegionConfig">
+                  <bean class="org.jboss.cache.config.EvictionRegionConfig">
+                     <property name="regionName">/</property>
+                     <property name="evictionAlgorithmConfig">
+                        <bean class="org.jboss.cache.eviction.LRUAlgorithmConfig">
+                           <!-- Evict LRU node once we have more than this number of nodes -->
+                           <property name="maxNodes">10000</property>
+                           <!-- And, evict any node that hasn't been accessed in this many seconds -->
+                           <property name="timeToLiveSeconds">1000</property>
+                           <!-- Don't evict a node that's been accessed within this many seconds. 
+                                Set this to a value greater than your max expected transaction length. -->
+                           <property name="minTimeToLiveSeconds">120</property>
+                        </bean>
+                     </property>
+                  </bean>
+               </property>
+               <property name="evictionRegionConfigs">
+                  <list>
+                     <!--  Don't ever evict modification timestamps -->
+                     <bean class="org.jboss.cache.config.EvictionRegionConfig">
+                        <property name="regionName">/TS</property>
+                        <property name="evictionAlgorithmConfig">
+                           <bean class="org.jboss.cache.eviction.NullEvictionAlgorithmConfig"/>
+                        </property>
+                     </bean>
+                  </list>
+               </property>
+            </bean>
+         </property>
+      </bean>
+   </value>
+   </entry>
+       
+         </map>
+      </property>
+   </bean>
+    
 </deployment>
\ No newline at end of file

Modified: trunk/testsuite/src/main/org/jboss/test/classloader/leak/clstore/ClassLoaderStore.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/classloader/leak/clstore/ClassLoaderStore.java	2008-11-29 18:10:45 UTC (rev 81816)
+++ trunk/testsuite/src/main/org/jboss/test/classloader/leak/clstore/ClassLoaderStore.java	2008-11-30 04:19:58 UTC (rev 81817)
@@ -29,6 +29,7 @@
 import java.io.ObjectOutputStream;
 import java.io.PrintStream;
 import java.io.Serializable;
+//import java.lang.ref.SoftReference;
 import java.lang.ref.WeakReference;
 import java.util.HashMap;
 import java.util.Map;
@@ -41,7 +42,7 @@
    
    private static ClassLoaderStore instance = new ClassLoaderStore();
    
-   private final Map classloaders = new HashMap();
+   private final Map<String, WeakReference<ClassLoader>> classloaders = new HashMap<String, WeakReference<ClassLoader>>();
 
    private final int depth = Integer.parseInt(System.getProperty("jboss.classloader.leak.test.depth", "12"));
 
@@ -64,14 +65,14 @@
          log.debug("Parent is " + parent);
          parent = parent.getParent();
       }
-      WeakReference ref = new WeakReference(loader);
+      WeakReference<ClassLoader> ref = new WeakReference<ClassLoader>(loader);
       classloaders.put(key, ref);
    }
    
    public ClassLoader getClassLoader(String key, boolean forceGC, String reportFile)
    {
       ClassLoader result = null;
-      WeakReference ref = (WeakReference) classloaders.get(key);
+      WeakReference<ClassLoader> ref = classloaders.get(key);
       if (ref != null)
       {
          result = (ClassLoader) ref.get();
@@ -101,7 +102,7 @@
     * @param reportHTMLFile the report file 
     * @throws Exception
     */
-   private ClassLoader getClassLoader(WeakReference weakReferenceOnLoader, String reportHTMLFile) throws Exception
+   private ClassLoader getClassLoader(WeakReference<ClassLoader> weakReferenceOnLoader, String reportHTMLFile) throws Exception
    {
       LeakAnalyzer leakAnalyzer = null;
       try
@@ -143,6 +144,7 @@
          
          Thread.sleep(20);
             
+         @SuppressWarnings("unchecked")
          HashMap datapoints = leakAnalyzer.createIndexMatrix();
          
          if (weakReferenceOnLoader.get() == null)
@@ -172,6 +174,7 @@
       {
          log.debug("JVMTI not active; using System.gc()");
          System.gc();
+         System.runFinalization();
          Thread.sleep(1000);
          
          if (weakReferenceOnLoader.get() != null)
@@ -184,7 +187,7 @@
       return (ClassLoader) weakReferenceOnLoader.get();
    }
    
-   private void fillMemory(WeakReference ref)
+   private void fillMemory(WeakReference<ClassLoader> ref)
    {
       Runtime rt = Runtime.getRuntime();
       int[] adds = { 0, 10, 20, 30, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49 };
@@ -210,13 +213,29 @@
           {
              byte[][] bytez =  new byte[1000][];
              for (int j = 0; j < bytez.length; j++)
+             { 
                 bytez[j] = new byte[bucket];
+                if (j % 100 == 0)
+                {  
+                   // Sleep a bit to allow CPU to do other work
+                   try
+                   {
+                      Thread.sleep(10);
+                   }
+                   catch (InterruptedException ie)
+                   {
+                     log.warn("Interrupted");
+                     Thread.currentThread().interrupt();
+                     break;
+                   }                   
+                }
+             }
           }
           catch (Throwable t)
           {
-             log.warn("Caught throwable filling memory: " + t);
              System.gc();
              System.runFinalization();
+             log.warn("Caught throwable filling memory: " + t);
              break;
           }       
           finally
@@ -224,33 +243,37 @@
              // Sleep a bit to allow CPU to do work like exchange cluster PING responses
              try
              {
-                Thread.sleep(20);
+                Thread.sleep(250);
              }
-             catch (InterruptedException ignored)
+             catch (InterruptedException ie)
              {
                log.warn("Interrupted");
+               Thread.currentThread().interrupt();
                break;
              }
           }
       }
       
-      try
+      if (ref.get() != null)
       {
-         ByteArrayOutputStream byteout = new ByteArrayOutputStream();
-         ObjectOutputStream out = new ObjectOutputStream(byteout);
-        
-         out.writeObject(new Dummy());
-         out.close();
-         
-         ByteArrayInputStream byteInput = new ByteArrayInputStream(byteout.toByteArray());
-         ObjectInputStream input = new ObjectInputStream(byteInput);
-         input.readObject();
-         input.close();
+         try
+         {
+            ByteArrayOutputStream byteout = new ByteArrayOutputStream();
+            ObjectOutputStream out = new ObjectOutputStream(byteout);
+           
+            out.writeObject(new Dummy());
+            out.close();
+            
+            ByteArrayInputStream byteInput = new ByteArrayInputStream(byteout.toByteArray());
+            ObjectInputStream input = new ObjectInputStream(byteInput);
+            input.readObject();
+            input.close();
+         }
+         catch (Exception e)
+         {
+            e.printStackTrace();
+         }
       }
-      catch (Exception e)
-      {
-         e.printStackTrace();
-      }
       
       if (ref.get() != null)
       {
@@ -269,4 +292,73 @@
    {
         private static final long serialVersionUID = 1L;
    }
+   
+//   public static void main(String[] args)
+//   {
+//      SoftReference softRef = new SoftReference(new Object());
+//      byte[][] bytez = new byte[1000][];
+//      try
+//      {
+//         long max = Runtime.getRuntime().maxMemory();
+//         
+//         for (int i = 0; i < bytez.length; i++)
+//         {            
+//            long avail = Runtime.getRuntime().freeMemory();
+//            System.out.println(i + " Adding bytes: " + avail / 100);
+//            bytez[i] = new byte[(int) (avail / 100)];
+//            if (i % 10 == 0)
+//            { 
+//               // Sleep a bit to allow CPU to do other work
+//               try
+//               {
+//                  System.out.println("resting");
+//                  Thread.sleep(100);
+//               }
+//               catch (InterruptedException ie)
+//               {
+//                 log.warn("Interrupted");
+//                 Thread.currentThread().interrupt();
+//                 break;
+//               }
+//               
+//            } 
+//            
+//            if (i % 100 == 0 || max / avail > 20)
+//            {
+//               System.out.println("running");
+//               System.gc();
+//               System.runFinalization();
+//            }
+//            
+//            if (softRef.get() == null)
+//            {
+//               System.out.println("released");
+//            }
+//         }
+//      }
+//      catch (Throwable t)
+//      {
+//         System.gc();
+//         System.runFinalization();
+//         System.out.println("Caught throwable filling memory: " + t);
+//      }       
+//      finally
+//      {
+//         // Sleep a bit to allow CPU to do work like exchange cluster PING responses
+//         try
+//         {
+//            Thread.sleep(250);
+//         }
+//         catch (InterruptedException ie)
+//         {
+//           System.out.println("Interrupted");
+//           Thread.currentThread().interrupt();
+//         }
+//      }
+//      
+//      if (softRef.get() == null)
+//      {
+//         System.out.println("released");
+//      }
+//   }
 }

Modified: trunk/testsuite/src/main/org/jboss/test/cluster/classloader/leak/test/FieldGranularityClassloaderLeakUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/classloader/leak/test/FieldGranularityClassloaderLeakUnitTestCase.java	2008-11-29 18:10:45 UTC (rev 81816)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/classloader/leak/test/FieldGranularityClassloaderLeakUnitTestCase.java	2008-11-30 04:19:58 UTC (rev 81817)
@@ -53,20 +53,20 @@
       return getDeploySetup(FieldGranularityClassloaderLeakUnitTestCase.class, "classloader-leak-test.sar");
    }
    
-   public void testSimpleReplicableWar() throws Exception
-   {
-      warTest(SIMPLE_REPLICABLE_WAR);
-   }
+//   public void testSimpleReplicableWar() throws Exception
+//   {
+//      warTest(SIMPLE_REPLICABLE_WAR);
+//   }
    
    public void testFieldWar() throws Exception
    {
       warTest(FIELD_WAR);
    }
    
-   public void testFieldNoReplicableWar() throws Exception
-   {
-      warTest(FIELD_NO_REPLICABLE_WAR);
-   }
+//   public void testFieldNoReplicableWar() throws Exception
+//   {
+//      warTest(FIELD_NO_REPLICABLE_WAR);
+//   }
    
    protected String getWarContextPath()
    {

Modified: trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/web/test/SessionPassivationTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/web/test/SessionPassivationTestCase.java	2008-11-29 18:10:45 UTC (rev 81816)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/web/test/SessionPassivationTestCase.java	2008-11-30 04:19:58 UTC (rev 81817)
@@ -35,6 +35,7 @@
 import org.apache.commons.httpclient.methods.GetMethod;
 import org.jboss.test.cluster.testutil.SessionTestUtil;
 import org.jboss.test.cluster.testutil.WebTestBase;
+import org.jboss.test.cluster.web.CacheHelper;
 import org.jboss.test.cluster.web.JBossClusteredWebTestCase;
 
 /**
@@ -228,6 +229,15 @@
        deployed1 = false;
        undeploy(adaptors[1]);
        
+       if (!isCleanCacheOnRedeploy())
+       {
+          // Make sure the cache is not stopped during redeploy due to
+          // no services using it. Tell CacheHelper to hold a ref.
+          String cacheConfigName = System.getProperty(CacheHelper.CACHE_CONFIG_PROP, "standard-session-cache");
+          String usePojoCache = System.getProperty(CacheHelper.CACHE_TYPE_PROP, "false");
+          SessionTestUtil.setCacheConfigName(adaptors[0], cacheConfigName, Boolean.parseBoolean(usePojoCache));
+       }
+       
        sleep(2000);
           
        // Create an instance of HttpClient.




More information about the jboss-cvs-commits mailing list