[jbosscache-commits] JBoss Cache SVN: r6054 - in core/trunk/src: main/java/org/jboss/cache/config/parsing and 5 other directories.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Thu Jun 26 08:10:31 EDT 2008


Author: mircea.markus
Date: 2008-06-26 08:10:31 -0400 (Thu, 26 Jun 2008)
New Revision: 6054

Added:
   core/trunk/src/test/java/org/jboss/cache/config/ConfigurationTransformerTest.java
   core/trunk/src/test/resources/META-INF/config2.x/
   core/trunk/src/test/resources/META-INF/config2.x/buddy-replication-cache-service.xml
   core/trunk/src/test/resources/META-INF/config2.x/cacheloader-enabled-cache-service.xml
   core/trunk/src/test/resources/META-INF/config2.x/eviction-enabled-cache-service.xml
   core/trunk/src/test/resources/META-INF/config2.x/local-cache-service.xml
   core/trunk/src/test/resources/META-INF/config2.x/multiplexer-enabled-cache-service.xml
   core/trunk/src/test/resources/META-INF/config2.x/optimistically-locked-cache-service.xml
   core/trunk/src/test/resources/META-INF/config2.x/total-replication-cache-service.xml
Removed:
   core/trunk/src/main/etc/META-INF/buddy-replication-cache-service.xml
   core/trunk/src/main/etc/META-INF/cacheloader-enabled-cache-service.xml
   core/trunk/src/main/etc/META-INF/eviction-enabled-cache-service.xml
   core/trunk/src/main/etc/META-INF/local-cache-service.xml
   core/trunk/src/main/etc/META-INF/multiplexer-enabled-cache-service.xml
   core/trunk/src/main/etc/META-INF/optimistically-locked-cache-service.xml
   core/trunk/src/main/etc/META-INF/total-replication-cache-service.xml
Modified:
   core/trunk/src/main/etc/META-INF/config2to3.xslt
   core/trunk/src/main/java/org/jboss/cache/config/parsing/ConfigFilesConvertor.java
   core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlConfigurationParser.java
   core/trunk/src/test/java/org/jboss/cache/config/parsing/XmlConfigurationParserTest.java
   core/trunk/src/test/resources/META-INF/conf-test/all-elements-file-3.x.xml
   core/trunk/src/test/resources/META-INF/conf-test/parser-test-file-2.x.xml
Log:
added an UT for xslt transformation. Also fixed some bugs in xslt file and new parser

