[jbosscache-commits] JBoss Cache SVN: r7598 - in core/branches/flat/src: main/java/org/horizon/config and 8 other directories.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Mon Jan 26 20:51:15 EST 2009


Author: manik.surtani at jboss.com
Date: 2009-01-26 20:51:15 -0500 (Mon, 26 Jan 2009)
New Revision: 7598

Added:
   core/branches/flat/src/test/java/org/horizon/config/parsing/
   core/branches/flat/src/test/java/org/horizon/config/parsing/ConfigurationParserTest.java
   core/branches/flat/src/test/java/org/horizon/config/parsing/GlobalConfigurationParserTest.java
   core/branches/flat/src/test/java/org/horizon/config/parsing/XmlFileParsingTest.java
Removed:
   core/branches/flat/src/main/java/org/horizon/config/parsing/GlobalConfigurationParserTest.java
   core/branches/flat/src/test/java/org/horizon/config/parser/
Modified:
   core/branches/flat/src/main/java/org/horizon/CacheDelegate.java
   core/branches/flat/src/main/java/org/horizon/Version.java
   core/branches/flat/src/main/java/org/horizon/config/AbstractConfigurationBean.java
   core/branches/flat/src/main/java/org/horizon/config/CacheLoaderConfig.java
   core/branches/flat/src/main/java/org/horizon/config/Configuration.java
   core/branches/flat/src/main/java/org/horizon/config/GlobalConfiguration.java
   core/branches/flat/src/main/java/org/horizon/config/PluggableConfigurationComponent.java
   core/branches/flat/src/main/java/org/horizon/config/parsing/XmlConfigurationParserImpl.java
   core/branches/flat/src/main/java/org/horizon/config/parsing/XmlParserBase.java
   core/branches/flat/src/main/java/org/horizon/config/parsing/element/LoadersElementParser.java
   core/branches/flat/src/main/java/org/horizon/loader/CacheLoaderManager.java
   core/branches/flat/src/main/java/org/horizon/loader/SingletonStoreDefaultConfig.java
   core/branches/flat/src/main/resources/config-samples/all.xml
   core/branches/flat/src/main/resources/schema/horizon-config-1.0.xsd
   core/branches/flat/src/test/resources/configs/named-cache-test.xml
   core/branches/flat/src/test/resources/configs/string-property-replaced.xml
Log:
More configuration fixes

Modified: core/branches/flat/src/main/java/org/horizon/CacheDelegate.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/CacheDelegate.java	2009-01-26 16:56:02 UTC (rev 7597)
+++ core/branches/flat/src/main/java/org/horizon/CacheDelegate.java	2009-01-27 01:51:15 UTC (rev 7598)
@@ -365,7 +365,7 @@
    }
 
    public String getVersion() {
-      return Version.decodeVersion(Version.getVersionShort());
+      return Version.version;
    }
 
    public void setName(String name) {

Modified: core/branches/flat/src/main/java/org/horizon/Version.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/Version.java	2009-01-26 16:56:02 UTC (rev 7597)
+++ core/branches/flat/src/main/java/org/horizon/Version.java	2009-01-27 01:51:15 UTC (rev 7598)
@@ -129,6 +129,15 @@
       return major + "." + minor + "." + patch;
    }
 
+   /**
+    * Serialization only looks at major and minor, not micro or below.
+    */
+   public static String decodeVersionForSerialization(short version) {
+      int major = (version & MAJOR_MASK) >> MAJOR_SHIFT;
+      int minor = (version & MINOR_MASK) >> MINOR_SHIFT;
+      return major + "." + minor;
+   }
+
    private static String[] getParts(String versionString) {
       return versionString.split("[\\.\\-]");
    }

Modified: core/branches/flat/src/main/java/org/horizon/config/AbstractConfigurationBean.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/config/AbstractConfigurationBean.java	2009-01-26 16:56:02 UTC (rev 7597)
+++ core/branches/flat/src/main/java/org/horizon/config/AbstractConfigurationBean.java	2009-01-27 01:51:15 UTC (rev 7598)
@@ -46,9 +46,9 @@
 @Scope(Scopes.NAMED_CACHE)
 public abstract class AbstractConfigurationBean implements CloneableConfigurationComponent {
    private static final long serialVersionUID = 4879873994727821938L;
-
+   protected static final TypedProperties EMPTY_PROPERTIES = new TypedProperties();
    protected transient Log log = LogFactory.getLog(getClass());
-//   private transient CacheSPI cache; // back-reference to test whether the cache is running.
+   //   private transient CacheSPI cache; // back-reference to test whether the cache is running.
    //   private transient ComponentRegistry cr;
    // a workaround to get over immutability checks
    private boolean accessible;

Modified: core/branches/flat/src/main/java/org/horizon/config/CacheLoaderConfig.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/config/CacheLoaderConfig.java	2009-01-26 16:56:02 UTC (rev 7597)
+++ core/branches/flat/src/main/java/org/horizon/config/CacheLoaderConfig.java	2009-01-27 01:51:15 UTC (rev 7598)
@@ -42,16 +42,12 @@
    private static final long serialVersionUID = 2210349340378984424L;
 
    private boolean passivation;
-   private String preload;
+   private boolean preload;
    private List<IndividualCacheLoaderConfig> cacheLoaderConfigs = new ArrayList<IndividualCacheLoaderConfig>();
 
    private boolean shared;
 
-   public String getPreload() {
-      return preload;
-   }
-
-   public void setPreload(String preload) {
+   public void setPreload(boolean preload) {
       testImmutability("preload");
       this.preload = preload;
    }
@@ -122,7 +118,7 @@
       int result = 19;
       result = 51 * result + (passivation ? 0 : 1);
       result = 51 * result + (shared ? 0 : 1);
-      result = 51 * result + (preload == null ? 0 : preload.hashCode());
+      result = 51 * result + (preload ? 0 : 1);
       result = 51 * result + (cacheLoaderConfigs == null ? 0 : cacheLoaderConfigs.hashCode());
       return result;
    }
@@ -151,7 +147,11 @@
       return false;
    }
 
+   public boolean isPreload() {
+      return preload;
+   }
 
+
    /**
     * Configuration object that holds the confguration of an individual cache loader.
     *
@@ -340,11 +340,11 @@
             setClassName(className);
          }
 
-         public Properties getSingletonStoreproperties() {
+         public Properties getSingletonStoreProperties() {
             return properties;
          }
 
-         public void setSingletonStoreproperties(Properties properties) {
+         public void setSingletonStoreProperties(Properties properties) {
             setProperties(properties);
          }
 

Modified: core/branches/flat/src/main/java/org/horizon/config/Configuration.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/config/Configuration.java	2009-01-26 16:56:02 UTC (rev 7597)
+++ core/branches/flat/src/main/java/org/horizon/config/Configuration.java	2009-01-27 01:51:15 UTC (rev 7598)
@@ -45,6 +45,7 @@
 
    private Map<String, EvictionCacheConfig> evictionCacheConfigs = new HashMap<String, EvictionCacheConfig>(4);
    private GlobalConfiguration globalConfiguration;
+   private boolean useAsyncSerialization = true;
 
    public EvictionCacheConfig getEvictionCacheConfig(String cacheName) {
       return evictionCacheConfigs.values().iterator().next();
@@ -63,6 +64,10 @@
       this.globalConfiguration = globalConfiguration;
    }
 
+   public boolean isUseAsyncSerialization() {
+      return useAsyncSerialization;
+   }
+
    /**
     * Cache replication mode.
     */
@@ -320,6 +325,11 @@
       this.useLazyDeserialization = useLazyDeserialization;
    }
 
+   public void setUseAsyncSerialization(boolean useAsyncSerialization) {
+      testImmutability("useAsyncSerialization");
+      this.useAsyncSerialization = useAsyncSerialization;
+   }
+
    // ------------------------------------------------------------------------------------------------------------
    //   GETTERS
    // ------------------------------------------------------------------------------------------------------------

Modified: core/branches/flat/src/main/java/org/horizon/config/GlobalConfiguration.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/config/GlobalConfiguration.java	2009-01-26 16:56:02 UTC (rev 7597)
+++ core/branches/flat/src/main/java/org/horizon/config/GlobalConfiguration.java	2009-01-27 01:51:15 UTC (rev 7598)
@@ -30,7 +30,6 @@
     * Default replication version, from {@link org.horizon.Version#getVersionShort}.
     */
    public static final short DEFAULT_MARSHALL_VERSION = Version.getVersionShort();
-   private static final TypedProperties EMPTY_PROPERTIES = new TypedProperties();
 
    String asyncListenerExecutorFactoryClass = DefaultExecutorFactory.class.getName();
    TypedProperties asyncListenerExecutorProperties = EMPTY_PROPERTIES;
@@ -264,13 +263,9 @@
    }
 
    public String getMarshallVersionString() {
-      return Version.decodeVersion(marshallVersion);
+      return Version.decodeVersionForSerialization(marshallVersion);
    }
 