Deleted: core/trunk/src/main/etc/META-INF/buddy-replication-cache-service.xml
===================================================================
--- core/trunk/src/main/etc/META-INF/buddy-replication-cache-service.xml	2008-06-26 11:31:23 UTC (rev 6053)
+++ core/trunk/src/main/etc/META-INF/buddy-replication-cache-service.xml	2008-06-26 12:10:31 UTC (rev 6054)
@@ -1,179 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- ===================================================================== -->
-<!--                                                                       -->
-<!--  Sample TreeCache Service Configuration                               -->
-<!--                                                                       -->
-<!-- ===================================================================== -->
-
-<server>
-
-   <classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar"/>
-
-
-   <!-- ==================================================================== -->
-   <!-- Defines TreeCache configuration                                      -->
-   <!-- ==================================================================== -->
-
-   <mbean code="org.jboss.cache.jmx.CacheJmxWrapper"
-          name="jboss.cache:service=testTreeCache">
-
-      <depends>jboss:service=Naming</depends>
-      <depends>jboss:service=TransactionManager</depends>
-
-      <!--
-          Configure the TransactionManager
-      -->
-      <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup
-      </attribute>
-
-
-      <!--
-          Node locking level : SERIALIZABLE
-                               REPEATABLE_READ (default)
-                               READ_COMMITTED
-                               READ_UNCOMMITTED
-                               NONE
-      -->
-      <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
-
-      <!--
-           Valid modes are LOCAL
-                           REPL_ASYNC
-                           REPL_SYNC
-                           INVALIDATION_ASYNC
-                           INVALIDATION_SYNC
-      -->
-      <attribute name="CacheMode">REPL_SYNC</attribute>
-
-      <!-- Name of cluster. Needs to be the same for all TreeCache nodes in a
-           cluster in order to find each other.
-      -->
-      <attribute name="ClusterName">JBossCache-Cluster</attribute>
-
-      <!--Uncomment next three statements to enable JGroups multiplexer.
-This configuration is dependent on the JGroups multiplexer being
-registered in an MBean server such as JBossAS.  -->
-      <!--
-      <depends>jgroups.mux:name=Multiplexer</depends>
-      <attribute name="MultiplexerService">jgroups.mux:name=Multiplexer</attribute>
-      <attribute name="MultiplexerStack">fc-fast-minimalthreads</attribute>
-      -->
-
-      <!-- JGroups protocol stack properties.
-         ClusterConfig isn't used if the multiplexer is enabled and successfully initialized.
-      -->
-      <attribute name="ClusterConfig">
-         <config>
-            <TCP recv_buf_size="20000000" use_send_queues="false"
-                 loopback="false"
-                 discard_incompatible_packets="true"
-                 max_bundle_size="64000"
-                 max_bundle_timeout="30"
-                 use_incoming_packet_handler="true"
-                 enable_bundling="true"
-                 enable_unicast_bundling="true"
-                 enable_diagnostics="true"
-
-                 use_concurrent_stack="true"
-
-                 thread_naming_pattern="pl"
-
-                 thread_pool.enabled="true"
-                 thread_pool.min_threads="1"
-                 thread_pool.max_threads="4"
-                 thread_pool.keep_alive_time="30000"
-                 thread_pool.queue_enabled="true"
-                 thread_pool.queue_max_size="50000"
-                 thread_pool.rejection_policy="discard"
-
-                 oob_thread_pool.enabled="true"
-                 oob_thread_pool.min_threads="2"
-                 oob_thread_pool.max_threads="4"
-                 oob_thread_pool.keep_alive_time="10000"
-                 oob_thread_pool.queue_enabled="false"
-                 oob_thread_pool.queue_max_size="10"
-                 oob_thread_pool.rejection_policy="Run"/>
-
-            <!--<PING timeout="2000" num_initial_members="3"/>-->
-             <MPING mcast_addr="232.1.2.3" timeout="2000" num_initial_members="3"/>
-            <MERGE2 max_interval="30000" min_interval="10000"/>
-            <FD_SOCK/>
-            <FD timeout="10000" max_tries="5" shun="true"/>
-            <VERIFY_SUSPECT timeout="1500"/>
-            <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0"
-                           retransmit_timeout="300,600,1200,2400,4800"
-                           discard_delivered_msgs="true"/>
-            <!--<UNICAST timeout="30,60,120,300,600,1200,2400,3600"/>-->
-            <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
-                           max_bytes="400000"/>
-            <pbcast.GMS print_local_addr="true" join_timeout="5000"
-                        join_retry_timeout="2000" shun="false"
-                        view_bundling="true" view_ack_collection_timeout="5000"/>
-              <FC max_credits="5000000"
-                    min_threshold="0.20"/>
-            <FRAG2 frag_size="60000"/>
-            <pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
-            <!-- <pbcast.STATE_TRANSFER/> -->
-            <pbcast.FLUSH timeout="0"/>
-         </config>
-      </attribute>
-
-
-
-      <!--
-          The max amount of time (in milliseconds) we wait until the
-          state (ie. the contents of the cache) are retrieved from
-          existing members in a clustered environment
-      -->
-      <attribute name="StateRetrievalTimeout">20000</attribute>
-
-      <!--
-          Number of milliseconds to wait until all responses for a
-          synchronous call have been received.
-      -->
-      <attribute name="SyncReplTimeout">15000</attribute>
-
-      <!-- Max number of milliseconds to wait for a lock acquisition -->
-      <attribute name="LockAcquisitionTimeout">10000</attribute>
-
-
-      <!-- Buddy Replication config -->
-      <attribute name="BuddyReplicationConfig">
-         <config>
-            <buddyReplicationEnabled>true</buddyReplicationEnabled>
-            <!-- these are the default values anyway -->
-            <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>myBuddyPoolReplicationGroup</buddyPoolName>
-            <!-- communication timeout for inter-buddy group organisation messages (such as assigning to and removing
-          from groups -->
-            <buddyCommunicationTimeout>2000</buddyCommunicationTimeout>
-
-            <!-- the following three elements, all relating to data gravitation, default to false -->
-            <!-- Should data gravitation be attempted whenever there is a cache miss on finding a node?
-If false, data will only be gravitated if an Option is set enabling it -->
-            <autoDataGravitation>false</autoDataGravitation>
-            <!-- removes data on remote caches' trees and backup subtrees when gravitated to a new data owner -->
-            <dataGravitationRemoveOnFind>true</dataGravitationRemoveOnFind>
-            <!-- search backup subtrees as well for data when gravitating.  Results in backup nodes being able to
-        answer data gravitation requests. -->
-            <dataGravitationSearchBackupTrees>true</dataGravitationSearchBackupTrees>
-
-         </config>
-      </attribute>
-   </mbean>
-
-
-</server>

Deleted: core/trunk/src/main/etc/META-INF/cacheloader-enabled-cache-service.xml
===================================================================
--- core/trunk/src/main/etc/META-INF/cacheloader-enabled-cache-service.xml	2008-06-26 11:31:23 UTC (rev 6053)
+++ core/trunk/src/main/etc/META-INF/cacheloader-enabled-cache-service.xml	2008-06-26 12:10:31 UTC (rev 6054)
@@ -1,118 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- ===================================================================== -->
-<!--                                                                       -->
-<!--  Sample TreeCache Service Configuration                               -->
-<!--                                                                       -->
-<!-- ===================================================================== -->
-
-<server>
-
-   <!-- ==================================================================== -->
-   <!-- Defines TreeCache configuration                                      -->
-   <!-- ==================================================================== -->
-
-   <mbean code="org.jboss.cache.jmx.CacheJmxWrapper"
-          name="jboss.cache:service=TreeCache">
-
-      <depends>jboss:service=Naming</depends>
-      <depends>jboss:service=TransactionManager</depends>
-
-      <!--
-          Configure the TransactionManager
-      -->
-      <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup
-      </attribute>
-
-
-      <!--
-          Node locking level : SERIALIZABLE
-                               REPEATABLE_READ (default)
-                               READ_COMMITTED
-                               READ_UNCOMMITTED
-                               NONE
-      -->
-      <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
-
-      <!--
-           Valid modes are LOCAL
-                           REPL_ASYNC
-                           REPL_SYNC
-      -->
-      <attribute name="CacheMode">LOCAL</attribute>
-
-      <!-- Max number of milliseconds to wait for a lock acquisition -->
-      <attribute name="LockAcquisitionTimeout">15000</attribute>
-
-      <!-- Specific eviction policy configurations. This is LRU -->
-      <attribute name="EvictionPolicyConfig">
-         <config>
-            <attribute name="wakeUpIntervalSeconds">5</attribute>
-            <!-- This defaults to 200000 if not specified -->
-            <attribute name="eventQueueSize">200000</attribute>
-            <!-- Name of the DEFAULT eviction policy class. -->
-            <attribute name="policyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
-
-
-            <!-- Cache wide default -->
-            <region name="/_default_">
-               <attribute name="maxNodes">5000</attribute>
-               <attribute name="timeToLiveSeconds">3</attribute>
-            </region>
-            <region name="/org/jboss/test/data">
-               <attribute name="maxNodes">100</attribute>
-               <attribute name="timeToLiveSeconds">3</attribute>
-            </region>
-         </config>
-      </attribute>
-
-            <!-- Cache Passivation for Tree Cache
-      On pasivation, The objects are written to the backend store on eviction if CacheLoaderPassivation
-      is true, otheriwse the objects are persisted.
-      On activation, the objects are restored in the memory cache and removed from the cache loader
-      if CacheLoaderPassivation is true, otherwise the objects are only loaded from the cache loader -->
-      <attribute name="CacheLoaderConfiguration">
-         <config>
-            <!-- if passivation is true, only the first cache loader is used; the rest are ignored -->
-            <passivation>false</passivation>
-            <preload>/</preload>
-            <shared>false</shared>
-
-            <!-- we can now have multiple cache loaders, which get chained -->
-            <cacheloader>
-               <class>org.jboss.cache.loader.JDBCCacheLoader</class>
-               <!-- same as the old CacheLoaderConfig attribute -->
-               <properties>
-                  cache.jdbc.table.name=jbosscache
-                  cache.jdbc.table.create=true
-                  cache.jdbc.table.drop=true
-                  cache.jdbc.table.primarykey=jbosscache_pk
-                  cache.jdbc.fqn.column=fqn
-                  cache.jdbc.fqn.type=varchar(255)
-                  cache.jdbc.node.column=node
-                  cache.jdbc.node.type=blob
-                  cache.jdbc.parent.column=parent
-                  cache.jdbc.driver=com.mysql.jdbc.Driver
-                  cache.jdbc.url=jdbc:mysql://localhost:3306/jbossdb
-                  cache.jdbc.user=root
-                  cache.jdbc.password=
-                  cache.jdbc.sql-concat=concat(1,2)
-               </properties>
-               <!-- whether the cache loader writes are asynchronous -->
-               <async>false</async>
-               <!-- only one cache loader in the chain may set fetchPersistentState to true.
- An exception is thrown if more than one cache loader sets this to true. -->
-               <fetchPersistentState>true</fetchPersistentState>
-               <!-- determines whether this cache loader ignores writes - defaults to false. -->
-               <ignoreModifications>false</ignoreModifications>
-               <!-- if set to true, purges the contents of this cache loader when the cache starts up.
-           Defaults to false.  -->
-               <purgeOnStartup>false</purgeOnStartup>
-            </cacheloader>
-         </config>
-      </attribute>
-
-   </mbean>
-
-
-</server>

Modified: core/trunk/src/main/etc/META-INF/config2to3.xslt
===================================================================
--- core/trunk/src/main/etc/META-INF/config2to3.xslt	2008-06-26 11:31:23 UTC (rev 6053)
+++ core/trunk/src/main/etc/META-INF/config2to3.xslt	2008-06-26 12:10:31 UTC (rev 6054)
@@ -36,6 +36,11 @@
                   <xsl:value-of select="normalize-space(//attribute[@name='LockParentForChildInsertRemove'])"/>
                </xsl:attribute>
             </xsl:if>
+            <xsl:if test="//attribute[@name='NodeLockingScheme']">
+               <xsl:attribute name="optimistic">
+                  <xsl:value-of select="normalize-space(//attribute[@name='NodeLockingScheme'])"/>
+               </xsl:attribute>
+            </xsl:if>
          </xsl:element>
       </xsl:if>
    </xsl:template>
@@ -257,8 +262,8 @@
    <xsl:template match="//attribute[@name='EvictionPolicyConfig']">
       <eviction>
          <xsl:if test="./config/attribute[@name='wakeUpIntervalSeconds']">
-            <xsl:attribute name="wakeUpIntervalSeconds">
-               <xsl:value-of select="normalize-space(./config/attribute[@name='wakeUpIntervalSeconds'])"/>
+            <xsl:attribute name="wakeUpInterval">
+               <xsl:value-of select="concat(normalize-space(./config/attribute[@name='wakeUpIntervalSeconds']), '000')"/>
             </xsl:attribute>
          </xsl:if>
          <xsl:if test="./config/attribute[@name='policyClass'] | ./config/attribute[@name='policyClass']">

Deleted: core/trunk/src/main/etc/META-INF/eviction-enabled-cache-service.xml
===================================================================
--- core/trunk/src/main/etc/META-INF/eviction-enabled-cache-service.xml	2008-06-26 11:31:23 UTC (rev 6053)
+++ core/trunk/src/main/etc/META-INF/eviction-enabled-cache-service.xml	2008-06-26 12:10:31 UTC (rev 6054)
@@ -1,233 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- ===================================================================== -->
-<!--                                                                       -->
-<!--
-Sample JBoss Cache Service Configuration that hightlights various
-eviction configurations. By default LRUPolicy is enabled, by this can be
-changed by commenting it out and uncommenting another present
-eviction policy.
--->
-<!--                                                                       -->
-<!-- ===================================================================== -->
-
-<server>
-
-   <!-- ==================================================================== -->
-   <!-- Defines JBoss Cache configuration                                      -->
-   <!-- ==================================================================== -->
-
-   <mbean code="org.jboss.cache.jmx.CacheJmxWrapper"
-          name="jboss.cache:service=Cache">
-
-      <depends>jboss:service=Naming</depends>
-      <depends>jboss:service=TransactionManager</depends>
-
-      <!--
-          Configure the TransactionManager
-      -->
-      <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup
-      </attribute>
-
-
-      <!--
-          Node locking level : SERIALIZABLE
-                               REPEATABLE_READ (default)
-                               READ_COMMITTED
-                               READ_UNCOMMITTED
-                               NONE
-      -->
-      <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
-
-      <!--
-           Valid modes are LOCAL
-                           REPL_ASYNC
-                           REPL_SYNC
-                           INVALIDATION_ASYNC
-                           INVALIDATION_SYNC
-      -->
-      <attribute name="CacheMode">LOCAL</attribute>
-
-      <!-- Max number of milliseconds to wait for a lock acquisition -->
-      <attribute name="LockAcquisitionTimeout">15000</attribute>
-
-      <!-- Specific eviction policy configurations. This is LRU -->
-      <attribute name="EvictionPolicyConfig">
-         <config>
-            <attribute name="wakeUpIntervalSeconds">5</attribute>
-            <!-- This defaults to 200000 if not specified -->
-            <attribute name="eventQueueSize">200000</attribute>
-            <attribute name="policyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
-
-            <!-- Cache wide default -->
-            <region name="/_default_">
-               <attribute name="maxNodes">5000</attribute>
-               <attribute name="timeToLiveSeconds">1000</attribute>
-            </region>
-            <region name="/org/jboss/data">
-               <attribute name="maxNodes">5000</attribute>
-               <attribute name="timeToLiveSeconds">1000</attribute>
-            </region>
-            <region name="/org/jboss/test/data">
-               <attribute name="maxNodes">5</attribute>
-               <attribute name="timeToLiveSeconds">4</attribute>
-            </region>
-            <region name="/test">
-               <attribute name="maxNodes">10000</attribute>
-               <attribute name="timeToLiveSeconds">4</attribute>
-            </region>
-            <region name="/maxAgeTest">
-               <attribute name="maxNodes">10000</attribute>
-               <attribute name="timeToLiveSeconds">8</attribute>
-               <attribute name="maxAgeSeconds">10</attribute>
-            </region>
-         </config>
-      </attribute>
-
-
-      <!--ElementSizePolicy eviction config-->
-      <!--<attribute name="EvictionPolicyConfig">-->
-         <!--<config>-->
-            <!--<attribute name="wakeUpIntervalSeconds">3</attribute>-->
-            <!-- This defaults to 200000 if not specified -->
-            <!--<attribute name="eventQueueSize">200000</attribute>-->
-            <!-- Name of the DEFAULT eviction policy class. -->
-            <!--<attribute name="policyClass">org.jboss.cache.eviction.ElementSizePolicy</attribute>-->
-
-            <!-- Cache wide default -->
-            <!--<region name="/_default_">-->
-               <!--<attribute name="maxNodes">5000</attribute>-->
-               <!--<attribute name="maxElementsPerNode">100</attribute>-->
-            <!--</region>-->
-            <!--<region name="/org/jboss/data">-->
-               <!--<attribute name="maxNodes">10</attribute>-->
-               <!--<attribute name="maxElementsPerNode">20</attribute>-->
-            <!--</region>-->
-            <!--<region name="/org/jboss/test/data">-->
-               <!--<attribute name="maxElementsPerNode">5</attribute>-->
-            <!--</region>-->
-            <!--<region name="/test/">-->
-               <!--<attribute name="maxNodes">5000</attribute>-->
-               <!--<attribute name="maxElementsPerNode">1</attribute>-->
-            <!--</region>-->
-         <!--</config>-->
-      <!--</attribute>-->
-
-      <!-- ExpirationPolicy eviction policy configurations. -->
-      <!--<attribute name="EvictionPolicyConfig">-->
-         <!--<config>-->
-            <!-- One second is a good default -->
-            <!--<attribute name="wakeUpIntervalSeconds">1</attribute>-->
-            <!-- This defaults to 200000 if not specified -->
-            <!--<attribute name="eventQueueSize">200000</attribute>-->
-            <!-- Name of the DEFAULT eviction policy class. -->
-            <!--<attribute name="policyClass">org.jboss.cache.eviction.ExpirationPolicy</attribute>-->
-
-            <!-- Cache wide default -->
-            <!--<region name="/_default_">-->
-            <!--</region>-->
-            <!--<region name="/org/jboss/data">-->
-               <!-- Removes the soonest to expire nodes to reduce the region size to at most 250 nodes -->
-               <!--<attribute name="maxNodes">250</attribute>-->
-            <!--</region>-->
-         <!--</config>-->
-      <!--</attribute>-->
-
-      <!-- Specific eviction policy configurations. This is FIFOPolicy -->
-      <!--<attribute name="EvictionPolicyConfig">-->
-         <!--<config>-->
-            <!--<attribute name="wakeUpIntervalSeconds">3</attribute>-->
-            <!-- This defaults to 200000 if not specified -->
-            <!--<attribute name="eventQueueSize">200000</attribute>-->
-            <!-- Name of the DEFAULT eviction policy class. -->
-            <!--<attribute name="policyClass">org.jboss.cache.eviction.FIFOPolicy</attribute>-->
-
-            <!-- Cache wide default -->
-            <!--<region name="/_default_">-->
-               <!--<attribute name="maxNodes">5000</attribute>-->
-            <!--</region>-->
-            <!--<region name="/org/jboss/data">-->
-               <!--<attribute name="maxNodes">5000</attribute>-->
-            <!--</region>-->
-            <!--<region name="/org/jboss/test/data">-->
-               <!--<attribute name="maxNodes">5</attribute>-->
-            <!--</region>-->
-            <!--<region name="/test/">-->
-               <!--<attribute name="maxNodes">10000</attribute>-->
-            <!--</region>-->
-         <!--</config>-->
-      <!--</attribute>-->
-
-      <!-- Specific eviction policy configurations. This is LFUPolicy -->
-      <!--<attribute name="EvictionPolicyConfig">-->
-         <!--<config>-->
-            <!--<attribute name="wakeUpIntervalSeconds">3</attribute>-->
-            <!-- This defaults to 200000 if not specified -->
-            <!--<attribute name="eventQueueSize">200000</attribute>-->
-
-            <!-- Cache wide default -->
-            <!--<region name="/_default_" policyClass="org.jboss.cache.eviction.LFUPolicy">-->
-               <!--<attribute name="maxNodes">5000</attribute>-->
-               <!--<attribute name="minNodes">10</attribute>-->
-            <!--</region>-->
-            <!--<region name="/org/jboss/data" policyClass="org.jboss.cache.eviction.LFUPolicy">-->
-               <!--<attribute name="maxNodes">5000</attribute>-->
-               <!--<attribute name="minNodes">4000</attribute>-->
-            <!--</region>-->
-            <!--<region name="/org/jboss/test/data" policyClass="org.jboss.cache.eviction.LFUPolicy">-->
-               <!--<attribute name="minNodes">5</attribute>-->
-            <!--</region>-->
-         <!--</config>-->
-      <!--</attribute>-->
-
-      <!-- Specific eviction policy configurations. This is MRUPolicy -->
-      <!--<attribute name="EvictionPolicyConfig">-->
-         <!--<config>-->
-            <!--<attribute name="wakeUpIntervalSeconds">3</attribute>-->
-            <!-- This defaults to 200000 if not specified -->
-            <!--<attribute name="eventQueueSize">200000</attribute>-->
-            <!-- Name of the DEFAULT eviction policy class. -->
-            <!--<attribute name="policyClass">org.jboss.cache.eviction.MRUPolicy</attribute>-->
-
-
-            <!-- Cache wide default -->
-            <!--<region name="/_default_">-->
-               <!--<attribute name="maxNodes">100</attribute>-->
-            <!--</region>-->
-            <!--<region name="/org/jboss/data">-->
-               <!--<attribute name="maxNodes">250</attribute>-->
-            <!--</region>-->
-            <!--<region name="/org/jboss/test/data">-->
-               <!--<attribute name="maxNodes">6</attribute>-->
-            <!--</region>-->
-         <!--</config>-->
-      <!--</attribute>-->
-
-      <!-- Specific eviction policy configurations. This is LRU -->
-      <!--<attribute name="EvictionPolicyConfig">-->
-         <!--<config>-->
-            <!--<attribute name="wakeUpIntervalSeconds">1</attribute>-->
-            <!-- This defaults to 200000 if not specified -->
-            <!--<attribute name="eventQueueSize">200000</attribute>-->
-            <!--<attribute name="policyClass">org.jboss.cache.eviction.NullEvictionPolicy</attribute>-->
-
-            <!-- Cache wide default -->
-            <!--<region name="/_default_">-->
-               <!--<attribute name="maxNodes">5000</attribute>-->
-               <!--<attribute name="timeToLiveSeconds">1</attribute>-->
-            <!--</region>-->
-            <!--<region name="/test" policyClass="org.jboss.cache.eviction.NullEvictionPolicy">-->
-               <!--<attribute name="maxNodes">10000</attribute>-->
-               <!--<attribute name="timeToLiveSeconds">1</attribute>-->
-            <!--</region>-->
-            <!--<region name="/lru" policyClass="org.jboss.cache.eviction.LRUPolicy">-->
-               <!--<attribute name="maxNodes">10000</attribute>-->
-               <!--<attribute name="timeToLiveSeconds">1</attribute>-->
-            <!--</region>-->
-         <!--</config>-->
-      <!--</attribute>-->      
-
-   </mbean>
-
-
-</server>

Deleted: core/trunk/src/main/etc/META-INF/local-cache-service.xml
===================================================================
--- core/trunk/src/main/etc/META-INF/local-cache-service.xml	2008-06-26 11:31:23 UTC (rev 6053)
+++ core/trunk/src/main/etc/META-INF/local-cache-service.xml	2008-06-26 12:10:31 UTC (rev 6054)
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- ===================================================================== -->
-<!--                                                                       -->
-<!--  Sample TreeCache Service Configuration                               -->
-<!--                                                                       -->
-<!-- ===================================================================== -->
-
-<server>
-
-   <!-- ==================================================================== -->
-   <!-- Defines TreeCache configuration                                      -->
-   <!-- ==================================================================== -->
-
-   <mbean code="org.jboss.cache.jmx.CacheJmxWrapper"
-          name="jboss.cache:service=TreeCache">
-
-      <depends>jboss:service=Naming</depends>
-      <depends>jboss:service=TransactionManager</depends>
-
-
-      <!-- Configure the TransactionManager -->
-      <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup
-      </attribute>
-
-
-      <!--
-          Node locking level : SERIALIZABLE
-                               REPEATABLE_READ (default)
-                               READ_COMMITTED
-                               READ_UNCOMMITTED
-                               NONE
-      -->
-      <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
-
-      <!--
-           Valid modes are LOCAL
-                           REPL_ASYNC
-                           REPL_SYNC
-                           INVALIDATION_ASYNC
-                           INVALIDATION_SYNC
-      -->
-      <attribute name="CacheMode">LOCAL</attribute>
-
-      <!-- Max number of milliseconds to wait for a lock acquisition -->
-      <attribute name="LockAcquisitionTimeout">15000</attribute>
-
-   </mbean>
-</server>

Deleted: core/trunk/src/main/etc/META-INF/multiplexer-enabled-cache-service.xml
===================================================================
--- core/trunk/src/main/etc/META-INF/multiplexer-enabled-cache-service.xml	2008-06-26 11:31:23 UTC (rev 6053)
+++ core/trunk/src/main/etc/META-INF/multiplexer-enabled-cache-service.xml	2008-06-26 12:10:31 UTC (rev 6054)
@@ -1,173 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- ===================================================================== -->
-<!--                                                                       -->
-<!--  Sample TreeCache Service Configuration                               -->
-<!--                                                                       -->
-<!-- ===================================================================== -->
-
-<server>
-
-   <classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar"/>
-
-
-   <!-- ==================================================================== -->
-   <!-- Defines TreeCache configuration                                      -->
-   <!-- ==================================================================== -->
-
-   <mbean code="org.jboss.cache.jmx.CacheJmxWrapper"
-          name="jboss.cache:service=testTreeCache">
-
-      <depends>jboss:service=Naming</depends>
-      <depends>jboss:service=TransactionManager</depends>
-
-      <!--
-          Configure the TransactionManager
-      -->
-      <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup
-      </attribute>
-
-
-      <!--
-          Node locking level : SERIALIZABLE
-                               REPEATABLE_READ (default)
-                               READ_COMMITTED
-                               READ_UNCOMMITTED
-                               NONE
-      -->
-      <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
-
-      <!--
-           Valid modes are LOCAL
-                           REPL_ASYNC
-                           REPL_SYNC
-                           INVALIDATION_ASYNC
-                           INVALIDATION_SYNC
-      -->
-      <attribute name="CacheMode">REPL_SYNC</attribute>
-
-      <!-- Name of cluster. Needs to be the same for all TreeCache nodes in a
-           cluster in order to find each other.
-      -->
-      <attribute name="ClusterName">JBossCache-Cluster</attribute>
-
-      <depends>jgroups.mux:name=Multiplexer</depends>
-      <attribute name="MultiplexerStack">fc-fast-minimalthreads</attribute>
-
-      <!-- JGroups protocol stack properties.
-         ClusterConfig isn't used if the multiplexer is enabled and successfully initialized.
-      -->
-      <attribute name="ClusterConfig">
-         <config>
-            <TCP recv_buf_size="20000000" use_send_queues="false"
-                 loopback="false"
-                 discard_incompatible_packets="true"
-                 max_bundle_size="64000"
-                 max_bundle_timeout="30"
-                 use_incoming_packet_handler="true"
-                 enable_bundling="true"
-                 enable_unicast_bundling="true"
-                 enable_diagnostics="true"
-
-                 use_concurrent_stack="true"
-
-                 thread_naming_pattern="pl"
-
-                 thread_pool.enabled="true"
-                 thread_pool.min_threads="1"
-                 thread_pool.max_threads="4"
-                 thread_pool.keep_alive_time="30000"
-                 thread_pool.queue_enabled="true"
-                 thread_pool.queue_max_size="50000"
-                 thread_pool.rejection_policy="discard"
-
-                 oob_thread_pool.enabled="true"
-                 oob_thread_pool.min_threads="2"
-                 oob_thread_pool.max_threads="4"
-                 oob_thread_pool.keep_alive_time="10000"
-                 oob_thread_pool.queue_enabled="false"
-                 oob_thread_pool.queue_max_size="10"
-                 oob_thread_pool.rejection_policy="Run"/>
-
-            <!--<PING timeout="2000" num_initial_members="3"/>-->
-             <MPING mcast_addr="232.1.2.3" timeout="2000" num_initial_members="3"/>
-            <MERGE2 max_interval="30000" min_interval="10000"/>
-            <FD_SOCK/>
-            <FD timeout="10000" max_tries="5" shun="true"/>
-            <VERIFY_SUSPECT timeout="1500"/>
-            <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0"
-                           retransmit_timeout="300,600,1200,2400,4800"
-                           discard_delivered_msgs="true"/>
-            <!--<UNICAST timeout="30,60,120,300,600,1200,2400,3600"/>-->
-            <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
-                           max_bytes="400000"/>
-            <pbcast.GMS print_local_addr="true" join_timeout="5000"
-                        join_retry_timeout="2000" shun="false"
-                        view_bundling="true" view_ack_collection_timeout="5000"/>
-              <FC max_credits="5000000"
-                    min_threshold="0.20"/>
-            <FRAG2 frag_size="60000"/>
-            <pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
-            <!-- <pbcast.STATE_TRANSFER/> -->
-            <pbcast.FLUSH timeout="0"/>
-         </config>
-      </attribute>
-
-
-
-      <!--
-          The max amount of time (in milliseconds) we wait until the
-          state (ie. the contents of the cache) are retrieved from
-          existing members in a clustered environment
-      -->
-      <attribute name="StateRetrievalTimeout">20000</attribute>
-
-      <!--
-          Number of milliseconds to wait until all responses for a
-          synchronous call have been received.
-      -->
-      <attribute name="SyncReplTimeout">15000</attribute>
-
-      <!-- Max number of milliseconds to wait for a lock acquisition -->
-      <attribute name="LockAcquisitionTimeout">10000</attribute>
-
-
-      <!-- Buddy Replication config -->
-      <attribute name="BuddyReplicationConfig">
-         <config>
-            <buddyReplicationEnabled>true</buddyReplicationEnabled>
-            <!-- these are the default values anyway -->
-            <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>myBuddyPoolReplicationGroup</buddyPoolName>
-            <!-- communication timeout for inter-buddy group organisation messages (such as assigning to and removing
-          from groups -->
-            <buddyCommunicationTimeout>2000</buddyCommunicationTimeout>
-
-            <!-- the following three elements, all relating to data gravitation, default to false -->
-            <!-- Should data gravitation be attempted whenever there is a cache miss on finding a node?
-If false, data will only be gravitated if an Option is set enabling it -->
-            <autoDataGravitation>false</autoDataGravitation>
-            <!-- removes data on remote caches' trees and backup subtrees when gravitated to a new data owner -->
-            <dataGravitationRemoveOnFind>true</dataGravitationRemoveOnFind>
-            <!-- search backup subtrees as well for data when gravitating.  Results in backup nodes being able to
-        answer data gravitation requests. -->
-            <dataGravitationSearchBackupTrees>true</dataGravitationSearchBackupTrees>
-
-         </config>
-      </attribute>
-   </mbean>
-
-
-</server>

Deleted: core/trunk/src/main/etc/META-INF/optimistically-locked-cache-service.xml
===================================================================
--- core/trunk/src/main/etc/META-INF/optimistically-locked-cache-service.xml	2008-06-26 11:31:23 UTC (rev 6053)
+++ core/trunk/src/main/etc/META-INF/optimistically-locked-cache-service.xml	2008-06-26 12:10:31 UTC (rev 6054)
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- ===================================================================== -->
-<!--                                                                       -->
-<!--  Sample TreeCache Service Configuration                               -->
-<!--                                                                       -->
-<!-- ===================================================================== -->
-
-<server>
-
-   <!-- ==================================================================== -->
-   <!-- Defines TreeCache configuration                                      -->
-   <!-- ==================================================================== -->
-
-   <mbean code="org.jboss.cache.jmx.CacheJmxWrapper"
-          name="jboss.cache:service=TreeCache">
-
-      <depends>jboss:service=Naming</depends>
-      <depends>jboss:service=TransactionManager</depends>
-
-      <!--
-          Configure the TransactionManager
-      -->
-      <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup
-      </attribute>
-
-      <attribute name="FetchInMemoryState">false</attribute>
-
-      <!--  Whether each interceptor should have an mbean
-registered to capture and display its statistics.  -->
-      <attribute name="UseInterceptorMbeans">true</attribute>
-
-      <!--
-          Node locking scheme:
-              OPTIMISTIC
-              PESSIMISTIC (default)
-      -->
-      <attribute name="NodeLockingScheme">Optimistic</attribute>
-
-      <!--
-          Node locking level : SERIALIZABLE
-                               REPEATABLE_READ (default)
-                               READ_COMMITTED
-                               READ_UNCOMMITTED
-                               NONE
-      -->
-      <attribute name="IsolationLevel">READ_COMMITTED</attribute>
-
-
-      <!--
-           Valid modes are LOCAL
-                           REPL_ASYNC
-                           REPL_SYNC
-      -->
-      <attribute name="CacheMode">LOCAL</attribute>
-
-      <!-- Max number of milliseconds to wait for a lock acquisition -->
-      <attribute name="LockAcquisitionTimeout">10000</attribute>
-
-      <attribute name="EvictionPolicyConfig">
-         <config>
-            <attribute name="wakeUpIntervalSeconds">1</attribute>
-            <!-- Name of the DEFAULT eviction policy class.-->
-            <attribute name="policyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
-
-            <region name="/_default_">
-               <attribute name="maxNodes">10</attribute>
-               <attribute name="timeToLiveSeconds">0</attribute>
-               <attribute name="maxAgeSeconds">0</attribute>
-            </region>
-            <region name="/testingRegion">
-               <attribute name="maxNodes">10</attribute>
-               <attribute name="timeToLiveSeconds">0</attribute>
-               <attribute name="maxAgeSeconds">0</attribute>
-            </region>
-            <region name="/timeBased">
-               <attribute name="maxNodes">10</attribute>
-               <attribute name="timeToLiveSeconds">1</attribute>
-               <attribute name="maxAgeSeconds">1</attribute>
-            </region>
-         </config>
-      </attribute>
-
-   </mbean>
-</server>

Deleted: core/trunk/src/main/etc/META-INF/total-replication-cache-service.xml
===================================================================
--- core/trunk/src/main/etc/META-INF/total-replication-cache-service.xml	2008-06-26 11:31:23 UTC (rev 6053)
+++ core/trunk/src/main/etc/META-INF/total-replication-cache-service.xml	2008-06-26 12:10:31 UTC (rev 6054)
@@ -1,150 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- ===================================================================== -->
-<!--                                                                       -->
-<!--  Sample for total replication.                               -->
-<!--                                                                       -->
-<!-- ===================================================================== -->
-
-<server>
-
-   <classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar"/>
-
-
-   <!-- ==================================================================== -->
-   <!-- Defines TreeCache configuration                                      -->
-   <!-- ==================================================================== -->
-
-   <mbean code="org.jboss.cache.jmx.CacheJmxWrapper"
-          name="jboss.cache:service=testTreeCache">
-
-      <depends>jboss:service=Naming</depends>
-      <depends>jboss:service=TransactionManager</depends>
-
-      <!--
-          Configure the TransactionManager
-      -->
-      <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup
-      </attribute>
-
-
-      <!--
-          Node locking level : SERIALIZABLE
-                               REPEATABLE_READ (default)
-                               READ_COMMITTED
-                               READ_UNCOMMITTED
-                               NONE
-      -->
-      <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
-
-      <!--
-           Valid modes are LOCAL
-                           REPL_ASYNC
-                           REPL_SYNC
-                           INVALIDATION_ASYNC
-                           INVALIDATION_SYNC
-      -->
-      <attribute name="CacheMode">REPL_SYNC</attribute>
-
-      <!-- Name of cluster. Needs to be the same for all TreeCache nodes in a
-           cluster in order to find each other.
-      -->
-      <attribute name="ClusterName">JBossCache-Cluster</attribute>
-
-      <!--Uncomment next three statements to enable JGroups multiplexer.
-      This configuration is dependent on the JGroups multiplexer being
-      registered in an MBean server such as JBossAS.  -->
-      <!--
-      <depends>jgroups.mux:name=Multiplexer</depends>
-      <attribute name="MultiplexerService">jgroups.mux:name=Multiplexer</attribute>
-      <attribute name="MultiplexerStack">fc-fast-minimalthreads</attribute>
-      -->
-
-      <!-- JGroups protocol stack properties.
-         ClusterConfig isn't used if the multiplexer is enabled and successfully initialized.
-      -->
-      <attribute name="ClusterConfig">
-         <config>
-            <UDP mcast_addr="228.10.10.10"
-                 mcast_port="45588"
-                 tos="8"
-                 ucast_recv_buf_size="20000000"
-                 ucast_send_buf_size="640000"
-                 mcast_recv_buf_size="25000000"
-                 mcast_send_buf_size="640000"
-                 loopback="false"
-                 discard_incompatible_packets="true"
-                 max_bundle_size="64000"
-                 max_bundle_timeout="30"
-                 use_incoming_packet_handler="true"
-                 ip_ttl="2"
-                 enable_bundling="false"
-                 enable_diagnostics="true"
-
-                 use_concurrent_stack="true"
-
-                 thread_naming_pattern="pl"
-
-                 thread_pool.enabled="true"
-                 thread_pool.min_threads="1"
-                 thread_pool.max_threads="25"
-                 thread_pool.keep_alive_time="30000"
-                 thread_pool.queue_enabled="true"
-                 thread_pool.queue_max_size="10"
-                 thread_pool.rejection_policy="Run"
-
-                 oob_thread_pool.enabled="true"
-                 oob_thread_pool.min_threads="1"
-                 oob_thread_pool.max_threads="4"
-                 oob_thread_pool.keep_alive_time="10000"
-                 oob_thread_pool.queue_enabled="true"
-                 oob_thread_pool.queue_max_size="10"
-                 oob_thread_pool.rejection_policy="Run"/>
-
-            <PING timeout="2000" num_initial_members="2"/>
-            <MERGE2 max_interval="30000" min_interval="10000"/>
-            <FD_SOCK/>
-            <FD timeout="10000" max_tries="5" shun="true"/>
-            <VERIFY_SUSPECT timeout="1500"/>
-            <pbcast.NAKACK
-                  use_mcast_xmit="false" gc_lag="0"
-                  retransmit_timeout="300,600,1200,2400,4800"
-                  discard_delivered_msgs="true"/>
-            <UNICAST timeout="300,600,1200,2400,3600"/>
-            <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
-                           max_bytes="400000"/>
-            <pbcast.GMS print_local_addr="true" join_timeout="5000" shun="false"
-                        view_bundling="true" view_ack_collection_timeout="5000"/>
-            <FRAG2 frag_size="60000"/>
-            <pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
-            <!-- <pbcast.STATE_TRANSFER/> -->
-            <pbcast.FLUSH timeout="0"/>
-         </config>
-      </attribute>
-
-      <!--
-              Whether or not to fetch state on joining a cluster
-              NOTE this used to be called FetchStateOnStartup and has been renamed to be more descriptive.
-      -->
-      <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 in a clustered environment
-      -->
-      <attribute name="StateRetrievalTimeout">20000</attribute>
-
-      <!--
-          Number of milliseconds to wait until all responses for a
-          synchronous call have been received.
-      -->
-      <attribute name="SyncReplTimeout">15000</attribute>
-
-      <!-- Max number of milliseconds to wait for a lock acquisition -->
-      <attribute name="LockAcquisitionTimeout">10000</attribute>
-
-
-   </mbean>
-</server>

Modified: core/trunk/src/main/java/org/jboss/cache/config/parsing/ConfigFilesConvertor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/config/parsing/ConfigFilesConvertor.java	2008-06-26 11:31:23 UTC (rev 6053)
+++ core/trunk/src/main/java/org/jboss/cache/config/parsing/ConfigFilesConvertor.java	2008-06-26 12:10:31 UTC (rev 6054)
@@ -1,16 +1,19 @@
 package org.jboss.cache.config.parsing;
 
 import org.w3c.dom.Document;
+import org.xml.sax.SAXException;
 
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerConfigurationException;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamSource;
 import javax.xml.transform.stream.StreamResult;
-import java.io.File;
+import java.io.*;
+import java.net.URL;
 
 /**
  * Class used for converting a config file from from 2.x version to 3.x verison.
@@ -20,9 +23,70 @@
  */
 public class ConfigFilesConvertor
 {
-   static Document document;
 
-   
+   public void parse(InputStream is, OutputStream os, String xsltFile) throws Exception
+   {
+      InputStream xsltInStream = getFileAsStream(xsltFile);
+
+      Document document = getInputDocument(is);
+
+      // Use a Transformer for output
+      Transformer transformer = getTransformer(xsltInStream);
+
+      DOMSource source = new DOMSource(document);
+      StreamResult result = new StreamResult(os);
+      transformer.transform(source, result);
+      xsltInStream.close();
+   }
+
+   public void parse(String inputFile, OutputStream os, String xsltFile) throws Exception 
+   {
+      InputStream stream = getFileAsStream(inputFile);
+      try
+      {
+         parse(stream, os, xsltFile);
+      } finally {
+         stream.close();
+      }
+   }
+
+   private Transformer getTransformer(InputStream xsltInStream)
+         throws TransformerConfigurationException
+   {
+      TransformerFactory tFactory = TransformerFactory.newInstance();
+      StreamSource stylesource = new StreamSource(xsltInStream);
+      return tFactory.newTransformer(stylesource);
+   }
+
+   private Document getInputDocument(InputStream is)
+         throws ParserConfigurationException, SAXException, IOException
+   {
+      DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+      DocumentBuilder builder = factory.newDocumentBuilder();
+      return builder.parse(is);
+   }
+
+   private InputStream getFileAsStream(String fileName) throws Exception
+   {
+      File xsltConvertorFile = new File(fileName);
+      if (!xsltConvertorFile.exists())
+      {
+         ClassLoader ccl = Thread.currentThread().getContextClassLoader();
+         URL resource = ccl.getResource(fileName);
+         if (resource == null)
+         {
+            resource = getClass().getClassLoader().getResource(fileName);
+            if (resource == null)
+               throw new IllegalArgumentException("File " + fileName + " does not exist on disk or on class path");
+         }
+         return ccl.getResourceAsStream(fileName);
+      }
+      else
+      {
+         return new FileInputStream(xsltConvertorFile);
+      }
+   }
+
    public static void main(String[] argv) throws Exception
    {
       if (argv.length != 2)
@@ -30,24 +94,10 @@
          System.err.println("Usage: java Stylizer stylesheet xmlfile");
          System.exit(1);
       }
-
-      DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-
-      //factory.setNamespaceAware(true);
-      //factory.setValidating(true);
-      File stylesheet = new File(argv[0]);
       File datafile = new File(argv[1]);
-
-      DocumentBuilder builder = factory.newDocumentBuilder();
-      document = builder.parse(datafile);
-
-      // Use a Transformer for output
-      TransformerFactory tFactory = TransformerFactory.newInstance();
-      StreamSource stylesource = new StreamSource(stylesheet);
-      Transformer transformer = tFactory.newTransformer(stylesource);
-
-      DOMSource source = new DOMSource(document);
-      StreamResult result = new StreamResult(System.out);
-      transformer.transform(source, result);
+      ConfigFilesConvertor convertor = new ConfigFilesConvertor();
+      FileInputStream is = new FileInputStream(datafile);
+      convertor.parse(is, System.out, argv[0]);
+      is.close();
    }
 }
\ No newline at end of file

Modified: core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlConfigurationParser.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlConfigurationParser.java	2008-06-26 11:31:23 UTC (rev 6053)
+++ core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlConfigurationParser.java	2008-06-26 12:10:31 UTC (rev 6054)
@@ -182,6 +182,7 @@
 
    private void configureTransport(Element element)
    {
+      if (element == null) return; //transport might be missing
       String clusterName = element.getAttribute("clusterName");
       config.setClusterName(clusterName);
       String multiplexerStack = element.getAttribute("multiplexerStack");
@@ -199,11 +200,11 @@
    {
       if (element == null) return; //we might not have this configured
       String fetchInMemoryState = element.getAttribute("fetchInMemoryState");
-      if (fetchInMemoryState != null) config.setFetchInMemoryState(getBoolean(fetchInMemoryState));
+      if (existsAttribute(fetchInMemoryState)) config.setFetchInMemoryState(getBoolean(fetchInMemoryState));
       String stateRetrievalTimeout = element.getAttribute("stateRetrievalTimeout");
-      if (stateRetrievalTimeout != null) config.setStateRetrievalTimeout(getLong(stateRetrievalTimeout));
+      if (existsAttribute(stateRetrievalTimeout)) config.setStateRetrievalTimeout(getLong(stateRetrievalTimeout));
       String inactiveOnStartup = element.getAttribute("inactiveOnStartup");
-      if (inactiveOnStartup != null) config.setInactiveOnStartup(getBoolean(inactiveOnStartup));
+      if (existsAttribute(inactiveOnStartup)) config.setInactiveOnStartup(getBoolean(inactiveOnStartup));
    }
 
    private void configureInvalidation(Element element)
@@ -260,12 +261,13 @@
    private void configureLocking(Element locking)
    {
       String isolationLevel = locking.getAttribute("isolationLevel");
-      if (isolationLevel != null) config.setIsolationLevel(IsolationLevel.valueOf(isolationLevel));
+      if (existsAttribute(isolationLevel)) config.setIsolationLevel(IsolationLevel.valueOf(isolationLevel));
       String lockParentForChildInsertRemove = locking.getAttribute("lockParentForChildInsertRemove");
-      if (lockParentForChildInsertRemove != null)
-         config.setLockParentForChildInsertRemove(getBoolean(lockParentForChildInsertRemove));
+      if (existsAttribute(lockParentForChildInsertRemove)) config.setLockParentForChildInsertRemove(getBoolean(lockParentForChildInsertRemove));
       String lockAcquisitionTimeout = locking.getAttribute("lockAcquisitionTimeout");
-      if (lockAcquisitionTimeout != null) config.setLockAcquisitionTimeout(getLong(lockAcquisitionTimeout));
+      if (existsAttribute(lockAcquisitionTimeout)) config.setLockAcquisitionTimeout(getLong(lockAcquisitionTimeout));
+      String optimistic = locking.getAttribute("optimistic");
+      if (existsAttribute(optimistic)) config.setNodeLockingScheme(Configuration.NodeLockingScheme.OPTIMISTIC);
    }
 
    private Element getSingleElement(String elementName)

Added: core/trunk/src/test/java/org/jboss/cache/config/ConfigurationTransformerTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/config/ConfigurationTransformerTest.java	                        (rev 0)
+++ core/trunk/src/test/java/org/jboss/cache/config/ConfigurationTransformerTest.java	2008-06-26 12:10:31 UTC (rev 6054)
@@ -0,0 +1,88 @@
+package org.jboss.cache.config;
+
+import org.testng.annotations.Test;
+import org.testng.annotations.BeforeMethod;
+import org.jboss.cache.config.parsing.ConfigFilesConvertor;
+import org.jboss.cache.config.parsing.XmlConfigurationParser;
+import org.jboss.cache.config.parsing.XmlConfigurationParser2x;
+
+import java.io.File;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+
+/**
+ * Test how xsl for migrating config files from 2.x to 3.x works.
+ * For each existing config file in 2.x it does the following:
+ * <ol>
+ * <li> it transforms it into an 3.x file using the xslt transformer
+ * <li> it parses the file with 2.x parser
+ * <li> it parses the transform with a 3.x parser
+ * <li> checks that the two resulting <tt>Configuration</tt> objects are equal.
+ * </ol>
+ *
+ * @author Mircea.Markus at jboss.com
+ * @since 3.0
+ */
+ at Test(groups = "functional")
+public class ConfigurationTransformerTest
+{
+   //TODO - make this reference relative
+   public static final String XSLT_FILE = "C:\\projects\\cache\\branches\\za_trunk\\src\\main\\etc\\META-INF\\config2to3.xslt";
+   private static final String BASE_DIR = "META-INF/config2.x";
+   File xsltFile;
+   ConfigFilesConvertor convertor = new ConfigFilesConvertor();
+
+   @BeforeMethod
+   public void setUp()
+   {
+      xsltFile = new File(XSLT_FILE);
+      assert xsltFile.exists();
+   }
+
+   /**
+    * Useful when {@link testEqualityOnTransformedFiles} fails and you need to isolate a failure.
+    */
+   public void testSingleFile() throws Exception
+   {
+      String fileName = getFileName("/optimistically-locked-cache-service.xml");
+      ByteArrayOutputStream baos = new ByteArrayOutputStream();
+      convertor.parse(fileName, baos, XSLT_FILE);
+
+      XmlConfigurationParser newParser = new XmlConfigurationParser();
+      XmlConfigurationParser2x oldParser = new XmlConfigurationParser2x();
+
+      Configuration newConfig = newParser.parse(new ByteArrayInputStream(baos.toByteArray()));
+      Configuration oldConfig = oldParser.parseFile(fileName);
+
+      assert oldConfig.getNodeLockingScheme().equals(newConfig.getNodeLockingScheme());
+      assert oldConfig.isNodeLockingOptimistic() == newConfig.isNodeLockingOptimistic();
+      assert oldConfig.equals(newConfig);
+   }
+
+   public void testEqualityOnTransformedFiles() throws Exception
+   {
+      String[] fileNames = {"buddy-replication-cache-service.xml", "cacheloader-enabled-cache-service.xml",
+            "eviction-enabled-cache-service.xml", "local-cache-service.xml", "multiplexer-enabled-cache-service.xml",
+            "optimistically-locked-cache-service.xml", "total-replication-cache-service.xml"};
+      for (String file : fileNames)
+      {
+         System.out.println("Processing file = " + file);
+         String fileName = getFileName(file);
+         ByteArrayOutputStream baos = new ByteArrayOutputStream();
+         convertor.parse(fileName, baos, XSLT_FILE);
+
+         XmlConfigurationParser newParser = new XmlConfigurationParser();
+         XmlConfigurationParser2x oldParser = new XmlConfigurationParser2x();
+
+         Configuration newConfig = newParser.parse(new ByteArrayInputStream(baos.toByteArray()));
+         Configuration oldConfig = oldParser.parseFile(fileName);
+
+         assert newConfig.equals(oldConfig);
+      }
+   }
+
+   private String getFileName(String s)
+   {
+      return BASE_DIR + File.separator + s;
+   }
+}

Modified: core/trunk/src/test/java/org/jboss/cache/config/parsing/XmlConfigurationParserTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/config/parsing/XmlConfigurationParserTest.java	2008-06-26 11:31:23 UTC (rev 6053)
+++ core/trunk/src/test/java/org/jboss/cache/config/parsing/XmlConfigurationParserTest.java	2008-06-26 12:10:31 UTC (rev 6054)
@@ -238,4 +238,5 @@
       assert singlStoreConf.getProperties().get("pushStateWhenCoordinatorTimeout").equals("20000");
 
    }
+
 }

Modified: core/trunk/src/test/resources/META-INF/conf-test/all-elements-file-3.x.xml
===================================================================
--- core/trunk/src/test/resources/META-INF/conf-test/all-elements-file-3.x.xml	2008-06-26 11:31:23 UTC (rev 6053)
+++ core/trunk/src/test/resources/META-INF/conf-test/all-elements-file-3.x.xml	2008-06-26 12:10:31 UTC (rev 6054)
@@ -2,7 +2,8 @@
 
 <jbosscache>
 
-   <locking isolationLevel="REPEATABLE_READ" lockParentForChildInsertRemove="true" lockAcquisitionTimeout="10234"/>
+   <locking isolationLevel="REPEATABLE_READ" lockParentForChildInsertRemove="true" lockAcquisitionTimeout="10234"
+            optimistic="false"/>
 
    <transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"
                 syncRollbackPhase="true" syncCommitPhase="true"/>

Modified: core/trunk/src/test/resources/META-INF/conf-test/parser-test-file-2.x.xml
===================================================================
--- core/trunk/src/test/resources/META-INF/conf-test/parser-test-file-2.x.xml	2008-06-26 11:31:23 UTC (rev 6053)
+++ core/trunk/src/test/resources/META-INF/conf-test/parser-test-file-2.x.xml	2008-06-26 12:10:31 UTC (rev 6054)
@@ -75,7 +75,9 @@
 
       <attribute name="ExposeManagementStatistics">false</attribute>
 