-   public String getReplicationVersionString() {
-      return Version.decodeVersion(marshallVersion);
-   }
-
    public void setMarshallVersion(short marshallVersion) {
       testImmutability("marshallVersion");
       this.marshallVersion = marshallVersion;

Modified: core/branches/flat/src/main/java/org/horizon/config/PluggableConfigurationComponent.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/config/PluggableConfigurationComponent.java	2009-01-26 16:56:02 UTC (rev 7597)
+++ core/branches/flat/src/main/java/org/horizon/config/PluggableConfigurationComponent.java	2009-01-27 01:51:15 UTC (rev 7598)
@@ -35,7 +35,7 @@
  */
 public abstract class PluggableConfigurationComponent extends AbstractNamedCacheConfigurationBean {
    protected String className;
-   protected Properties properties;
+   protected Properties properties = EMPTY_PROPERTIES;
 
    public String getClassName() {
       return className;

Deleted: core/branches/flat/src/main/java/org/horizon/config/parsing/GlobalConfigurationParserTest.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/config/parsing/GlobalConfigurationParserTest.java	2009-01-26 16:56:02 UTC (rev 7597)
+++ core/branches/flat/src/main/java/org/horizon/config/parsing/GlobalConfigurationParserTest.java	2009-01-27 01:51:15 UTC (rev 7598)
@@ -1,200 +0,0 @@
-package org.horizon.config.parsing;
-
-import org.horizon.config.GlobalConfiguration;
-import org.horizon.executors.DefaultExecutorFactory;
-import org.horizon.executors.DefaultScheduledExecutorFactory;
-import org.horizon.marshall.HorizonMarshaller;
-import org.horizon.marshall.VersionAwareMarshaller;
-import org.horizon.remoting.transport.jgroups.JGroupsTransport;
-import org.testng.annotations.Test;
-import org.w3c.dom.Element;
-
-
- at Test(groups = "unit")
-public class GlobalConfigurationParserTest {
-
-   public void testTransport() throws Exception {
-      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
-      String transportClass = "org.blah.Blah";
-      String xml = "<transport transportClass=\"" + transportClass + "\"><property name=\"something\">value</property></transport>";
-      Element e = XmlConfigHelper.stringToElement(xml);
-
-      GlobalConfiguration gc = new GlobalConfiguration();
-      parser.configureTransport(e, gc);
-
-      assert gc.getTransportClass().equals(transportClass);
-      assert gc.getTransportProperties().size() == 1;
-      assert gc.getTransportProperties().getProperty("something").equals("value");
-   }
-
-   public void testDefaultTransport() throws Exception {
-      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
-      String xml = "<transport />";
-      Element e = XmlConfigHelper.stringToElement(xml);
-
-      GlobalConfiguration gc = new GlobalConfiguration();
-      parser.configureTransport(e, gc);
-
-      assert gc.getTransportClass().equals(JGroupsTransport.class.getName());
-      assert gc.getTransportProperties().size() == 0;
-   }
-
-   public void testShutdown() throws Exception {
-      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
-      String xml = "<shutdown hookBehavior=\"REGISTER\" />";
-      Element e = XmlConfigHelper.stringToElement(xml);
-
-      GlobalConfiguration gc = new GlobalConfiguration();
-      parser.configureShutdown(e, gc);
-
-      assert gc.getShutdownHookBehavior() == GlobalConfiguration.ShutdownHookBehavior.REGISTER;
-   }
-
-   public void testDefaultShutdown() throws Exception {
-      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
-      String xml = "<shutdown />";
-      Element e = XmlConfigHelper.stringToElement(xml);
-
-      GlobalConfiguration gc = new GlobalConfiguration();
-      parser.configureShutdown(e, gc);
-
-      assert gc.getShutdownHookBehavior() == GlobalConfiguration.ShutdownHookBehavior.DEFAULT;
-   }
-
-   public void testMarshalling() throws Exception {
-      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
-      String xml = "<serialization marshallerClass=\"org.horizon.marshall.HorizonMarshaller\" version=\"9.2\"\n" +
-            "                     objectInputStreamPoolSize=\"100\" objectOutputStreamPoolSize=\"100\"/>";
-      Element e = XmlConfigHelper.stringToElement(xml);
-
-      GlobalConfiguration gc = new GlobalConfiguration();
-      parser.configureMarshalling(e, gc);
-
-      assert gc.getMarshallerClass().equals(HorizonMarshaller.class.getName());
-      assert gc.getMarshallVersionString().equals("9.2.0");
-      assert gc.getObjectInputStreamPoolSize() == 100;
-      assert gc.getObjectOutputStreamPoolSize() == 100;
-   }
-
-   public void testMarshallingDefaults() throws Exception {
-      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
-      String xml = "<serialization />";
-      Element e = XmlConfigHelper.stringToElement(xml);
-
-      GlobalConfiguration gc = new GlobalConfiguration();
-      parser.configureMarshalling(e, gc);
-
-      assert gc.getMarshallerClass().equals(VersionAwareMarshaller.class.getName());
-      assert gc.getMarshallVersionString().equals("1.0.0");
-      assert gc.getObjectInputStreamPoolSize() == 50;
-      assert gc.getObjectOutputStreamPoolSize() == 50;
-   }
-
-   public void testAsyncListenerExecutor() throws Exception {
-      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
-      String xml = "<asyncListenerExecutor factory=\"com.mycompany.Factory\">\n" +
-            "         <property name=\"maxThreads\" value=\"5\" />" +
-            "      </asyncListenerExecutor>";
-      Element e = XmlConfigHelper.stringToElement(xml);
-
-      GlobalConfiguration gc = new GlobalConfiguration();
-      parser.configureAsyncListenerExecutor(e, gc);
-
-      assert gc.getAsyncListenerExecutorFactoryClass().equals("com.mycompany.Factory");
-      assert gc.getAsyncListenerExecutorProperties().size() == 1;
-      assert gc.getAsyncListenerExecutorProperties().get("maxThreads").equals("5");
-   }
-
-   public void testAsyncSerializationExecutor() throws Exception {
-      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
-      String xml = "<asyncSerializationExecutor factory=\"com.mycompany.Factory\">\n" +
-            "         <property name=\"maxThreads\" value=\"5\" />" +
-            "      </asyncSerializationExecutor>";
-      Element e = XmlConfigHelper.stringToElement(xml);
-
-      GlobalConfiguration gc = new GlobalConfiguration();
-      parser.configureAsyncSerializationExecutor(e, gc);
-
-      assert gc.getAsyncSerializationExecutorFactoryClass().equals("com.mycompany.Factory");
-      assert gc.getAsyncSerializationExecutorProperties().size() == 1;
-      assert gc.getAsyncSerializationExecutorProperties().get("maxThreads").equals("5");
-   }
-
-   public void testEvictionScheduledExecutor() throws Exception {
-      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
-      String xml = "<evictionScheduledExecutor factory=\"com.mycompany.Factory\">\n" +
-            "         <property name=\"maxThreads\" value=\"5\" />" +
-            "      </evictionScheduledExecutor>";
-      Element e = XmlConfigHelper.stringToElement(xml);
-
-      GlobalConfiguration gc = new GlobalConfiguration();
-      parser.configureEvictionScheduledExecutor(e, gc);
-
-      assert gc.getEvictionScheduledExecutorFactoryClass().equals("com.mycompany.Factory");
-      assert gc.getEvictionScheduledExecutorProperties().size() == 1;
-      assert gc.getEvictionScheduledExecutorProperties().get("maxThreads").equals("5");
-   }
-
-   public void testReplicationQueueScheduledExecutor() throws Exception {
-      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
-      String xml = "<replicationQueueScheduledExecutor factory=\"com.mycompany.Factory\">\n" +
-            "         <property name=\"maxThreads\" value=\"5\" />" +
-            "      </replicationQueueScheduledExecutor>";
-      Element e = XmlConfigHelper.stringToElement(xml);
-
-      GlobalConfiguration gc = new GlobalConfiguration();
-      parser.configureReplicationQueueScheduledExecutor(e, gc);
-
-      assert gc.getReplicationQueueScheduledExecutorFactoryClass().equals("com.mycompany.Factory");
-      assert gc.getReplicationQueueScheduledExecutorProperties().size() == 1;
-      assert gc.getReplicationQueueScheduledExecutorProperties().get("maxThreads").equals("5");
-   }
-
-   public void testAsyncListenerExecutorDefaults() throws Exception {
-      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
-      String xml = "<asyncListenerExecutor />";
-      Element e = XmlConfigHelper.stringToElement(xml);
-
-      GlobalConfiguration gc = new GlobalConfiguration();
-      parser.configureAsyncListenerExecutor(e, gc);
-
-      assert gc.getAsyncListenerExecutorFactoryClass().equals(DefaultExecutorFactory.class.getName());
-      assert gc.getAsyncListenerExecutorProperties().size() == 0;
-   }
-
-   public void testAsyncSerializationExecutorDefaults() throws Exception {
-      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
-      String xml = "<asyncSerializationExecutor />";
-      Element e = XmlConfigHelper.stringToElement(xml);
-
-      GlobalConfiguration gc = new GlobalConfiguration();
-      parser.configureAsyncSerializationExecutor(e, gc);
-
-      assert gc.getAsyncSerializationExecutorFactoryClass().equals(DefaultExecutorFactory.class.getName());
-      assert gc.getAsyncSerializationExecutorProperties().size() == 0;
-   }
-
-   public void testEvictionScheduledExecutorDefaults() throws Exception {
-      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
-      String xml = "<evictionScheduledExecutor />";
-      Element e = XmlConfigHelper.stringToElement(xml);
-
-      GlobalConfiguration gc = new GlobalConfiguration();
-      parser.configureEvictionScheduledExecutor(e, gc);
-
-      assert gc.getEvictionScheduledExecutorFactoryClass().equals(DefaultScheduledExecutorFactory.class.getName());
-      assert gc.getEvictionScheduledExecutorProperties().size() == 0;
-   }
-
-   public void testReplicationQueueScheduledExecutorDefaults() throws Exception {
-      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
-      String xml = "<replicationQueueScheduledExecutor />";
-      Element e = XmlConfigHelper.stringToElement(xml);
-
-      GlobalConfiguration gc = new GlobalConfiguration();
-      parser.configureReplicationQueueScheduledExecutor(e, gc);
-
-      assert gc.getReplicationQueueScheduledExecutorFactoryClass().equals(DefaultScheduledExecutorFactory.class.getName());
-      assert gc.getReplicationQueueScheduledExecutorProperties().size() == 0;
-   }
-}

Modified: core/branches/flat/src/main/java/org/horizon/config/parsing/XmlConfigurationParserImpl.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/config/parsing/XmlConfigurationParserImpl.java	2009-01-26 16:56:02 UTC (rev 7597)
+++ core/branches/flat/src/main/java/org/horizon/config/parsing/XmlConfigurationParserImpl.java	2009-01-27 01:51:15 UTC (rev 7598)
@@ -4,11 +4,13 @@
 import org.horizon.config.Configuration;
 import org.horizon.config.ConfigurationException;
 import org.horizon.config.CustomInterceptorConfig;
+import org.horizon.config.DuplicateCacheNameException;
 import org.horizon.config.GlobalConfiguration;
 import org.horizon.config.parsing.element.CustomInterceptorsElementParser;
 import org.horizon.config.parsing.element.EvictionElementParser;
 import org.horizon.config.parsing.element.LoadersElementParser;
 import org.horizon.lock.IsolationLevel;
+import org.horizon.transaction.GenericTransactionManagerLookup;
 import org.horizon.util.FileLookup;
 import org.w3c.dom.Element;
 import org.w3c.dom.NodeList;
@@ -16,9 +18,12 @@
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
+import java.util.Collections;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
+import java.util.Set;
 
 /**
  * The default XML configuration parser
@@ -81,39 +86,57 @@
 
    public Configuration parseDefaultConfiguration() throws ConfigurationException {
       assertInitialized();
-//      Element defaultConfiguration = getSingleElementInCoreNS("default", rootElement);
-//      rootElementBuilder = new RootElementBuilder();
-//      rootElement = defaultConfiguration;
-//      return parseElementIgnoringRoot();
-      return null;
+      Element defaultElement = getSingleElementInCoreNS("default", rootElement);
+      defaultElement.normalize();
+      return parseConfiguration(defaultElement);
    }
 
    public Map<String, Configuration> parseNamedConfigurations() throws ConfigurationException {
       assertInitialized();
-//      Set<Element> elements = getAllElementsInCoreNS("namedCache", rootElement);
-//      if (elements.isEmpty()) return Collections.emptyMap();
-//      Map<String, Configuration> namedConfigurations = new HashMap<String, Configuration>(elements.size(), 1.0f);
-//      rootElementBuilder = new RootElementBuilder();
-//      for (Element e : elements) {
-//         String configurationName = getAttributeValue(e, "name");
-//         if (namedConfigurations.containsKey(configurationName))
-//            throw new ConfigurationException("Named cache " + configurationName + " contains duplicate entries!");
-//
-//         namedConfigurations.put(configurationName, parseElementIgnoringRoot());
-//      }
-//
-//      return namedConfigurations;
-      return null;
+      Set<Element> elements = getAllElementsInCoreNS("namedCache", rootElement);
+      if (elements.isEmpty()) return Collections.emptyMap();
+      Map<String, Configuration> namedConfigurations = new HashMap<String, Configuration>(elements.size(), 1.0f);
+      for (Element e : elements) {
+         String configurationName = getAttributeValue(e, "name");
+         if (namedConfigurations.containsKey(configurationName))
+            throw new DuplicateCacheNameException("Named cache " + configurationName + " is declared more than once!");
+         namedConfigurations.put(configurationName, parseConfiguration(e));
+      }
+
+      return namedConfigurations;
    }
 
    public GlobalConfiguration parseGlobalConfiguration() {
       assertInitialized();
       Element globalElement = getSingleElementInCoreNS("global", rootElement);
       globalElement.normalize();
+      GlobalConfiguration gc = new GlobalConfiguration();
 
-      return null;
+      configureAsyncListenerExecutor(getSingleElementInCoreNS("asyncListenerExecutor", globalElement), gc);
+      configureAsyncSerializationExecutor(getSingleElementInCoreNS("asyncSerializationExecutor", globalElement), gc);
+      configureEvictionScheduledExecutor(getSingleElementInCoreNS("evictionScheduledExecutor", globalElement), gc);
+      configureReplicationQueueScheduledExecutor(getSingleElementInCoreNS("replicationQueueScheduledExecutor", globalElement), gc);
+      configureTransport(getSingleElementInCoreNS("transport", globalElement), gc);
+      configureShutdown(getSingleElementInCoreNS("shutdown", globalElement), gc);
+      configureSerialization(getSingleElementInCoreNS("serialization", globalElement), gc);
+
+      return gc;
    }
 
+   private Configuration parseConfiguration(Element e) {
+      Configuration c = new Configuration();
+      configureLocking(getSingleElementInCoreNS("locking", e), c);
+      configureTransaction(getSingleElementInCoreNS("transaction", e), c);
+      configureJmxStatistics(getSingleElementInCoreNS("jmxStatistics", e), c);
+      configureInvocationBatching(getSingleElementInCoreNS("invocationBatching", e), c);
+      configureClustering(getSingleElementInCoreNS("clustering", e), c);
+      configureEviction(getSingleElementInCoreNS("eviction", e), c);
+      configureCacheLoaders(getSingleElementInCoreNS("loaders", e), c);
+      configureCustomInterceptors(getSingleElementInCoreNS("customInterceptors", e), c);
+
+      return c;
+   }
+
    private void assertInitialized() {
       if (!initialized)
          throw new ConfigurationException("Parser not initialized.  Please invoke initialize() first, or use a constructor that initializes the parser.");
@@ -192,35 +215,21 @@
    }
 
    void configureTransaction(Element element, Configuration config) {
-      if (element == null) return;
-      String attrName = "transactionManagerLookupClass";
-      String txMngLookupClass = getAttributeValue(element, attrName);
-      if (existsAttribute(txMngLookupClass)) config.setTransactionManagerLookupClass(txMngLookupClass);
-      String syncRollbackPhase = getAttributeValue(element, "syncRollbackPhase");
-      if (existsAttribute(syncRollbackPhase)) config.setSyncRollbackPhase(getBoolean(syncRollbackPhase));
-      String syncCommitPhase = getAttributeValue(element, "syncCommitPhase");
-      if (existsAttribute(syncCommitPhase)) config.setSyncCommitPhase(getBoolean(syncCommitPhase));
+      if (element != null) {
+         String tmp = getAttributeValue(element, "transactionManagerLookupClass");
+         if (existsAttribute(tmp)) {
+            config.setTransactionManagerLookupClass(tmp);
+         } else {
+            // use defaults since the transaction element is still present!
+            config.setTransactionManagerLookupClass(GenericTransactionManagerLookup.class.getName());
+         }
+         String syncRollbackPhase = getAttributeValue(element, "syncRollbackPhase");
+         if (existsAttribute(syncRollbackPhase)) config.setSyncRollbackPhase(getBoolean(syncRollbackPhase));
+         String syncCommitPhase = getAttributeValue(element, "syncCommitPhase");
+         if (existsAttribute(syncCommitPhase)) config.setSyncCommitPhase(getBoolean(syncCommitPhase));
+      }
    }
 
-   void configureSerialization(Element element, Configuration config) {
-      if (element == null) return;
-      String objectInputStreamPoolSize = getAttributeValue(element, "objectInputStreamPoolSize");
-//      if (existsAttribute(objectInputStreamPoolSize))
-//         config.setObjectInputStreamPoolSize(getInt(objectInputStreamPoolSize));
-      String objectOutputStreamPoolSize = getAttributeValue(element, "objectOutputStreamPoolSize");
-//      if (existsAttribute(objectOutputStreamPoolSize))
-//         config.setObjectOutputStreamPoolSize(getInt(objectOutputStreamPoolSize));
-      String version = getAttributeValue(element, "version");
-//      if (existsAttribute(version)) config.setReplVersionString(version);
-      String marshallerClass = getAttributeValue(element, "marshallerClass");
-//      if (existsAttribute(marshallerClass)) config.setMarshallerClass(marshallerClass);
-      String useLazyDeserialization = getAttributeValue(element, "useLazyDeserialization");
-      if (existsAttribute(useLazyDeserialization)) config.setUseLazyDeserialization(getBoolean(useLazyDeserialization));
-      String useRegionBasedMarshalling = getAttributeValue(element, "useRegionBasedMarshalling");
-//      if (existsAttribute(useRegionBasedMarshalling))
-//         config.setUseRegionBasedMarshalling(getBoolean(useRegionBasedMarshalling));
-   }
-
    void configureCustomInterceptors(Element element, Configuration config) {
       if (element == null) return; //this element might be missing
       CustomInterceptorsElementParser parser = new CustomInterceptorsElementParser();
@@ -228,21 +237,19 @@
       config.setCustomInterceptors(interceptorConfigList);
    }
 
-   void configureListeners(Element element, Configuration config) {
-      if (element == null) return; //this element is optional
-      String asyncPoolSizeStr = getAttributeValue(element, "asyncPoolSize");
-//      if (existsAttribute(asyncPoolSizeStr)) config.setListenerAsyncPoolSize(getInt(asyncPoolSizeStr));
+   void configureInvocationBatching(Element element, Configuration config) {
+      if (element != null) {
+         String enabled = getAttributeValue(element, "enabled");
+         if (existsAttribute(enabled)) {
+            config.setInvocationBatchingEnabled(getBoolean(enabled));
+         } else {
+            // enable this anyway since the XML element is present
+            config.setInvocationBatchingEnabled(true);
+         }
 
-      String asyncQueueSizeStr = getAttributeValue(element, "asyncQueueSize");
-//      if (existsAttribute(asyncQueueSizeStr)) config.setListenerAsyncQueueSize(getInt(asyncQueueSizeStr));
+      }
    }
 
-   void configureInvocationBatching(Element element, Configuration config) {
-      if (element == null) return; //this element is optional
-      boolean enabled = getBoolean(getAttributeValue(element, "enabled"));
-      config.setInvocationBatchingEnabled(enabled);
-   }
-
    void configureCacheLoaders(Element element, Configuration config) {
       if (element == null) return; //null cache loaders are allowed
       LoadersElementParser clElementParser = new LoadersElementParser();
@@ -257,9 +264,15 @@
    }
 
    void configureJmxStatistics(Element element, Configuration config) {
-      if (element == null) return; //might not be specified
-      String enabled = getAttributeValue(element, "enabled");
-      config.setExposeManagementStatistics(getBoolean(enabled));
+      if (element != null) {
+         String enabled = getAttributeValue(element, "enabled");
+         if (existsAttribute(enabled)) {
+            config.setExposeManagementStatistics(getBoolean(enabled));
+         } else {
+            // by default enable this since the element is present!
+            config.setExposeManagementStatistics(true);
+         }
+      }
    }
 
    void configureInvalidation(Element element, Configuration config) {
@@ -282,20 +295,14 @@
    }
 
    void configureAsyncMode(Element element, Configuration config) {
-      String useReplQueue = getAttributeValue(element, "useReplQueue");
-      if (existsAttribute(useReplQueue)) config.setUseReplQueue(getBoolean(useReplQueue));
-      String replQueueInterval = getAttributeValue(element, "replQueueInterval");
-      if (existsAttribute(replQueueInterval)) config.setReplQueueInterval(getLong(replQueueInterval));
-      String replQueueMaxElements = getAttributeValue(element, "replQueueMaxElements");
-
-      if (existsAttribute(replQueueMaxElements)) config.setReplQueueMaxElements(getInt(replQueueMaxElements));
-      String serializationExecutorPoolSize = getAttributeValue(element, "serializationExecutorPoolSize");
-//      if (existsAttribute(serializationExecutorPoolSize))
-//         config.setSerializationExecutorPoolSize(getInt(serializationExecutorPoolSize));
-
-      String serializationExecutorQueueSize = getAttributeValue(element, "serializationExecutorQueueSize");
-//      if (existsAttribute(serializationExecutorQueueSize))
-//         config.setSerializationExecutorQueueSize(getInt(serializationExecutorQueueSize));
+      String tmp = getAttributeValue(element, "useReplQueue");
+      if (existsAttribute(tmp)) config.setUseReplQueue(getBoolean(tmp));
+      tmp = getAttributeValue(element, "replQueueInterval");
+      if (existsAttribute(tmp)) config.setReplQueueInterval(getLong(tmp));
+      tmp = getAttributeValue(element, "replQueueMaxElements");
+      if (existsAttribute(tmp)) config.setReplQueueMaxElements(getInt(tmp));
+      tmp = getAttributeValue(element, "useAsyncSerialization");
+      if (existsAttribute(tmp)) config.setUseAsyncSerialization(getBoolean(tmp));
    }
 
    void configureLocking(Element element, Configuration config) {
@@ -323,29 +330,26 @@
       }
    }
 
-   void configureTransport(Element element, GlobalConfiguration config) {
-//      if (element == null) return; //transport might be missing
-//
-//      // first see if a configFile is provided
-//      String cfgFile = getAttributeValue(element, "configFile");
-//      if (existsAttribute(cfgFile)) {
-//         // try and load this file
-//         URL u = new FileLookup().lookupFileLocation(cfgFile);
-//         config.setJgroupsConfigFile(u);
-//      } else {
-//         String multiplexerStack = getAttributeValue(element, "multiplexerStack");
-//         if (existsAttribute(multiplexerStack)) {
-//            config.setMultiplexerStack(multiplexerStack);
-//         } else {
-//            JGroupsStackParser stackParser = new JGroupsStackParser();
-//            String clusterConfigStr = stackParser.parseClusterConfigXml(element);
-//            if (clusterConfigStr != null && clusterConfigStr.trim().length() > 0)
-//               config.setClusterConfig(clusterConfigStr);
-//         }
-//      }
+   void configureTransport(Element e, GlobalConfiguration gc) {
+      // if the element does NOT exist then don't use a transport class at all!
+      if (e != null) {
+         String tmp = getAttributeValue(e, "transportClass");
+         if (existsAttribute(tmp)) {
+            gc.setTransportClass(tmp);
+         } else {
+            // the class is not specified; use the default
+            gc.setTransportClass(GlobalConfiguration.getClusteredDefault().getTransportClass());
+         }
+
+         tmp = getAttributeValue(e, "clusterName");
+         if (existsAttribute(tmp)) gc.setClusterName(tmp);
+
+         Properties p = XmlConfigHelper.extractProperties(e);
+         if (p != null) gc.setTransportProperties(p);
+      }
    }
 
-   void configureMarshalling(Element e, GlobalConfiguration configuration) {
+   void configureSerialization(Element e, GlobalConfiguration configuration) {
       if (e != null) {
          String tmp = getAttributeValue(e, "marshallerClass");
          if (existsAttribute(tmp)) configuration.setMarshallerClass(tmp);

Modified: core/branches/flat/src/main/java/org/horizon/config/parsing/XmlParserBase.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/config/parsing/XmlParserBase.java	2009-01-26 16:56:02 UTC (rev 7597)
+++ core/branches/flat/src/main/java/org/horizon/config/parsing/XmlParserBase.java	2009-01-27 01:51:15 UTC (rev 7598)
@@ -71,7 +71,11 @@
     */
    protected Element getSingleElement(String namespace, String elementName, Element parent) {
       NodeList nodeList = parent.getElementsByTagNameNS(namespace, elementName);
-      if (nodeList.getLength() == 0) return null;
+      if (nodeList.getLength() == 0) {
+         // Try outside the core NS
+         nodeList = parent.getElementsByTagName(elementName);
+         if (nodeList.getLength() == 0) return null;
+      }
       return (Element) nodeList.item(0);
    }
 

Modified: core/branches/flat/src/main/java/org/horizon/config/parsing/element/LoadersElementParser.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/config/parsing/element/LoadersElementParser.java	2009-01-26 16:56:02 UTC (rev 7597)
+++ core/branches/flat/src/main/java/org/horizon/config/parsing/element/LoadersElementParser.java	2009-01-27 01:51:15 UTC (rev 7598)
@@ -47,8 +47,8 @@
       if (existsAttribute(passivation)) cacheLoaderConfig.setPassivation(getBoolean(passivation));
       String shared = getAttributeValue(element, "shared");
       if (existsAttribute(shared)) cacheLoaderConfig.setShared(getBoolean(shared));
-      String preload = getPreloadString(getSingleElementInCoreNS("preload", element));
-      if (preload != null) cacheLoaderConfig.setPreload(preload);
+      boolean preload = getBoolean(getAttributeValue(element, "preload"));
+      cacheLoaderConfig.setPreload(preload);
 
       NodeList cacheLoaderNodes = element.getElementsByTagName("loader");
       for (int i = 0; i < cacheLoaderNodes.getLength(); i++) {
@@ -82,25 +82,6 @@
       return iclc;
    }
 
-   private String getPreloadString(Element preloadElement) {
-      if (preloadElement == null) return null; //might be no preload
-      NodeList nodesToPreload = preloadElement.getElementsByTagName("node");
-      StringBuilder result = new StringBuilder();
-      for (int i = 0; i < nodesToPreload.getLength(); i++) {
-         Element node = (Element) nodesToPreload.item(i);
-         String fqn2preload = getAttributeValue(node, "fqn");
-         if (!existsAttribute(fqn2preload))
-            throw new ConfigurationException("Missing 'fqn' attribute in 'preload' element");
-         if (i > 0) result.append(",");
-         result.append(fqn2preload);
-      }
-      //no elements defined for preload so by default load the root
-      if (nodesToPreload.getLength() == 0) {
-         result.append("/");
-      }
-      return result.toString();
-   }
-
    public CacheLoaderConfig.IndividualCacheLoaderConfig.SingletonStoreConfig parseSingletonStoreConfig(Element element) {
       if (element == null) return null; //might happen, this config option is not mandatory
       boolean singletonStoreEnabled = getBoolean(getAttributeValue(element, "enabled"));
@@ -110,7 +91,7 @@
       Properties singletonStoreproperties = XmlConfigHelper.readPropertiesContents(element, "properties");
       ssc.setSingletonStoreEnabled(singletonStoreEnabled);
       ssc.setSingletonStoreClass(singletonStoreClass);
-      ssc.setSingletonStoreproperties(singletonStoreproperties);
+      ssc.setSingletonStoreProperties(singletonStoreproperties);
       return ssc;
    }
 }

Modified: core/branches/flat/src/main/java/org/horizon/loader/CacheLoaderManager.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/loader/CacheLoaderManager.java	2009-01-26 16:56:02 UTC (rev 7597)
+++ core/branches/flat/src/main/java/org/horizon/loader/CacheLoaderManager.java	2009-01-27 01:51:15 UTC (rev 7598)
@@ -38,7 +38,6 @@
 
 import java.util.ArrayList;
 import java.util.Iterator;
-import java.util.StringTokenizer;
 
 /**
  * Manages all cache loader functionality.  This class is typically initialised with an XML DOM Element, represeting a
@@ -253,42 +252,22 @@
    @Start(priority = 50)
    public void preloadCache() throws CacheException {
       if (loader != null) {
-         if (config.getPreload() == null || config.getPreload().equals("")) return;
-         if (log.isDebugEnabled()) log.debug("preloading transient state from cache loader " + loader);
-         StringTokenizer st = new StringTokenizer(config.getPreload(), ",");
-         long start, stop, total;
-         start = System.currentTimeMillis();
-         while (st.hasMoreTokens()) {
-            String tok = st.nextToken().trim();
-            if (log.isTraceEnabled()) log.trace("preloading " + tok);
-            preload(tok);
+         if (config.isPreload()) {
+            if (log.isDebugEnabled()) log.debug("preloading transient state from cache loader {0}", loader);
+            long start, stop, total;
+            start = System.currentTimeMillis();
+            // TODO: Call preload on the cache loader interface
+            if (true) throw new RuntimeException("implement me");
+            stop = System.currentTimeMillis();
+            total = stop - start;
+            if (log.isDebugEnabled()) {
+               log.debug("preloading transient state from cache loader was successful (in " + total + " milliseconds)");
+            }
          }
-
-         stop = System.currentTimeMillis();
-         total = stop - start;
-         if (log.isDebugEnabled()) {
-            log.debug("preloading transient state from cache loader was successful (in " + total + " milliseconds)");
-         }
       }
    }
 
    /**
-    * Preloads a specific Fqn into the cache from the configured cacheloader
-    *
-    * @param fqn             fqn to preload
-    * @param preloadParents  whether we preload parents
-    * @param preloadChildren whether we preload children
-    * @throws CacheException if we are unable to preload
-    */
-   public void preload(String key) throws CacheException {
-
-      cache.getInvocationContext().getOptionOverrides().setSkipCacheStatusCheck(true);
-      // 1. Load the attributes first
-      //  but this will go down the entire damn chain!!  :S
-      cache.get(key);
-   }
-
-   /**
     * Returns the configuration element of the cache loaders
     */
    public CacheLoaderConfig getCacheLoaderConfig() {

Modified: core/branches/flat/src/main/java/org/horizon/loader/SingletonStoreDefaultConfig.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/loader/SingletonStoreDefaultConfig.java	2009-01-26 16:56:02 UTC (rev 7597)
+++ core/branches/flat/src/main/java/org/horizon/loader/SingletonStoreDefaultConfig.java	2009-01-27 01:51:15 UTC (rev 7598)
@@ -73,7 +73,7 @@
     */
    public SingletonStoreDefaultConfig(SingletonStoreConfig base) {
       this();
-      setSingletonStoreproperties(base.getSingletonStoreproperties());
+      setSingletonStoreProperties(base.getSingletonStoreProperties());
    }
 
    @Override
@@ -103,8 +103,8 @@
     * @param props is an instance of Properties containing these values.
     */
    @Override
-   public void setSingletonStoreproperties(Properties props) {
-      super.setSingletonStoreproperties(props);
+   public void setSingletonStoreProperties(Properties props) {
+      super.setSingletonStoreProperties(props);
       String pushStateWhenCoordinatorStr = props.getProperty("pushStateWhenCoordinator");
       if (pushStateWhenCoordinatorStr != null) {
          /* if not null, we use the defined value, otherwise we leave it to the default value, true */

Modified: core/branches/flat/src/main/resources/config-samples/all.xml
===================================================================
--- core/branches/flat/src/main/resources/config-samples/all.xml	2009-01-26 16:56:02 UTC (rev 7597)
+++ core/branches/flat/src/main/resources/config-samples/all.xml	2009-01-27 01:51:15 UTC (rev 7598)
@@ -10,21 +10,21 @@
 
       <!-- Note that if these are left blank, defaults are used.  See the user guide for what these defaults are -->
       <asyncListenerExecutor factory="org.horizon.executors.DefaultExecutorFactory">
-         <property name="maxThreads">5</property>
-         <property name="threadNamePrefix">AsyncListenerThread</property>
+         <property name="maxThreads" value="5"/>
+         <property name="threadNamePrefix" value="AsyncListenerThread"/>
       </asyncListenerExecutor>
 
       <asyncSerializationExecutor factory="org.horizon.executors.DefaultExecutorFactory">
-         <property name="maxThreads">25</property>
-         <property name="threadNamePrefix">AsyncSerializationThread</property>
+         <property name="maxThreads" value="25"/>
+         <property name="threadNamePrefix" value="AsyncSerializationThread"/>
       </asyncSerializationExecutor>
 
       <evictionScheduledExecutor factory="org.horizon.executors.DefaultScheduledExecutorFactory">
-         <property name="threadNamePrefix">EvictionThread</property>
+         <property name="threadNamePrefix" value="EvictionThread"/>
       </evictionScheduledExecutor>
 
       <replicationQueueScheduledExecutor factory="org.horizon.executors.DefaultScheduledExecutorFactory">
-         <property name="threadNamePrefix">ReplicationQueueThread</property>
+         <property name="threadNamePrefix" value="ReplicationQueueThread"/>
       </replicationQueueScheduledExecutor>
 
 
@@ -33,14 +33,14 @@
          There is no added cost to defining a transport but not creating a cache that uses one, since the transport
          is created and initialized lazily.
       -->
-      <transport transportClass="org.horizon.remoting.transport.jgroups.JGroupsTransport">
+      <transport transportClass="org.horizon.remoting.transport.jgroups.JGroupsTransport" clusterName="horizon-cluster">
          <!-- Note that the JGroups transport uses sensible defaults if no configuration property is defined. -->
-         <property name="configurationFile">udp.xml</property>
+         <property name="configurationFile" value="udp.xml"/>
          <!-- See the JGroupsTransport javadocs for more options -->
       </transport>
 
       <!-- Again, sensible defaults are used here if this is omitted.  -->
-      <serialization marshallerClass="org.horizon.marshall.HorizonMarshaller" version="1.0"
+      <serialization marshallerClass="org.horizon.marshall.VersionAwareMarshaller" version="1.0"
                      objectInputStreamPoolSize="100" objectOutputStreamPoolSize="100"/>
 
       <!--
@@ -86,7 +86,7 @@
          This element specifies that the cache is clustered.
          modes supported: replication (r) or invalidation (i).
       -->
-      <clustering mode="replication" clusterName="JBossCache-cluster">
+      <clustering mode="replication">
 
          <!--
             Defines whether to retrieve state on startup

Modified: core/branches/flat/src/main/resources/schema/horizon-config-1.0.xsd
===================================================================
--- core/branches/flat/src/main/resources/schema/horizon-config-1.0.xsd	2009-01-26 16:56:02 UTC (rev 7597)
+++ core/branches/flat/src/main/resources/schema/horizon-config-1.0.xsd	2009-01-27 01:51:15 UTC (rev 7598)
@@ -70,7 +70,6 @@
             </xs:restriction>
          </xs:simpleType>
       </xs:attribute>
-      <xs:attribute name="clusterName" type="xs:string"/>
    </xs:complexType>
 
    <xs:complexType name="lockingType">
@@ -138,6 +137,7 @@
          <xs:element name="property" minOccurs="0" maxOccurs="unbounded" type="tns:propertyType"/>
       </xs:sequence>
       <xs:attribute name="transportClass" type="xs:string"/>
+      <xs:attribute name="clusterName" type="xs:string"/>
    </xs:complexType>
 
    <xs:complexType name="syncType">
@@ -216,12 +216,8 @@
    </xs:complexType>
 
    <xs:complexType name="propertyType">
-      <xs:simpleContent>
-         <xs:extension base="xs:string">
-            <xs:attribute name="name" type="xs:string"/>
-            <xs:attribute name="value" type="xs:string"/>
-         </xs:extension>
-      </xs:simpleContent>
+      <xs:attribute name="name" type="xs:string"/>
+      <xs:attribute name="value" type="xs:string"/>
    </xs:complexType>
 </xs:schema>
 

Added: core/branches/flat/src/test/java/org/horizon/config/parsing/ConfigurationParserTest.java
===================================================================
--- core/branches/flat/src/test/java/org/horizon/config/parsing/ConfigurationParserTest.java	                        (rev 0)
+++ core/branches/flat/src/test/java/org/horizon/config/parsing/ConfigurationParserTest.java	2009-01-27 01:51:15 UTC (rev 7598)
@@ -0,0 +1,239 @@
+package org.horizon.config.parsing;
+
+import org.horizon.config.CacheLoaderConfig;
+import org.horizon.config.Configuration;
+import org.horizon.lock.IsolationLevel;
+import org.horizon.transaction.GenericTransactionManagerLookup;
+import org.testng.annotations.Test;
+import org.w3c.dom.Element;
+
+ at Test(groups = "unit")
+public class ConfigurationParserTest {
+
+   public void testLocking() throws Exception {
+      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
+      String xml = "<locking\n" +
+            "            isolationLevel=\"REPEATABLE_READ\"\n" +
+            "            lockAcquisitionTimeout=\"200000\"\n" +
+            "            writeSkewCheck=\"true\"\n" +
+            "            concurrencyLevel=\"5\"/>";
+      Element e = XmlConfigHelper.stringToElement(xml);
+
+      Configuration c = new Configuration();
+      parser.configureLocking(e, c);
+
+      assert c.getIsolationLevel() == IsolationLevel.REPEATABLE_READ;
+      assert c.getLockAcquisitionTimeout() == 200000;
+      assert c.isWriteSkewCheck();
+      assert c.getConcurrencyLevel() == 5;
+   }
+
+   public void testTransactions() throws Exception {
+      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
+      String xml = "<transaction\n" +
+            "            transactionManagerLookupClass=\"org.blah.Blah\"\n" +
+            "            syncRollbackPhase=\"true\"\n" +
+            "            syncCommitPhase=\"true\"/>";
+      Element e = XmlConfigHelper.stringToElement(xml);
+
+      Configuration c = new Configuration();
+      parser.configureTransaction(e, c);
+
+      assert c.getTransactionManagerLookupClass().equals("org.blah.Blah");
+      assert c.isSyncCommitPhase();
+      assert c.isSyncRollbackPhase();
+   }
+
+   public void testTransactionsDefaults() throws Exception {
+      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
+      String xml = "<transaction />";
+      Element e = XmlConfigHelper.stringToElement(xml);
+
+      Configuration c = new Configuration();
+      parser.configureTransaction(e, c);
+
+      assert c.getTransactionManagerLookupClass().equals(GenericTransactionManagerLookup.class.getName());
+      assert !c.isSyncCommitPhase();
+      assert !c.isSyncRollbackPhase();
+   }
+
+   public void testJmxStatistics() throws Exception {
+      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
+      String xml = "<jmxStatistics enabled=\"true\"/>";
+      Element e = XmlConfigHelper.stringToElement(xml);
+
+      Configuration c = new Configuration();
+      parser.configureJmxStatistics(e, c);
+
+      assert c.isExposeManagementStatistics();
+   }
+
+   public void testJmxStatisticsDefaults() throws Exception {
+      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
+      String xml = "<jmxStatistics />";
+      Element e = XmlConfigHelper.stringToElement(xml);
+
+      Configuration c = new Configuration();
+      parser.configureJmxStatistics(e, c);
+
+      assert c.isExposeManagementStatistics();
+   }
+
+   public void testInvocationBatching() throws Exception {
+      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
+      String xml = "<invocationBatching enabled=\"true\"/>";
+      Element e = XmlConfigHelper.stringToElement(xml);
+
+      Configuration c = new Configuration();
+      parser.configureInvocationBatching(e, c);
+
+      assert c.isInvocationBatchingEnabled();
+   }
+
+   public void testInvocationBatchingDefaults() throws Exception {
+      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
+      String xml = "<invocationBatching />";
+      Element e = XmlConfigHelper.stringToElement(xml);
+
+      Configuration c = new Configuration();
+      parser.configureInvocationBatching(e, c);
+
+      assert c.isInvocationBatchingEnabled();
+   }
+
+   public void testClustering() throws Exception {
+      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
+      String xml = "<clustering mode=\"invalidation\">\n" +
+            "         <stateRetrieval timeout=\"20000\" fetchInMemoryState=\"false\"/>\n" +
+            "         <async useReplQueue=\"true\" replQueueInterval=\"10000\" replQueueMaxElements=\"500\"/>\n" +
+            "      </clustering>";
+      Element e = XmlConfigHelper.stringToElement(xml);
+
+      Configuration c = new Configuration();
+      parser.configureClustering(e, c);
+
+      assert c.getCacheMode() == Configuration.CacheMode.INVALIDATION_ASYNC;
+      assert c.getStateRetrievalTimeout() == 20000;
+      assert !c.isFetchInMemoryState();
+      assert c.isUseReplQueue();
+      assert c.getReplQueueInterval() == 10000;
+      assert c.getReplQueueMaxElements() == 500;
+   }
+
+   public void testClusteringDefaults() throws Exception {
+      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
+      String xml = "<clustering />";
+      Element e = XmlConfigHelper.stringToElement(xml);
+
+      Configuration c = new Configuration();
+      parser.configureClustering(e, c);
+
+      assert c.getCacheMode() == Configuration.CacheMode.REPL_SYNC;
+      assert c.getStateRetrievalTimeout() == 10000;
+      assert c.isFetchInMemoryState();
+      assert !c.isUseReplQueue();
+   }
+
+   /*
+
+   <loaders passivation="true" shared="true" preload="true">
+         <loader class="org.horizon.loader.JDBCCacheLoader" async="true" fetchPersistentState="true"
+                 ignoreModifications="false" purgeOnStartup="false">
+            <properties>
+               horizon.jdbc.datasource=HorizonDS
+               horizon.jdbc.table.name=horizon
+               horizon.jdbc.table.create=true
+               horizon.jdbc.table.drop=false
+            </properties>
+            <singletonStore enabled="true" class="org.horizon.loader.SingletonStoreCacheLoader">
+               <properties>
+                  horizon.singletonStore.pushStateWhenCoordinator=true
+                  horizon.singletonStore.pushStateWhenCoordinatorTimeout=20000
+               </properties>
+            </singletonStore>
+         </loader>
+      </loaders>
+
+    */
+
+   public void testCacheLoaders() throws Exception {
+      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
+      String xml = "<loaders passivation=\"true\" shared=\"true\" preload=\"true\">\n" +
+            "         <loader class=\"org.horizon.loader.JDBCCacheLoader\" async=\"true\" fetchPersistentState=\"true\"\n" +
+            "                 ignoreModifications=\"false\" purgeOnStartup=\"false\">\n" +
+            "            <properties>\n" +
+            "               horizon.jdbc.datasource=HorizonDS\n" +
+            "               horizon.jdbc.table.name=horizon\n" +
+            "               horizon.jdbc.table.create=true\n" +
+            "               horizon.jdbc.table.drop=false\n" +
+            "            </properties>\n" +
+            "            <singletonStore enabled=\"true\" class=\"com.blah.Blah\">\n" +
+            "               <properties>\n" +
+            "                  horizon.singletonStore.pushStateWhenCoordinator=true\n" +
+            "                  horizon.singletonStore.pushStateWhenCoordinatorTimeout=20000\n" +
+            "               </properties>\n" +
+            "            </singletonStore>\n" +
+            "         </loader>\n" +
+            "      </loaders>";
+      Element e = XmlConfigHelper.stringToElement(xml);
+
+      Configuration c = new Configuration();
+      parser.configureCacheLoaders(e, c);
+
+      CacheLoaderConfig clc = c.getCacheLoaderConfig();
+      assert clc != null;
+      assert clc.isFetchPersistentState();
+      assert clc.isPassivation();
+      assert clc.isShared();
+      assert clc.isPreload();
+
+      CacheLoaderConfig.IndividualCacheLoaderConfig iclc = clc.getFirstCacheLoaderConfig();
+      assert iclc.getClassName().equals("org.horizon.loader.JDBCCacheLoader");
+      assert iclc.isAsync();
+      assert iclc.isFetchPersistentState();
+      assert !iclc.isIgnoreModifications();
+      assert !iclc.isPurgeOnStartup();
+
+      CacheLoaderConfig.IndividualCacheLoaderConfig.SingletonStoreConfig ssc = iclc.getSingletonStoreConfig();
+      assert ssc.isSingletonStoreEnabled();
+      assert ssc.getClassName().equals("com.blah.Blah");
+      assert ssc.getSingletonStoreProperties().size() == 2;
+   }
+
+   public void testCacheLoadersDefaults() throws Exception {
+      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
+      String xml = "<loaders>\n" +
+            "         <loader class=\"org.horizon.loader.JDBCCacheLoader\">\n" +
+            "            <properties />\n" +
+            "            <singletonStore enabled=\"true\" />\n" +
+            "         </loader>\n" +
+            "      </loaders>";
+      Element e = XmlConfigHelper.stringToElement(xml);
+
+      Configuration c = new Configuration();
+      parser.configureCacheLoaders(e, c);
+
+      CacheLoaderConfig clc = c.getCacheLoaderConfig();
+      assert clc != null;
+      assert !clc.isFetchPersistentState();
+      assert !clc.isPassivation();
+      assert !clc.isShared();
+      assert !clc.isPreload();
+
+      CacheLoaderConfig.IndividualCacheLoaderConfig iclc = clc.getFirstCacheLoaderConfig();
+      assert iclc.getClassName().equals("org.horizon.loader.JDBCCacheLoader");
+      assert !iclc.isAsync();
+      assert !iclc.isFetchPersistentState();
+      assert !iclc.isIgnoreModifications();
+      assert !iclc.isPurgeOnStartup();
+
+      CacheLoaderConfig.IndividualCacheLoaderConfig.SingletonStoreConfig ssc = iclc.getSingletonStoreConfig();
+      assert ssc.isSingletonStoreEnabled();
+      assert ssc.getClassName().equals("org.horizon.loader.SingletonStoreCacheLoader");
+      assert ssc.getSingletonStoreProperties().isEmpty();
+   }
+
+   public void testEviction() throws Exception {
+      assert false : "Implement me once the eviction config beans have been fixed!";
+   }
+}

Copied: core/branches/flat/src/test/java/org/horizon/config/parsing/GlobalConfigurationParserTest.java (from rev 7597, core/branches/flat/src/main/java/org/horizon/config/parsing/GlobalConfigurationParserTest.java)
===================================================================
--- core/branches/flat/src/test/java/org/horizon/config/parsing/GlobalConfigurationParserTest.java	                        (rev 0)
+++ core/branches/flat/src/test/java/org/horizon/config/parsing/GlobalConfigurationParserTest.java	2009-01-27 01:51:15 UTC (rev 7598)
@@ -0,0 +1,200 @@
+package org.horizon.config.parsing;
+
+import org.horizon.config.GlobalConfiguration;
+import org.horizon.executors.DefaultExecutorFactory;
+import org.horizon.executors.DefaultScheduledExecutorFactory;
+import org.horizon.marshall.HorizonMarshaller;
+import org.horizon.marshall.VersionAwareMarshaller;
+import org.horizon.remoting.transport.jgroups.JGroupsTransport;
+import org.testng.annotations.Test;
+import org.w3c.dom.Element;
+
+
+ at Test(groups = "unit")
+public class GlobalConfigurationParserTest {
+
+   public void testTransport() throws Exception {
+      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
+      String transportClass = "org.blah.Blah";
+      String xml = "<transport transportClass=\"" + transportClass + "\"><property name=\"something\" value=\"value\"/></transport>";
+      Element e = XmlConfigHelper.stringToElement(xml);
+
+      GlobalConfiguration gc = new GlobalConfiguration();
+      parser.configureTransport(e, gc);
+
+      assert gc.getTransportClass().equals(transportClass);
+      assert gc.getTransportProperties().size() == 1;
+      assert gc.getTransportProperties().getProperty("something").equals("value");
+   }
+
+   public void testDefaultTransport() throws Exception {
+      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
+      String xml = "<transport />";
+      Element e = XmlConfigHelper.stringToElement(xml);
+
+      GlobalConfiguration gc = new GlobalConfiguration();
+      parser.configureTransport(e, gc);
+
+      assert gc.getTransportClass().equals(JGroupsTransport.class.getName());
+      assert gc.getTransportProperties().size() == 0;
+   }
+
+   public void testShutdown() throws Exception {
+      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
+      String xml = "<shutdown hookBehavior=\"REGISTER\" />";
+      Element e = XmlConfigHelper.stringToElement(xml);
+
+      GlobalConfiguration gc = new GlobalConfiguration();
+      parser.configureShutdown(e, gc);
+
+      assert gc.getShutdownHookBehavior() == GlobalConfiguration.ShutdownHookBehavior.REGISTER;
+   }
+
+   public void testDefaultShutdown() throws Exception {
+      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
+      String xml = "<shutdown />";
+      Element e = XmlConfigHelper.stringToElement(xml);
+
+      GlobalConfiguration gc = new GlobalConfiguration();
+      parser.configureShutdown(e, gc);
+
+      assert gc.getShutdownHookBehavior() == GlobalConfiguration.ShutdownHookBehavior.DEFAULT;
+   }
+
+   public void testMarshalling() throws Exception {
+      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
+      String xml = "<serialization marshallerClass=\"org.horizon.marshall.HorizonMarshaller\" version=\"9.2\"\n" +
+            "                     objectInputStreamPoolSize=\"100\" objectOutputStreamPoolSize=\"100\"/>";
+      Element e = XmlConfigHelper.stringToElement(xml);
+
+      GlobalConfiguration gc = new GlobalConfiguration();
+      parser.configureSerialization(e, gc);
+
+      assert gc.getMarshallerClass().equals(HorizonMarshaller.class.getName());
+      assert gc.getMarshallVersionString().equals("9.2");
+      assert gc.getObjectInputStreamPoolSize() == 100;
+      assert gc.getObjectOutputStreamPoolSize() == 100;
+   }
+
+   public void testMarshallingDefaults() throws Exception {
+      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
+      String xml = "<serialization />";
+      Element e = XmlConfigHelper.stringToElement(xml);
+
+      GlobalConfiguration gc = new GlobalConfiguration();
+      parser.configureSerialization(e, gc);
+
+      assert gc.getMarshallerClass().equals(VersionAwareMarshaller.class.getName());
+      assert gc.getMarshallVersionString().equals("1.0");
+      assert gc.getObjectInputStreamPoolSize() == 50;
+      assert gc.getObjectOutputStreamPoolSize() == 50;
+   }
+
+   public void testAsyncListenerExecutor() throws Exception {
+      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
+      String xml = "<asyncListenerExecutor factory=\"com.mycompany.Factory\">\n" +
+            "         <property name=\"maxThreads\" value=\"5\" />" +
+            "      </asyncListenerExecutor>";
+      Element e = XmlConfigHelper.stringToElement(xml);
+
+      GlobalConfiguration gc = new GlobalConfiguration();
+      parser.configureAsyncListenerExecutor(e, gc);
+
+      assert gc.getAsyncListenerExecutorFactoryClass().equals("com.mycompany.Factory");
+      assert gc.getAsyncListenerExecutorProperties().size() == 1;
+      assert gc.getAsyncListenerExecutorProperties().get("maxThreads").equals("5");
+   }
+
+   public void testAsyncSerializationExecutor() throws Exception {
+      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
+      String xml = "<asyncSerializationExecutor factory=\"com.mycompany.Factory\">\n" +
+            "         <property name=\"maxThreads\" value=\"5\" />" +
+            "      </asyncSerializationExecutor>";
+      Element e = XmlConfigHelper.stringToElement(xml);
+
+      GlobalConfiguration gc = new GlobalConfiguration();
+      parser.configureAsyncSerializationExecutor(e, gc);
+
+      assert gc.getAsyncSerializationExecutorFactoryClass().equals("com.mycompany.Factory");
+      assert gc.getAsyncSerializationExecutorProperties().size() == 1;
+      assert gc.getAsyncSerializationExecutorProperties().get("maxThreads").equals("5");
+   }
+
+   public void testEvictionScheduledExecutor() throws Exception {
+      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
+      String xml = "<evictionScheduledExecutor factory=\"com.mycompany.Factory\">\n" +
+            "         <property name=\"maxThreads\" value=\"5\" />" +
+            "      </evictionScheduledExecutor>";
+      Element e = XmlConfigHelper.stringToElement(xml);
+
+      GlobalConfiguration gc = new GlobalConfiguration();
+      parser.configureEvictionScheduledExecutor(e, gc);
+
+      assert gc.getEvictionScheduledExecutorFactoryClass().equals("com.mycompany.Factory");
+      assert gc.getEvictionScheduledExecutorProperties().size() == 1;
+      assert gc.getEvictionScheduledExecutorProperties().get("maxThreads").equals("5");
+   }
+
+   public void testReplicationQueueScheduledExecutor() throws Exception {
+      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
+      String xml = "<replicationQueueScheduledExecutor factory=\"com.mycompany.Factory\">\n" +
+            "         <property name=\"maxThreads\" value=\"5\" />" +
+            "      </replicationQueueScheduledExecutor>";
+      Element e = XmlConfigHelper.stringToElement(xml);
+
+      GlobalConfiguration gc = new GlobalConfiguration();
+      parser.configureReplicationQueueScheduledExecutor(e, gc);
+
+      assert gc.getReplicationQueueScheduledExecutorFactoryClass().equals("com.mycompany.Factory");
+      assert gc.getReplicationQueueScheduledExecutorProperties().size() == 1;
+      assert gc.getReplicationQueueScheduledExecutorProperties().get("maxThreads").equals("5");
+   }
+
+   public void testAsyncListenerExecutorDefaults() throws Exception {
+      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
+      String xml = "<asyncListenerExecutor />";
+      Element e = XmlConfigHelper.stringToElement(xml);
+
+      GlobalConfiguration gc = new GlobalConfiguration();
+      parser.configureAsyncListenerExecutor(e, gc);
+
+      assert gc.getAsyncListenerExecutorFactoryClass().equals(DefaultExecutorFactory.class.getName());
+      assert gc.getAsyncListenerExecutorProperties().size() == 0;
+   }
+
+   public void testAsyncSerializationExecutorDefaults() throws Exception {
+      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
+      String xml = "<asyncSerializationExecutor />";
+      Element e = XmlConfigHelper.stringToElement(xml);
+
+      GlobalConfiguration gc = new GlobalConfiguration();
+      parser.configureAsyncSerializationExecutor(e, gc);
+
+      assert gc.getAsyncSerializationExecutorFactoryClass().equals(DefaultExecutorFactory.class.getName());
+      assert gc.getAsyncSerializationExecutorProperties().size() == 0;
+   }
+
+   public void testEvictionScheduledExecutorDefaults() throws Exception {
+      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
+      String xml = "<evictionScheduledExecutor />";
+      Element e = XmlConfigHelper.stringToElement(xml);
+
+      GlobalConfiguration gc = new GlobalConfiguration();
+      parser.configureEvictionScheduledExecutor(e, gc);
+
+      assert gc.getEvictionScheduledExecutorFactoryClass().equals(DefaultScheduledExecutorFactory.class.getName());
+      assert gc.getEvictionScheduledExecutorProperties().size() == 0;
+   }
+
+   public void testReplicationQueueScheduledExecutorDefaults() throws Exception {
+      XmlConfigurationParserImpl parser = new XmlConfigurationParserImpl();
+      String xml = "<replicationQueueScheduledExecutor />";
+      Element e = XmlConfigHelper.stringToElement(xml);
+
+      GlobalConfiguration gc = new GlobalConfiguration();
+      parser.configureReplicationQueueScheduledExecutor(e, gc);
+
+      assert gc.getReplicationQueueScheduledExecutorFactoryClass().equals(DefaultScheduledExecutorFactory.class.getName());
+      assert gc.getReplicationQueueScheduledExecutorProperties().size() == 0;
+   }
+}

Added: core/branches/flat/src/test/java/org/horizon/config/parsing/XmlFileParsingTest.java
===================================================================
--- core/branches/flat/src/test/java/org/horizon/config/parsing/XmlFileParsingTest.java	                        (rev 0)
+++ core/branches/flat/src/test/java/org/horizon/config/parsing/XmlFileParsingTest.java	2009-01-27 01:51:15 UTC (rev 7598)
@@ -0,0 +1,83 @@
+package org.horizon.config.parsing;
+
+import org.horizon.config.Configuration;
+import org.horizon.config.GlobalConfiguration;
+import org.testng.annotations.Test;
+
+import java.io.IOException;
+import java.util.Map;
+
+ at Test(groups = "unit")
+public class XmlFileParsingTest {
+   public void testNamedCacheFile() throws IOException {
+      XmlConfigurationParser parser = new XmlConfigurationParserImpl("configs/named-cache-test.xml");
+
+      GlobalConfiguration gc = parser.parseGlobalConfiguration();
+
+      assert gc.getAsyncListenerExecutorFactoryClass().equals("org.horizon.executors.DefaultExecutorFactory");
+      assert gc.getAsyncListenerExecutorProperties().getProperty("maxThreads").equals("5");
+      assert gc.getAsyncListenerExecutorProperties().getProperty("threadNamePrefix").equals("AsyncListenerThread");
+
+      assert gc.getAsyncSerializationExecutorFactoryClass().equals("org.horizon.executors.DefaultExecutorFactory");
+      assert gc.getAsyncSerializationExecutorProperties().getProperty("maxThreads").equals("25");
+      assert gc.getAsyncSerializationExecutorProperties().getProperty("threadNamePrefix").equals("AsyncSerializationThread");
+
+      assert gc.getEvictionScheduledExecutorFactoryClass().equals("org.horizon.executors.DefaultScheduledExecutorFactory");
+      assert gc.getEvictionScheduledExecutorProperties().getProperty("threadNamePrefix").equals("EvictionThread");
+
+      assert gc.getReplicationQueueScheduledExecutorFactoryClass().equals("org.horizon.executors.DefaultScheduledExecutorFactory");
+      assert gc.getReplicationQueueScheduledExecutorProperties().getProperty("threadNamePrefix").equals("ReplicationQueueThread");
+
+      assert gc.getTransportClass().equals("org.horizon.remoting.transport.jgroups.JGroupsTransport");
+      assert gc.getTransportProperties().isEmpty();
+
+      assert gc.getMarshallerClass().equals("org.horizon.marshall.VersionAwareMarshaller");
+      assert gc.getMarshallVersionString().equals("1.0");
+      assert gc.getObjectOutputStreamPoolSize() == 100;
+      assert gc.getObjectInputStreamPoolSize() == 100;
+
+      Configuration defaultConfiguration = parser.parseDefaultConfiguration();
+
+      assert defaultConfiguration.getLockAcquisitionTimeout() == 1000;
+      assert defaultConfiguration.getConcurrencyLevel() == 100;
+
+      Map<String, Configuration> namedCaches = parser.parseNamedConfigurations();
+
+      Configuration c = namedCaches.get("transactional");
+
+      assert c.getTransactionManagerLookupClass().equals("org.horizon.transaction.GenericTransactionManagerLookup");
+
+      c = namedCaches.get("syncRepl");
+
+      assert c.getCacheMode() == Configuration.CacheMode.REPL_SYNC;
+      assert c.isFetchInMemoryState();
+      assert c.getStateRetrievalTimeout() == 15000;
+      assert c.getSyncReplTimeout() == 15000;
+
+      c = namedCaches.get("asyncRepl");
+
+      assert c.getCacheMode() == Configuration.CacheMode.REPL_ASYNC;
+      assert !c.isUseReplQueue();
+      assert !c.isUseAsyncSerialization();
+      assert c.isFetchInMemoryState();
+      assert c.getStateRetrievalTimeout() == 15000;
+
+      c = namedCaches.get("asyncReplQueue");
+
+      assert c.getCacheMode() == Configuration.CacheMode.REPL_ASYNC;
+      assert c.isUseReplQueue();
+      assert c.isUseAsyncSerialization();
+      assert c.isFetchInMemoryState();
+      assert c.getStateRetrievalTimeout() == 15000;
+
+      c = namedCaches.get("txSyncRepl");
+
+      assert c.getTransactionManagerLookupClass().equals("org.horizon.transaction.GenericTransactionManagerLookup");
+      assert c.getCacheMode() == Configuration.CacheMode.REPL_SYNC;
+      assert c.isFetchInMemoryState();
+      assert c.getStateRetrievalTimeout() == 15000;
+      assert c.getSyncReplTimeout() == 15000;
+
+
+   }
+}

Modified: core/branches/flat/src/test/resources/configs/named-cache-test.xml
===================================================================
--- core/branches/flat/src/test/resources/configs/named-cache-test.xml	2009-01-26 16:56:02 UTC (rev 7597)
+++ core/branches/flat/src/test/resources/configs/named-cache-test.xml	2009-01-27 01:51:15 UTC (rev 7598)
@@ -4,26 +4,26 @@
    <global>
 
       <asyncListenerExecutor factory="org.horizon.executors.DefaultExecutorFactory">
-         <property name="maxThreads">5</property>
-         <property name="threadNamePrefix">AsyncListenerThread</property>
+         <property name="maxThreads" value="5"/>
+         <property name="threadNamePrefix" value="AsyncListenerThread"/>
       </asyncListenerExecutor>
 
       <asyncSerializationExecutor factory="org.horizon.executors.DefaultExecutorFactory">
-         <property name="maxThreads">25</property>
-         <property name="threadNamePrefix">AsyncSerializationThread</property>
+         <property name="maxThreads" value="25"/>
+         <property name="threadNamePrefix" value="AsyncSerializationThread"/>
       </asyncSerializationExecutor>
 
       <evictionScheduledExecutor factory="org.horizon.executors.DefaultScheduledExecutorFactory">
-         <property name="threadNamePrefix">EvictionThread</property>
+         <property name="threadNamePrefix" value="EvictionThread"/>
       </evictionScheduledExecutor>
 
       <replicationQueueScheduledExecutor factory="org.horizon.executors.DefaultScheduledExecutorFactory">
-         <property name="threadNamePrefix">ReplicationQueueThread</property>
+         <property name="threadNamePrefix" value="ReplicationQueueThread"/>
       </replicationQueueScheduledExecutor>
 
       <transport transportClass="org.horizon.remoting.transport.jgroups.JGroupsTransport"/>
 
-      <serialization marshallerClass="org.horizon.marshall.HorizonMarshaller" version="1.0"
+      <serialization marshallerClass="org.horizon.marshall.VersionAwareMarshaller" version="1.0"
                      objectInputStreamPoolSize="100" objectOutputStreamPoolSize="100"/>
 
    </global>
@@ -58,7 +58,7 @@
    </namedCache>
 
    <namedCache name="txSyncRepl">
-      <transaction transactionManagerLookupClass="org.horizon.transaction.GenericTransactionManagerLookup"/>
+      <transaction/>
       <clustering>
          <stateRetrieval fetchInMemoryState="true" timeout="15000"/>
          <sync replTimeout="15000"/>

Modified: core/branches/flat/src/test/resources/configs/string-property-replaced.xml
===================================================================
--- core/branches/flat/src/test/resources/configs/string-property-replaced.xml	2009-01-26 16:56:02 UTC (rev 7597)
+++ core/branches/flat/src/test/resources/configs/string-property-replaced.xml	2009-01-27 01:51:15 UTC (rev 7598)
@@ -9,12 +9,12 @@
    <global>
 
       <asyncListenerExecutor factory="org.horizon.executors.DefaultExecutorFactory">
-         <property name="maxThreads">${test.property.asyncListenerMaxThreads:5}</property>
-         <property name="threadNamePrefix">AsyncListenerThread</property>
+         <property name="maxThreads" value="${test.property.asyncListenerMaxThreads:5}"/>
+         <property name="threadNamePrefix" value="AsyncListenerThread"/>
       </asyncListenerExecutor>
 
       <transport transportClass="org.horizon.remoting.transport.jgroups.JGroupsTransport">
-         <property name="configurationFile">${test.property.jgroupsConfigFile:udp.xml}</property>
+         <property name="configurationFile" value="${test.property.jgroupsConfigFile:udp.xml}"/>
       </transport>
 
    </global>
@@ -34,7 +34,7 @@
             syncRollbackPhase="false"
             syncCommitPhase="${test.property.SyncCommitPhase:true}"/>
 
-      <clustering clusterName="BlahBlah">
+      <clustering mode="R">
          <sync/>
       </clustering>
    </default>




More information about the jbosscache-commits mailing list