+      <attribute name="NodeLockingScheme">Optimistic</attribute>
 
+
       <attribute name="EvictionPolicyConfig">
          <config>
             <attribute name="wakeUpIntervalSeconds">5</attribute>

Added: core/trunk/src/test/resources/META-INF/config2.x/buddy-replication-cache-service.xml
===================================================================
--- core/trunk/src/test/resources/META-INF/config2.x/buddy-replication-cache-service.xml	                        (rev 0)
+++ core/trunk/src/test/resources/META-INF/config2.x/buddy-replication-cache-service.xml	2008-06-26 12:10:31 UTC (rev 6054)
@@ -0,0 +1,179 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  Sample TreeCache Service Configuration                               -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<server>
+
+   <classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar"/>
+
+
+   <!-- ==================================================================== -->
+   <!-- Defines TreeCache configuration                                      -->
+   <!-- ==================================================================== -->
+
+   <mbean code="org.jboss.cache.jmx.CacheJmxWrapper"
+          name="jboss.cache:service=testTreeCache">
+
+      <depends>jboss:service=Naming</depends>
+      <depends>jboss:service=TransactionManager</depends>
+
+      <!--
+          Configure the TransactionManager
+      -->
+      <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup
+      </attribute>
+
+
+      <!--
+          Node locking level : SERIALIZABLE
+                               REPEATABLE_READ (default)
+                               READ_COMMITTED
+                               READ_UNCOMMITTED
+                               NONE
+      -->
+      <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
+
+      <!--
+           Valid modes are LOCAL
+                           REPL_ASYNC
+                           REPL_SYNC
+                           INVALIDATION_ASYNC
+                           INVALIDATION_SYNC
+      -->
+      <attribute name="CacheMode">REPL_SYNC</attribute>
+
+      <!-- Name of cluster. Needs to be the same for all TreeCache nodes in a
+           cluster in order to find each other.
+      -->
+      <attribute name="ClusterName">JBossCache-Cluster</attribute>
+
+      <!--Uncomment next three statements to enable JGroups multiplexer.
+This configuration is dependent on the JGroups multiplexer being
+registered in an MBean server such as JBossAS.  -->
+      <!--
+      <depends>jgroups.mux:name=Multiplexer</depends>
+      <attribute name="MultiplexerService">jgroups.mux:name=Multiplexer</attribute>
+      <attribute name="MultiplexerStack">fc-fast-minimalthreads</attribute>
+      -->
+
+      <!-- JGroups protocol stack properties.
+         ClusterConfig isn't used if the multiplexer is enabled and successfully initialized.
+      -->
+      <attribute name="ClusterConfig">
+         <config>
+            <TCP recv_buf_size="20000000" use_send_queues="false"
+                 loopback="false"
+                 discard_incompatible_packets="true"
+                 max_bundle_size="64000"
+                 max_bundle_timeout="30"
+                 use_incoming_packet_handler="true"
+                 enable_bundling="true"
+                 enable_unicast_bundling="true"
+                 enable_diagnostics="true"
+
+                 use_concurrent_stack="true"
+
+                 thread_naming_pattern="pl"
+
+                 thread_pool.enabled="true"
+                 thread_pool.min_threads="1"
+                 thread_pool.max_threads="4"
+                 thread_pool.keep_alive_time="30000"
+                 thread_pool.queue_enabled="true"
+                 thread_pool.queue_max_size="50000"
+                 thread_pool.rejection_policy="discard"
+
+                 oob_thread_pool.enabled="true"
+                 oob_thread_pool.min_threads="2"
+                 oob_thread_pool.max_threads="4"
+                 oob_thread_pool.keep_alive_time="10000"
+                 oob_thread_pool.queue_enabled="false"
+                 oob_thread_pool.queue_max_size="10"
+                 oob_thread_pool.rejection_policy="Run"/>
+
+            <!--<PING timeout="2000" num_initial_members="3"/>-->
+             <MPING mcast_addr="232.1.2.3" timeout="2000" num_initial_members="3"/>
+            <MERGE2 max_interval="30000" min_interval="10000"/>
+            <FD_SOCK/>
+            <FD timeout="10000" max_tries="5" shun="true"/>
+            <VERIFY_SUSPECT timeout="1500"/>
+            <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0"
+                           retransmit_timeout="300,600,1200,2400,4800"
+                           discard_delivered_msgs="true"/>
+            <!--<UNICAST timeout="30,60,120,300,600,1200,2400,3600"/>-->
+            <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
+                           max_bytes="400000"/>
+            <pbcast.GMS print_local_addr="true" join_timeout="5000"
+                        join_retry_timeout="2000" shun="false"
+                        view_bundling="true" view_ack_collection_timeout="5000"/>
+              <FC max_credits="5000000"
+                    min_threshold="0.20"/>
+            <FRAG2 frag_size="60000"/>
+            <pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
+            <!-- <pbcast.STATE_TRANSFER/> -->
+            <pbcast.FLUSH timeout="0"/>
+         </config>
+      </attribute>
+
+
+
+      <!--
+          The max amount of time (in milliseconds) we wait until the
+          state (ie. the contents of the cache) are retrieved from
+          existing members in a clustered environment
+      -->
+      <attribute name="StateRetrievalTimeout">20000</attribute>
+
+      <!--
+          Number of milliseconds to wait until all responses for a
+          synchronous call have been received.
+      -->
+      <attribute name="SyncReplTimeout">15000</attribute>
+
+      <!-- Max number of milliseconds to wait for a lock acquisition -->
+      <attribute name="LockAcquisitionTimeout">10000</attribute>
+
+
+      <!-- Buddy Replication config -->
+      <attribute name="BuddyReplicationConfig">
+         <config>
+            <buddyReplicationEnabled>true</buddyReplicationEnabled>
+            <!-- these are the default values anyway -->
+            <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>myBuddyPoolReplicationGroup</buddyPoolName>
+            <!-- communication timeout for inter-buddy group organisation messages (such as assigning to and removing
+          from groups -->
+            <buddyCommunicationTimeout>2000</buddyCommunicationTimeout>
+
+            <!-- the following three elements, all relating to data gravitation, default to false -->
+            <!-- Should data gravitation be attempted whenever there is a cache miss on finding a node?
+If false, data will only be gravitated if an Option is set enabling it -->
+            <autoDataGravitation>false</autoDataGravitation>
+            <!-- removes data on remote caches' trees and backup subtrees when gravitated to a new data owner -->
+            <dataGravitationRemoveOnFind>true</dataGravitationRemoveOnFind>
+            <!-- search backup subtrees as well for data when gravitating.  Results in backup nodes being able to
+        answer data gravitation requests. -->
+            <dataGravitationSearchBackupTrees>true</dataGravitationSearchBackupTrees>
+
+         </config>
+      </attribute>
+   </mbean>
+
+
+</server>

Added: core/trunk/src/test/resources/META-INF/config2.x/cacheloader-enabled-cache-service.xml
===================================================================
--- core/trunk/src/test/resources/META-INF/config2.x/cacheloader-enabled-cache-service.xml	                        (rev 0)
+++ core/trunk/src/test/resources/META-INF/config2.x/cacheloader-enabled-cache-service.xml	2008-06-26 12:10:31 UTC (rev 6054)
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  Sample TreeCache Service Configuration                               -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<server>
+
+   <!-- ==================================================================== -->
+   <!-- Defines TreeCache configuration                                      -->
+   <!-- ==================================================================== -->
+
+   <mbean code="org.jboss.cache.jmx.CacheJmxWrapper"
+          name="jboss.cache:service=TreeCache">
+
+      <depends>jboss:service=Naming</depends>
+      <depends>jboss:service=TransactionManager</depends>
+
+      <!--
+          Configure the TransactionManager
+      -->
+      <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup
+      </attribute>
+
+
+      <!--
+          Node locking level : SERIALIZABLE
+                               REPEATABLE_READ (default)
+                               READ_COMMITTED
+                               READ_UNCOMMITTED
+                               NONE
+      -->
+      <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
+
+      <!--
+           Valid modes are LOCAL
+                           REPL_ASYNC
+                           REPL_SYNC
+      -->
+      <attribute name="CacheMode">LOCAL</attribute>
+
+      <!-- Max number of milliseconds to wait for a lock acquisition -->
+      <attribute name="LockAcquisitionTimeout">15000</attribute>
+
+      <!-- Specific eviction policy configurations. This is LRU -->
+      <attribute name="EvictionPolicyConfig">
+         <config>
+            <attribute name="wakeUpIntervalSeconds">5</attribute>
+            <!-- This defaults to 200000 if not specified -->
+            <attribute name="eventQueueSize">200000</attribute>
+            <!-- Name of the DEFAULT eviction policy class. -->
+            <attribute name="policyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
+
+
+            <!-- Cache wide default -->
+            <region name="/_default_">
+               <attribute name="maxNodes">5000</attribute>
+               <attribute name="timeToLiveSeconds">3</attribute>
+            </region>
+            <region name="/org/jboss/test/data">
+               <attribute name="maxNodes">100</attribute>
+               <attribute name="timeToLiveSeconds">3</attribute>
+            </region>
+         </config>
+      </attribute>
+
+            <!-- Cache Passivation for Tree Cache
+      On pasivation, The objects are written to the backend store on eviction if CacheLoaderPassivation
+      is true, otheriwse the objects are persisted.
+      On activation, the objects are restored in the memory cache and removed from the cache loader
+      if CacheLoaderPassivation is true, otherwise the objects are only loaded from the cache loader -->
+      <attribute name="CacheLoaderConfiguration">
+         <config>
+            <!-- if passivation is true, only the first cache loader is used; the rest are ignored -->
+            <passivation>false</passivation>
+            <preload>/</preload>
+            <shared>false</shared>
+
+            <!-- we can now have multiple cache loaders, which get chained -->
+            <cacheloader>
+               <class>org.jboss.cache.loader.JDBCCacheLoader</class>
+               <!-- same as the old CacheLoaderConfig attribute -->
+               <properties>
+                  cache.jdbc.table.name=jbosscache
+                  cache.jdbc.table.create=true
+                  cache.jdbc.table.drop=true
+                  cache.jdbc.table.primarykey=jbosscache_pk
+                  cache.jdbc.fqn.column=fqn
+                  cache.jdbc.fqn.type=varchar(255)
+                  cache.jdbc.node.column=node
+                  cache.jdbc.node.type=blob
+                  cache.jdbc.parent.column=parent
+                  cache.jdbc.driver=com.mysql.jdbc.Driver
+                  cache.jdbc.url=jdbc:mysql://localhost:3306/jbossdb
+                  cache.jdbc.user=root
+                  cache.jdbc.password=
+                  cache.jdbc.sql-concat=concat(1,2)
+               </properties>
+               <!-- whether the cache loader writes are asynchronous -->
+               <async>false</async>
+               <!-- only one cache loader in the chain may set fetchPersistentState to true.
+ An exception is thrown if more than one cache loader sets this to true. -->
+               <fetchPersistentState>true</fetchPersistentState>
+               <!-- determines whether this cache loader ignores writes - defaults to false. -->
+               <ignoreModifications>false</ignoreModifications>
+               <!-- if set to true, purges the contents of this cache loader when the cache starts up.
+           Defaults to false.  -->
+               <purgeOnStartup>false</purgeOnStartup>
+            </cacheloader>
+         </config>
+      </attribute>
+
+   </mbean>
+
+
+</server>

Added: core/trunk/src/test/resources/META-INF/config2.x/eviction-enabled-cache-service.xml
===================================================================
--- core/trunk/src/test/resources/META-INF/config2.x/eviction-enabled-cache-service.xml	                        (rev 0)
+++ core/trunk/src/test/resources/META-INF/config2.x/eviction-enabled-cache-service.xml	2008-06-26 12:10:31 UTC (rev 6054)
@@ -0,0 +1,233 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--
+Sample JBoss Cache Service Configuration that hightlights various
+eviction configurations. By default LRUPolicy is enabled, by this can be
+changed by commenting it out and uncommenting another present
+eviction policy.
+-->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<server>
+
+   <!-- ==================================================================== -->
+   <!-- Defines JBoss Cache configuration                                      -->
+   <!-- ==================================================================== -->
+
+   <mbean code="org.jboss.cache.jmx.CacheJmxWrapper"
+          name="jboss.cache:service=Cache">
+
+      <depends>jboss:service=Naming</depends>
+      <depends>jboss:service=TransactionManager</depends>
+
+      <!--
+          Configure the TransactionManager
+      -->
+      <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup
+      </attribute>
+
+
+      <!--
+          Node locking level : SERIALIZABLE
+                               REPEATABLE_READ (default)
+                               READ_COMMITTED
+                               READ_UNCOMMITTED
+                               NONE
+      -->
+      <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
+
+      <!--
+           Valid modes are LOCAL
+                           REPL_ASYNC
+                           REPL_SYNC
+                           INVALIDATION_ASYNC
+                           INVALIDATION_SYNC
+      -->
+      <attribute name="CacheMode">LOCAL</attribute>
+
+      <!-- Max number of milliseconds to wait for a lock acquisition -->
+      <attribute name="LockAcquisitionTimeout">15000</attribute>
+
+      <!-- Specific eviction policy configurations. This is LRU -->
+      <attribute name="EvictionPolicyConfig">
+         <config>
+            <attribute name="wakeUpIntervalSeconds">5</attribute>
+            <!-- This defaults to 200000 if not specified -->
+            <attribute name="eventQueueSize">200000</attribute>
+            <attribute name="policyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
+
+            <!-- Cache wide default -->
+            <region name="/_default_">
+               <attribute name="maxNodes">5000</attribute>
+               <attribute name="timeToLiveSeconds">1000</attribute>
+            </region>
+            <region name="/org/jboss/data">
+               <attribute name="maxNodes">5000</attribute>
+               <attribute name="timeToLiveSeconds">1000</attribute>
+            </region>
+            <region name="/org/jboss/test/data">
+               <attribute name="maxNodes">5</attribute>
+               <attribute name="timeToLiveSeconds">4</attribute>
+            </region>
+            <region name="/test">
+               <attribute name="maxNodes">10000</attribute>
+               <attribute name="timeToLiveSeconds">4</attribute>
+            </region>
+            <region name="/maxAgeTest">
+               <attribute name="maxNodes">10000</attribute>
+               <attribute name="timeToLiveSeconds">8</attribute>
+               <attribute name="maxAgeSeconds">10</attribute>
+            </region>
+         </config>
+      </attribute>
+
+
+      <!--ElementSizePolicy eviction config-->
+      <!--<attribute name="EvictionPolicyConfig">-->
+         <!--<config>-->
+            <!--<attribute name="wakeUpIntervalSeconds">3</attribute>-->
+            <!-- This defaults to 200000 if not specified -->
+            <!--<attribute name="eventQueueSize">200000</attribute>-->
+            <!-- Name of the DEFAULT eviction policy class. -->
+            <!--<attribute name="policyClass">org.jboss.cache.eviction.ElementSizePolicy</attribute>-->
+
+            <!-- Cache wide default -->
+            <!--<region name="/_default_">-->
+               <!--<attribute name="maxNodes">5000</attribute>-->
+               <!--<attribute name="maxElementsPerNode">100</attribute>-->
+            <!--</region>-->
+            <!--<region name="/org/jboss/data">-->
+               <!--<attribute name="maxNodes">10</attribute>-->
+               <!--<attribute name="maxElementsPerNode">20</attribute>-->
+            <!--</region>-->
+            <!--<region name="/org/jboss/test/data">-->
+               <!--<attribute name="maxElementsPerNode">5</attribute>-->
+            <!--</region>-->
+            <!--<region name="/test/">-->
+               <!--<attribute name="maxNodes">5000</attribute>-->
+               <!--<attribute name="maxElementsPerNode">1</attribute>-->
+            <!--</region>-->
+         <!--</config>-->
+      <!--</attribute>-->
+
+      <!-- ExpirationPolicy eviction policy configurations. -->
+      <!--<attribute name="EvictionPolicyConfig">-->
+         <!--<config>-->
+            <!-- One second is a good default -->
+            <!--<attribute name="wakeUpIntervalSeconds">1</attribute>-->
+            <!-- This defaults to 200000 if not specified -->
+            <!--<attribute name="eventQueueSize">200000</attribute>-->
+            <!-- Name of the DEFAULT eviction policy class. -->
+            <!--<attribute name="policyClass">org.jboss.cache.eviction.ExpirationPolicy</attribute>-->
+
+            <!-- Cache wide default -->
+            <!--<region name="/_default_">-->
+            <!--</region>-->
+            <!--<region name="/org/jboss/data">-->
+               <!-- Removes the soonest to expire nodes to reduce the region size to at most 250 nodes -->
+               <!--<attribute name="maxNodes">250</attribute>-->
+            <!--</region>-->
+         <!--</config>-->
+      <!--</attribute>-->
+
+      <!-- Specific eviction policy configurations. This is FIFOPolicy -->
+      <!--<attribute name="EvictionPolicyConfig">-->
+         <!--<config>-->
+            <!--<attribute name="wakeUpIntervalSeconds">3</attribute>-->
+            <!-- This defaults to 200000 if not specified -->
+            <!--<attribute name="eventQueueSize">200000</attribute>-->
+            <!-- Name of the DEFAULT eviction policy class. -->
+            <!--<attribute name="policyClass">org.jboss.cache.eviction.FIFOPolicy</attribute>-->
+
+            <!-- Cache wide default -->
+            <!--<region name="/_default_">-->
+               <!--<attribute name="maxNodes">5000</attribute>-->
+            <!--</region>-->
+            <!--<region name="/org/jboss/data">-->
+               <!--<attribute name="maxNodes">5000</attribute>-->
+            <!--</region>-->
+            <!--<region name="/org/jboss/test/data">-->
+               <!--<attribute name="maxNodes">5</attribute>-->
+            <!--</region>-->
+            <!--<region name="/test/">-->
+               <!--<attribute name="maxNodes">10000</attribute>-->
+            <!--</region>-->
+         <!--</config>-->
+      <!--</attribute>-->
+
+      <!-- Specific eviction policy configurations. This is LFUPolicy -->
+      <!--<attribute name="EvictionPolicyConfig">-->
+         <!--<config>-->
+            <!--<attribute name="wakeUpIntervalSeconds">3</attribute>-->
+            <!-- This defaults to 200000 if not specified -->
+            <!--<attribute name="eventQueueSize">200000</attribute>-->
+
+            <!-- Cache wide default -->
+            <!--<region name="/_default_" policyClass="org.jboss.cache.eviction.LFUPolicy">-->
+               <!--<attribute name="maxNodes">5000</attribute>-->
+               <!--<attribute name="minNodes">10</attribute>-->
+            <!--</region>-->
+            <!--<region name="/org/jboss/data" policyClass="org.jboss.cache.eviction.LFUPolicy">-->
+               <!--<attribute name="maxNodes">5000</attribute>-->
+               <!--<attribute name="minNodes">4000</attribute>-->
+            <!--</region>-->
+            <!--<region name="/org/jboss/test/data" policyClass="org.jboss.cache.eviction.LFUPolicy">-->
+               <!--<attribute name="minNodes">5</attribute>-->
+            <!--</region>-->
+         <!--</config>-->
+      <!--</attribute>-->
+
+      <!-- Specific eviction policy configurations. This is MRUPolicy -->
+      <!--<attribute name="EvictionPolicyConfig">-->
+         <!--<config>-->
+            <!--<attribute name="wakeUpIntervalSeconds">3</attribute>-->
+            <!-- This defaults to 200000 if not specified -->
+            <!--<attribute name="eventQueueSize">200000</attribute>-->
+            <!-- Name of the DEFAULT eviction policy class. -->
+            <!--<attribute name="policyClass">org.jboss.cache.eviction.MRUPolicy</attribute>-->
+
+
+            <!-- Cache wide default -->
+            <!--<region name="/_default_">-->
+               <!--<attribute name="maxNodes">100</attribute>-->
+            <!--</region>-->
+            <!--<region name="/org/jboss/data">-->
+               <!--<attribute name="maxNodes">250</attribute>-->
+            <!--</region>-->
+            <!--<region name="/org/jboss/test/data">-->
+               <!--<attribute name="maxNodes">6</attribute>-->
+            <!--</region>-->
+         <!--</config>-->
+      <!--</attribute>-->
+
+      <!-- Specific eviction policy configurations. This is LRU -->
+      <!--<attribute name="EvictionPolicyConfig">-->
+         <!--<config>-->
+            <!--<attribute name="wakeUpIntervalSeconds">1</attribute>-->
+            <!-- This defaults to 200000 if not specified -->
+            <!--<attribute name="eventQueueSize">200000</attribute>-->
+            <!--<attribute name="policyClass">org.jboss.cache.eviction.NullEvictionPolicy</attribute>-->
+
+            <!-- Cache wide default -->
+            <!--<region name="/_default_">-->
+               <!--<attribute name="maxNodes">5000</attribute>-->
+               <!--<attribute name="timeToLiveSeconds">1</attribute>-->
+            <!--</region>-->
+            <!--<region name="/test" policyClass="org.jboss.cache.eviction.NullEvictionPolicy">-->
+               <!--<attribute name="maxNodes">10000</attribute>-->
+               <!--<attribute name="timeToLiveSeconds">1</attribute>-->
+            <!--</region>-->
+            <!--<region name="/lru" policyClass="org.jboss.cache.eviction.LRUPolicy">-->
+               <!--<attribute name="maxNodes">10000</attribute>-->
+               <!--<attribute name="timeToLiveSeconds">1</attribute>-->
+            <!--</region>-->
+         <!--</config>-->
+      <!--</attribute>-->      
+
+   </mbean>
+
+
+</server>

Added: core/trunk/src/test/resources/META-INF/config2.x/local-cache-service.xml
===================================================================
--- core/trunk/src/test/resources/META-INF/config2.x/local-cache-service.xml	                        (rev 0)
+++ core/trunk/src/test/resources/META-INF/config2.x/local-cache-service.xml	2008-06-26 12:10:31 UTC (rev 6054)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  Sample TreeCache Service Configuration                               -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<server>
+
+   <!-- ==================================================================== -->
+   <!-- Defines TreeCache configuration                                      -->
+   <!-- ==================================================================== -->
+
+   <mbean code="org.jboss.cache.jmx.CacheJmxWrapper"
+          name="jboss.cache:service=TreeCache">
+
+      <depends>jboss:service=Naming</depends>
+      <depends>jboss:service=TransactionManager</depends>
+
+
+      <!-- Configure the TransactionManager -->
+      <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup
+      </attribute>
+
+
+      <!--
+          Node locking level : SERIALIZABLE
+                               REPEATABLE_READ (default)
+                               READ_COMMITTED
+                               READ_UNCOMMITTED
+                               NONE
+      -->
+      <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
+
+      <!--
+           Valid modes are LOCAL
+                           REPL_ASYNC
+                           REPL_SYNC
+                           INVALIDATION_ASYNC
+                           INVALIDATION_SYNC
+      -->
+      <attribute name="CacheMode">LOCAL</attribute>
+
+      <!-- Max number of milliseconds to wait for a lock acquisition -->
+      <attribute name="LockAcquisitionTimeout">15000</attribute>
+
+   </mbean>
+</server>

Added: core/trunk/src/test/resources/META-INF/config2.x/multiplexer-enabled-cache-service.xml
===================================================================
--- core/trunk/src/test/resources/META-INF/config2.x/multiplexer-enabled-cache-service.xml	                        (rev 0)
+++ core/trunk/src/test/resources/META-INF/config2.x/multiplexer-enabled-cache-service.xml	2008-06-26 12:10:31 UTC (rev 6054)
@@ -0,0 +1,173 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  Sample TreeCache Service Configuration                               -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<server>
+
+   <classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar"/>
+
+
+   <!-- ==================================================================== -->
+   <!-- Defines TreeCache configuration                                      -->
+   <!-- ==================================================================== -->
+
+   <mbean code="org.jboss.cache.jmx.CacheJmxWrapper"
+          name="jboss.cache:service=testTreeCache">
+
+      <depends>jboss:service=Naming</depends>
+      <depends>jboss:service=TransactionManager</depends>
+
+      <!--
+          Configure the TransactionManager
+      -->
+      <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup
+      </attribute>
+
+
+      <!--
+          Node locking level : SERIALIZABLE
+                               REPEATABLE_READ (default)
+                               READ_COMMITTED
+                               READ_UNCOMMITTED
+                               NONE
+      -->
+      <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
+
+      <!--
+           Valid modes are LOCAL
+                           REPL_ASYNC
+                           REPL_SYNC
+                           INVALIDATION_ASYNC
+                           INVALIDATION_SYNC
+      -->
+      <attribute name="CacheMode">REPL_SYNC</attribute>
+
+      <!-- Name of cluster. Needs to be the same for all TreeCache nodes in a
+           cluster in order to find each other.
+      -->
+      <attribute name="ClusterName">JBossCache-Cluster</attribute>
+
+      <depends>jgroups.mux:name=Multiplexer</depends>
+      <attribute name="MultiplexerStack">fc-fast-minimalthreads</attribute>
+
+      <!-- JGroups protocol stack properties.
+         ClusterConfig isn't used if the multiplexer is enabled and successfully initialized.
+      -->
+      <attribute name="ClusterConfig">
+         <config>
+            <TCP recv_buf_size="20000000" use_send_queues="false"
+                 loopback="false"
+                 discard_incompatible_packets="true"
+                 max_bundle_size="64000"
+                 max_bundle_timeout="30"
+                 use_incoming_packet_handler="true"
+                 enable_bundling="true"
+                 enable_unicast_bundling="true"
+                 enable_diagnostics="true"
+
+                 use_concurrent_stack="true"
+
+                 thread_naming_pattern="pl"
+
+                 thread_pool.enabled="true"
+                 thread_pool.min_threads="1"
+                 thread_pool.max_threads="4"
+                 thread_pool.keep_alive_time="30000"
+                 thread_pool.queue_enabled="true"
+                 thread_pool.queue_max_size="50000"
+                 thread_pool.rejection_policy="discard"
+
+                 oob_thread_pool.enabled="true"
+                 oob_thread_pool.min_threads="2"
+                 oob_thread_pool.max_threads="4"
+                 oob_thread_pool.keep_alive_time="10000"
+                 oob_thread_pool.queue_enabled="false"
+                 oob_thread_pool.queue_max_size="10"
+                 oob_thread_pool.rejection_policy="Run"/>
+
+            <!--<PING timeout="2000" num_initial_members="3"/>-->
+             <MPING mcast_addr="232.1.2.3" timeout="2000" num_initial_members="3"/>
+            <MERGE2 max_interval="30000" min_interval="10000"/>
+            <FD_SOCK/>
+            <FD timeout="10000" max_tries="5" shun="true"/>
+            <VERIFY_SUSPECT timeout="1500"/>
+            <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0"
+                           retransmit_timeout="300,600,1200,2400,4800"
+                           discard_delivered_msgs="true"/>
+            <!--<UNICAST timeout="30,60,120,300,600,1200,2400,3600"/>-->
+            <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
+                           max_bytes="400000"/>
+            <pbcast.GMS print_local_addr="true" join_timeout="5000"
+                        join_retry_timeout="2000" shun="false"
+                        view_bundling="true" view_ack_collection_timeout="5000"/>
+              <FC max_credits="5000000"
+                    min_threshold="0.20"/>
+            <FRAG2 frag_size="60000"/>
+            <pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
+            <!-- <pbcast.STATE_TRANSFER/> -->
+            <pbcast.FLUSH timeout="0"/>
+         </config>
+      </attribute>
+
+
+
+      <!--
+          The max amount of time (in milliseconds) we wait until the
+          state (ie. the contents of the cache) are retrieved from
+          existing members in a clustered environment
+      -->
+      <attribute name="StateRetrievalTimeout">20000</attribute>
+
+      <!--
+          Number of milliseconds to wait until all responses for a
+          synchronous call have been received.
+      -->
+      <attribute name="SyncReplTimeout">15000</attribute>
+
+      <!-- Max number of milliseconds to wait for a lock acquisition -->
+      <attribute name="LockAcquisitionTimeout">10000</attribute>
+
+
+      <!-- Buddy Replication config -->
+      <attribute name="BuddyReplicationConfig">
+         <config>
+            <buddyReplicationEnabled>true</buddyReplicationEnabled>
+            <!-- these are the default values anyway -->
+            <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>myBuddyPoolReplicationGroup</buddyPoolName>
+            <!-- communication timeout for inter-buddy group organisation messages (such as assigning to and removing
+          from groups -->
+            <buddyCommunicationTimeout>2000</buddyCommunicationTimeout>
+
+            <!-- the following three elements, all relating to data gravitation, default to false -->
+            <!-- Should data gravitation be attempted whenever there is a cache miss on finding a node?
+If false, data will only be gravitated if an Option is set enabling it -->
+            <autoDataGravitation>false</autoDataGravitation>
+            <!-- removes data on remote caches' trees and backup subtrees when gravitated to a new data owner -->
+            <dataGravitationRemoveOnFind>true</dataGravitationRemoveOnFind>
+            <!-- search backup subtrees as well for data when gravitating.  Results in backup nodes being able to
+        answer data gravitation requests. -->
+            <dataGravitationSearchBackupTrees>true</dataGravitationSearchBackupTrees>
+
+         </config>
+      </attribute>
+   </mbean>
+
+
+</server>

Added: core/trunk/src/test/resources/META-INF/config2.x/optimistically-locked-cache-service.xml
===================================================================
--- core/trunk/src/test/resources/META-INF/config2.x/optimistically-locked-cache-service.xml	                        (rev 0)
+++ core/trunk/src/test/resources/META-INF/config2.x/optimistically-locked-cache-service.xml	2008-06-26 12:10:31 UTC (rev 6054)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  Sample TreeCache Service Configuration                               -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<server>
+
+   <!-- ==================================================================== -->
+   <!-- Defines TreeCache configuration                                      -->
+   <!-- ==================================================================== -->
+
+   <mbean code="org.jboss.cache.jmx.CacheJmxWrapper"
+          name="jboss.cache:service=TreeCache">
+
+      <depends>jboss:service=Naming</depends>
+      <depends>jboss:service=TransactionManager</depends>
+
+      <!--
+          Configure the TransactionManager
+      -->
+      <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup
+      </attribute>
+
+      <attribute name="FetchInMemoryState">false</attribute>
+
+      <!--  Whether each interceptor should have an mbean
+registered to capture and display its statistics.  -->
+      <attribute name="UseInterceptorMbeans">true</attribute>
+
+      <!--
+          Node locking scheme:
+              OPTIMISTIC
+              PESSIMISTIC (default)
+      -->
+      <attribute name="NodeLockingScheme">Optimistic</attribute>
+
+      <!--
+          Node locking level : SERIALIZABLE
+                               REPEATABLE_READ (default)
+                               READ_COMMITTED
+                               READ_UNCOMMITTED
+                               NONE
+      -->
+      <attribute name="IsolationLevel">READ_COMMITTED</attribute>
+
+
+      <!--
+           Valid modes are LOCAL
+                           REPL_ASYNC
+                           REPL_SYNC
+      -->
+      <attribute name="CacheMode">LOCAL</attribute>
+
+      <!-- Max number of milliseconds to wait for a lock acquisition -->
+      <attribute name="LockAcquisitionTimeout">10000</attribute>
+
+      <attribute name="EvictionPolicyConfig">
+         <config>
+            <attribute name="wakeUpIntervalSeconds">1</attribute>
+            <!-- Name of the DEFAULT eviction policy class.-->
+            <attribute name="policyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
+
+            <region name="/_default_">
+               <attribute name="maxNodes">10</attribute>
+               <attribute name="timeToLiveSeconds">0</attribute>
+               <attribute name="maxAgeSeconds">0</attribute>
+            </region>
+            <region name="/testingRegion">
+               <attribute name="maxNodes">10</attribute>
+               <attribute name="timeToLiveSeconds">0</attribute>
+               <attribute name="maxAgeSeconds">0</attribute>
+            </region>
+            <region name="/timeBased">
+               <attribute name="maxNodes">10</attribute>
+               <attribute name="timeToLiveSeconds">1</attribute>
+               <attribute name="maxAgeSeconds">1</attribute>
+            </region>
+         </config>
+      </attribute>
+
+   </mbean>
+</server>

Added: core/trunk/src/test/resources/META-INF/config2.x/total-replication-cache-service.xml
===================================================================
--- core/trunk/src/test/resources/META-INF/config2.x/total-replication-cache-service.xml	                        (rev 0)
+++ core/trunk/src/test/resources/META-INF/config2.x/total-replication-cache-service.xml	2008-06-26 12:10:31 UTC (rev 6054)
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  Sample for total replication.                               -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<server>
+
+   <classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar"/>
+
+
+   <!-- ==================================================================== -->
+   <!-- Defines TreeCache configuration                                      -->
+   <!-- ==================================================================== -->
+
+   <mbean code="org.jboss.cache.jmx.CacheJmxWrapper"
+          name="jboss.cache:service=testTreeCache">
+
+      <depends>jboss:service=Naming</depends>
+      <depends>jboss:service=TransactionManager</depends>
+
+      <!--
+          Configure the TransactionManager
+      -->
+      <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup
+      </attribute>
+
+
+      <!--
+          Node locking level : SERIALIZABLE
+                               REPEATABLE_READ (default)
+                               READ_COMMITTED
+                               READ_UNCOMMITTED
+                               NONE
+      -->
+      <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
+
+      <!--
+           Valid modes are LOCAL
+                           REPL_ASYNC
+                           REPL_SYNC
+                           INVALIDATION_ASYNC
+                           INVALIDATION_SYNC
+      -->
+      <attribute name="CacheMode">REPL_SYNC</attribute>
+
+      <!-- Name of cluster. Needs to be the same for all TreeCache nodes in a
+           cluster in order to find each other.
+      -->
+      <attribute name="ClusterName">JBossCache-Cluster</attribute>
+
+      <!--Uncomment next three statements to enable JGroups multiplexer.
+      This configuration is dependent on the JGroups multiplexer being
+      registered in an MBean server such as JBossAS.  -->
+      <!--
+      <depends>jgroups.mux:name=Multiplexer</depends>
+      <attribute name="MultiplexerService">jgroups.mux:name=Multiplexer</attribute>
+      <attribute name="MultiplexerStack">fc-fast-minimalthreads</attribute>
+      -->
+
+      <!-- JGroups protocol stack properties.
+         ClusterConfig isn't used if the multiplexer is enabled and successfully initialized.
+      -->
+      <attribute name="ClusterConfig">
+         <config>
+            <UDP mcast_addr="228.10.10.10"
+                 mcast_port="45588"
+                 tos="8"
+                 ucast_recv_buf_size="20000000"
+                 ucast_send_buf_size="640000"
+                 mcast_recv_buf_size="25000000"
+                 mcast_send_buf_size="640000"
+                 loopback="false"
+                 discard_incompatible_packets="true"
+                 max_bundle_size="64000"
+                 max_bundle_timeout="30"
+                 use_incoming_packet_handler="true"
+                 ip_ttl="2"
+                 enable_bundling="false"
+                 enable_diagnostics="true"
+
+                 use_concurrent_stack="true"
+
+                 thread_naming_pattern="pl"
+
+                 thread_pool.enabled="true"
+                 thread_pool.min_threads="1"
+                 thread_pool.max_threads="25"
+                 thread_pool.keep_alive_time="30000"
+                 thread_pool.queue_enabled="true"
+                 thread_pool.queue_max_size="10"
+                 thread_pool.rejection_policy="Run"
+
+                 oob_thread_pool.enabled="true"
+                 oob_thread_pool.min_threads="1"
+                 oob_thread_pool.max_threads="4"
+                 oob_thread_pool.keep_alive_time="10000"
+                 oob_thread_pool.queue_enabled="true"
+                 oob_thread_pool.queue_max_size="10"
+                 oob_thread_pool.rejection_policy="Run"/>
+
+            <PING timeout="2000" num_initial_members="2"/>
+            <MERGE2 max_interval="30000" min_interval="10000"/>
+            <FD_SOCK/>
+            <FD timeout="10000" max_tries="5" shun="true"/>
+            <VERIFY_SUSPECT timeout="1500"/>
+            <pbcast.NAKACK
+                  use_mcast_xmit="false" gc_lag="0"
+                  retransmit_timeout="300,600,1200,2400,4800"
+                  discard_delivered_msgs="true"/>
+            <UNICAST timeout="300,600,1200,2400,3600"/>
+            <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
+                           max_bytes="400000"/>
+            <pbcast.GMS print_local_addr="true" join_timeout="5000" shun="false"
+                        view_bundling="true" view_ack_collection_timeout="5000"/>
+            <FRAG2 frag_size="60000"/>
+            <pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
+            <!-- <pbcast.STATE_TRANSFER/> -->
+            <pbcast.FLUSH timeout="0"/>
+         </config>
+      </attribute>
+
+      <!--
+              Whether or not to fetch state on joining a cluster
+              NOTE this used to be called FetchStateOnStartup and has been renamed to be more descriptive.
+      -->
+      <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 in a clustered environment
+      -->
+      <attribute name="StateRetrievalTimeout">20000</attribute>
+
+      <!--
+          Number of milliseconds to wait until all responses for a
+          synchronous call have been received.
+      -->
+      <attribute name="SyncReplTimeout">15000</attribute>
+
+      <!-- Max number of milliseconds to wait for a lock acquisition -->
+      <attribute name="LockAcquisitionTimeout">10000</attribute>
+
+
+   </mbean>
+</server>




More information about the jbosscache-commits mailing list