[jboss-cvs] JBossAS SVN: r87763 - in projects/bootstrap/trunk: impl-as/src/test/java/org/jboss/bootstrap/impl/as/config and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Apr 24 03:49:23 EDT 2009


Author: ALRubinger
Date: 2009-04-24 03:49:23 -0400 (Fri, 24 Apr 2009)
New Revision: 87763

Added:
   projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/config/JBossASConfigurationPropertyOverrideTestCase.java
Modified:
   projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/config/BasicJBossASServerConfig.java
   projects/bootstrap/trunk/impl-base/src/main/java/org/jboss/bootstrap/impl/base/config/AbstractBasicConfigurationInitializer.java
Log:
[JBBOOT-31] Tests and bug fixes to support impl-as property overrides

Modified: projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/config/BasicJBossASServerConfig.java
===================================================================
--- projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/config/BasicJBossASServerConfig.java	2009-04-24 06:43:11 UTC (rev 87762)
+++ projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/config/BasicJBossASServerConfig.java	2009-04-24 07:49:23 UTC (rev 87763)
@@ -200,17 +200,8 @@
          return this.jbossHome((URL) null);
       }
 
-      // Convert this String into a URL via File
-      final File jbossHomeFile = new File(jbossHome);
-      URL jbossHomeUrl = null;
-      try
-      {
-         jbossHomeUrl = jbossHomeFile.toURI().toURL();
-      }
-      catch (MalformedURLException e)
-      {
-         throw new IllegalArgumentException("Cannot construct URL for JBOSS_HOME given: " + jbossHome, e);
-      }
+      // Convert this String into a URL
+      final URL jbossHomeUrl = this.getUrlFromString(jbossHome);
 
       // Return
       return this.jbossHome(jbossHomeUrl);
@@ -272,16 +263,7 @@
       }
 
       // Convert this String into a URL via File
-      final File file = new File(bootLibraryLocation);
-      URL url = null;
-      try
-      {
-         url = file.toURI().toURL();
-      }
-      catch (MalformedURLException e)
-      {
-         throw new IllegalArgumentException("Cannot construct URL given: " + bootLibraryLocation, e);
-      }
+      final URL url = this.getUrlFromString(bootLibraryLocation);
 
       // Return
       return this.bootLibraryLocation(url);
@@ -340,16 +322,7 @@
       }
 
       // Convert this String into a URL via File
-      final File file = new File(serverBaseLocation);
-      URL url = null;
-      try
-      {
-         url = file.toURI().toURL();
-      }
-      catch (MalformedURLException e)
-      {
-         throw new IllegalArgumentException("Cannot construct URL given: " + serverBaseLocation, e);
-      }
+      final URL url = this.getUrlFromString(serverBaseLocation);
 
       // Return
       return this.serverBaseLocation(url);
@@ -396,16 +369,7 @@
       }
 
       // Convert this String into a URL via File
-      final File file = new File(serverHomeLocation);
-      URL url = null;
-      try
-      {
-         url = file.toURI().toURL();
-      }
-      catch (MalformedURLException e)
-      {
-         throw new IllegalArgumentException("Cannot construct URL given: " + serverHomeLocation, e);
-      }
+      final URL url = this.getUrlFromString(serverHomeLocation);
 
       // Return
       return this.serverHomeLocation(url);
@@ -439,16 +403,7 @@
       }
 
       // Convert this String into a URL via File
-      final File file = new File(commonBaseLocation);
-      URL url = null;
-      try
-      {
-         url = file.toURI().toURL();
-      }
-      catch (MalformedURLException e)
-      {
-         throw new IllegalArgumentException("Cannot construct URL given: " + commonBaseLocation, e);
-      }
+      final URL url = this.getUrlFromString(commonBaseLocation);
 
       // Return
       return this.commonBaseLocation(url);
@@ -494,16 +449,7 @@
       }
 
       // Convert this String into a URL via File
-      final File file = new File(commonLibLocation);
-      URL url = null;
-      try
-      {
-         url = file.toURI().toURL();
-      }
-      catch (MalformedURLException e)
-      {
-         throw new IllegalArgumentException("Cannot construct URL given: " + commonLibLocation, e);
-      }
+      final URL url = this.getUrlFromString(commonLibLocation);
 
       // Return
       return this.commonLibLocation(url);
@@ -562,16 +508,7 @@
       }
 
       // Convert this String into a URL via File
-      final File file = new File(serverLogLocation);
-      URL url = null;
-      try
-      {
-         url = file.toURI().toURL();
-      }
-      catch (MalformedURLException e)
-      {
-         throw new IllegalArgumentException("Cannot construct URL given: " + serverLogLocation, e);
-      }
+      final URL url = this.getUrlFromString(serverLogLocation);
 
       // Return
       return this.serverLogLocation(url);
@@ -599,7 +536,6 @@
             throw new RuntimeException("Error in format of " + uri, e);
          }
          location = new File(uri).getAbsolutePath();
-
       }
 
       // Set properties
@@ -634,16 +570,7 @@
       }
 
       // Convert this String into a URL via File
-      final File file = new File(serverConfigLocation);
-      URL url = null;
-      try
-      {
-         url = file.toURI().toURL();
-      }
-      catch (MalformedURLException e)
-      {
-         throw new IllegalArgumentException("Cannot construct URL given: " + serverConfigLocation, e);
-      }
+      final URL url = this.getUrlFromString(serverConfigLocation);
 
       // Return
       return this.serverConfLocation(url);
@@ -689,16 +616,7 @@
       }
 
       // Convert this String into a URL via File
-      final File file = new File(serverLibLocation);
-      URL url = null;
-      try
-      {
-         url = file.toURI().toURL();
-      }
-      catch (MalformedURLException e)
-      {
-         throw new IllegalArgumentException("Cannot construct URL given: " + serverLibLocation, e);
-      }
+      final URL url = this.getUrlFromString(serverLibLocation);
 
       // Return
       return this.serverLibLocation(url);
@@ -744,16 +662,7 @@
       }
 
       // Convert this String into a URL via File
-      final File file = new File(serverDataLocation);
-      URL url = null;
-      try
-      {
-         url = file.toURI().toURL();
-      }
-      catch (MalformedURLException e)
-      {
-         throw new IllegalArgumentException("Cannot construct URL given: " + serverDataLocation, e);
-      }
+      final URL url = this.getUrlFromString(serverDataLocation);
 
       // Return
       return this.serverDataLocation(url);
@@ -781,7 +690,6 @@
             throw new RuntimeException("Error in format of " + uri, e);
          }
          location = new File(uri).getAbsolutePath();
-
       }
 
       // Set properties
@@ -816,16 +724,7 @@
       }
 
       // Convert this String into a URL via File
-      final File file = new File(serverTempLocation);
-      URL url = null;
-      try
-      {
-         url = file.toURI().toURL();
-      }
-      catch (MalformedURLException e)
-      {
-         throw new IllegalArgumentException("Cannot construct URL given: " + serverTempLocation, e);
-      }
+      final URL url = this.getUrlFromString(serverTempLocation);
 
       // Return
       return this.serverTempLocation(url);
@@ -853,7 +752,6 @@
             throw new RuntimeException("Error in format of " + uri, e);
          }
          location = new File(uri).getAbsolutePath();
-
       }
 
       // Set properties
@@ -868,6 +766,46 @@
    //-------------------------------------------------------------------------------||
 
    /**
+    * Obtains a URL from the specified String, first detecting whether the 
+    * String represents a URL format already (ie. has protocol).  Prevents
+    * direct URL-ing of something already in URL format 
+    * (ie. "http://something/http://newValue") 
+    *  
+    * @param arg
+    * @return
+    * @throws IllegalArgumentException
+    */
+   private URL getUrlFromString(final String arg) throws IllegalArgumentException
+   {
+
+      // See if this String represents a valid URL
+      URL resolvedUrl = null;
+      try
+      {
+         resolvedUrl = new URL(arg);
+         return resolvedUrl;
+      }
+      catch (MalformedURLException murle)
+      {
+         // That's fine, perhaps it's an absolute path reference
+      }
+
+      // Convert this String into a URL via File
+      final File file = new File(arg);
+      try
+      {
+         resolvedUrl = file.toURI().toURL();
+      }
+      catch (MalformedURLException e)
+      {
+         throw new IllegalArgumentException("Cannot construct URL for argument given: " + arg, e);
+      }
+
+      // Return
+      return resolvedUrl;
+   }
+
+   /**
     * Sets the specified URL's value upon the specified URL Property name and 
     * Directory property name, using appropriate syntax for each (ie. URLs use 
     * a protocol, Directories have just an absolute path) 

Added: projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/config/JBossASConfigurationPropertyOverrideTestCase.java
===================================================================
--- projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/config/JBossASConfigurationPropertyOverrideTestCase.java	                        (rev 0)
+++ projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/config/JBossASConfigurationPropertyOverrideTestCase.java	2009-04-24 07:49:23 UTC (rev 87763)
@@ -0,0 +1,504 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.bootstrap.impl.as.config;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import junit.framework.TestCase;
+
+import org.jboss.logging.Logger;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JBossASConfigurationSysPropOverrideTestCase
+ *
+ * Tests to ensure that the system properties will override
+ * a current value during initialization
+ * 
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class JBossASConfigurationPropertyOverrideTestCase
+{
+   //-------------------------------------------------------------------------------||
+   // Class Members ----------------------------------------------------------------||
+   //-------------------------------------------------------------------------------||
+
+   /**
+    * Logger
+    */
+   private static final Logger log = Logger.getLogger(JBossASConfigurationPropertyOverrideTestCase.class);
+
+   /**
+    * The initializer implementation to test
+    */
+   private static JBossASConfigurationInitializer initializer;
+
+   /**
+    * HTTP protocol portion of a URL
+    */
+   private static final String PROTOCOL_FILE = "file:/";
+
+   /**
+    * A String used to model an explicit setting while testing the config
+    */
+   private static final String STRING_EXPLICIT_SETTING = "explicit";
+
+   /**
+    * A String used to model an explicit setting while testing the config
+    */
+   private static final URL URL_EXPLICIT_SETTING;
+
+   /**
+    * Used in the message that the test failed
+    */
+   private static final String FAIL_MESSAGE = "Property Override did not function as expected";
+
+   /**
+    * A String (URL format) used to model an override setting while testing the config
+    */
+   private static final String URL_OVERRIDE;
+
+   /**
+    * A String (absolute location format) used to model an override setting while testing the config
+    */
+   private static final String STRING_OVERRIDE;
+
+   static
+   {
+      try
+      {
+         final String override = "override/";
+         URL_EXPLICIT_SETTING = new URL(PROTOCOL_FILE + STRING_EXPLICIT_SETTING);
+         URL_OVERRIDE = new URL(PROTOCOL_FILE + override).toExternalForm();
+         STRING_OVERRIDE = override;
+
+      }
+      catch (MalformedURLException murle)
+      {
+         throw new RuntimeException("Error in test setup", murle);
+      }
+   }
+
+   //-------------------------------------------------------------------------------||
+   // Instance Members -------------------------------------------------------------||
+   //-------------------------------------------------------------------------------||
+
+   /**
+    * The configuration
+    */
+   private JBossASServerConfig config;
+
+   //-------------------------------------------------------------------------------||
+   // Lifecycle --------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------||
+
+   /**
+    * Performs initialization before any tests run
+    */
+   @BeforeClass
+   public static void init()
+   {
+      initializer = new JBossASConfigurationInitializerImpl();
+   }
+
+   /**
+    * Creates and sets a new config
+    */
+   @Before
+   public void preTest() throws Throwable
+   {
+      // Create new config
+      config = new BasicJBossASServerConfig();
+   }
+
+   /**
+    * Cleans up the config used in testing such that state
+    * is not carried (leaked) from test to test
+    */
+   @After
+   public void cleanup()
+   {
+      config = null;
+   }
+
+   //-------------------------------------------------------------------------------||
+   // Tests ------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------||
+
+   /**
+    * Ensures that the JBoss Home may be overridden from
+    * the corresponding property
+    */
+   @Test
+   public void testJBossHomePropOverride() throws Throwable
+   {
+      // Log
+      log.info("testJBossHomePropOverride");
+
+      // Get the config
+      final JBossASServerConfig config = this.config;
+
+      // Explicitly set
+      config.jbossHome(URL_EXPLICIT_SETTING);
+
+      // Set override property
+      config.property(JBossASServerConfig.PROP_KEY_JBOSSAS_HOME, URL_OVERRIDE);
+
+      // Initialize
+      initializer.initialize(config);
+
+      // Test
+      TestCase.assertEquals(FAIL_MESSAGE, URL_OVERRIDE, config.getJBossHome().toExternalForm());
+      log.info("Got expected: " + URL_OVERRIDE);
+   }
+
+   /**
+    * Ensures that the Common Base may be overridden from
+    * the corresponding property
+    */
+   @Test
+   public void testCommonBasePropOverride() throws Throwable
+   {
+      // Log
+      log.info("testCommonBasePropOverride");
+
+      // Get the config
+      final JBossASServerConfig config = this.config;
+
+      // Explicitly set
+      config.commonBaseLocation(URL_EXPLICIT_SETTING);
+
+      // Set override property
+      config.property(JBossASServerConfig.PROP_KEY_JBOSSAS_COMMON_BASE_URL, URL_OVERRIDE);
+
+      // Initialize
+      initializer.initialize(config);
+
+      // Test
+      TestCase.assertEquals(FAIL_MESSAGE, URL_OVERRIDE, config.getCommonBaseLocation().toExternalForm());
+      log.info("Got expected: " + URL_OVERRIDE);
+   }
+
+   /**
+    * Ensures that the Common Lib may be overridden from
+    * the corresponding property
+    */
+   @Test
+   public void testCommonLibPropOverride() throws Throwable
+   {
+      // Log
+      log.info("testCommonLibPropOverride");
+
+      // Get the config
+      final JBossASServerConfig config = this.config;
+
+      // Explicitly set
+      config.commonLibLocation(URL_EXPLICIT_SETTING);
+
+      // Set override property
+      config.property(JBossASServerConfig.PROP_KEY_JBOSSAS_COMMON_LIBRARY_URL, URL_OVERRIDE);
+
+      // Initialize
+      initializer.initialize(config);
+
+      // Test
+      TestCase.assertEquals(FAIL_MESSAGE, URL_OVERRIDE, config.getCommonLibLocation().toExternalForm());
+      log.info("Got expected: " + URL_OVERRIDE);
+   }
+
+   /**
+    * Ensures that the Boot Lib may be overridden from
+    * the corresponding property
+    */
+   @Test
+   public void testBootLibPropOverride() throws Throwable
+   {
+      // Log
+      log.info("testBootLibPropOverride");
+
+      // Get the config
+      final JBossASServerConfig config = this.config;
+
+      // Explicitly set
+      config.bootLibraryLocation(URL_EXPLICIT_SETTING);
+
+      // Set override property
+      config.property(JBossASServerConfig.PROP_KEY_JBOSSAS_BOOT_LIBRARY_URL, URL_OVERRIDE);
+
+      // Initialize
+      initializer.initialize(config);
+
+      // Test
+      TestCase.assertEquals(FAIL_MESSAGE, URL_OVERRIDE, config.getBootLibraryLocation().toExternalForm());
+      log.info("Got expected: " + URL_OVERRIDE);
+   }
+
+   /**
+    * Ensures that the Server Name may be overridden from
+    * the corresponding property
+    */
+   @Test
+   public void testServerNamePropOverride() throws Throwable
+   {
+      // Log
+      log.info("testServerNamePropOverride");
+
+      // Get the config
+      final JBossASServerConfig config = this.config;
+
+      // Explicitly set
+      config.serverName(STRING_EXPLICIT_SETTING);
+
+      // Set override property
+      config.property(JBossASServerConfig.PROP_KEY_JBOSSAS_SERVER_NAME, STRING_OVERRIDE);
+
+      // Initialize
+      initializer.initialize(config);
+
+      // Test
+      TestCase.assertEquals(FAIL_MESSAGE, STRING_OVERRIDE, config.getServerName());
+      log.info("Got expected: " + STRING_OVERRIDE);
+   }
+
+   /**
+    * Ensures that the Server Base may be overridden from
+    * the corresponding property
+    */
+   @Test
+   public void testServerBasePropOverride() throws Throwable
+   {
+      // Log
+      log.info("testServerBasePropOverride");
+
+      // Get the config
+      final JBossASServerConfig config = this.config;
+
+      // Explicitly set
+      config.serverBaseLocation(URL_EXPLICIT_SETTING);
+
+      // Set override property
+      config.property(JBossASServerConfig.PROP_KEY_JBOSSAS_SERVER_BASE_URL, URL_OVERRIDE);
+
+      // Initialize
+      initializer.initialize(config);
+
+      // Test
+      TestCase.assertEquals(FAIL_MESSAGE, URL_OVERRIDE, config.getServerBaseLocation().toExternalForm());
+      log.info("Got expected: " + URL_OVERRIDE);
+   }
+
+   /**
+    * Ensures that the Server Home may be overridden from
+    * the corresponding property
+    */
+   @Test
+   public void testServerHomePropOverride() throws Throwable
+   {
+      // Log
+      log.info("testServerHomePropOverride");
+
+      // Get the config
+      final JBossASServerConfig config = this.config;
+
+      // Explicitly set
+      config.serverHomeLocation(URL_EXPLICIT_SETTING);
+
+      // Set override property
+      config.property(JBossASServerConfig.PROP_KEY_JBOSSAS_SERVER_HOME_URL, URL_OVERRIDE);
+
+      // Initialize
+      initializer.initialize(config);
+
+      // Test
+      TestCase.assertEquals(FAIL_MESSAGE, URL_OVERRIDE, config.getServerHomeLocation().toExternalForm());
+      log.info("Got expected: " + URL_OVERRIDE);
+   }
+
+   /**
+    * Ensures that the Server Log may be overridden from
+    * the corresponding property
+    */
+   @Test
+   public void testServerLogPropOverride() throws Throwable
+   {
+      // Log
+      log.info("testServerLogPropOverride");
+
+      // Get the config
+      final JBossASServerConfig config = this.config;
+
+      // Explicitly set
+      config.serverLogLocation(URL_EXPLICIT_SETTING);
+
+      // Set override property
+      config.property(JBossASServerConfig.PROP_KEY_JBOSSAS_SERVER_LOG_DIR, URL_OVERRIDE);
+
+      // Initialize
+      initializer.initialize(config);
+
+      // Test
+      TestCase.assertEquals(FAIL_MESSAGE, URL_OVERRIDE, config.getServerLogLocation().toExternalForm());
+      log.info("Got expected: " + URL_OVERRIDE);
+   }
+
+   /**
+    * Ensures that the Server Lib may be overridden from
+    * the corresponding property
+    */
+   @Test
+   public void testServerLibPropOverride() throws Throwable
+   {
+      // Log
+      log.info("testServerLibPropOverride");
+
+      // Get the config
+      final JBossASServerConfig config = this.config;
+
+      // Explicitly set
+      config.serverLibLocation(URL_EXPLICIT_SETTING);
+
+      // Set override property
+      config.property(JBossASServerConfig.PROP_KEY_JBOSSAS_SERVER_LIBRARY_URL, URL_OVERRIDE);
+
+      // Initialize
+      initializer.initialize(config);
+
+      // Test
+      TestCase.assertEquals(FAIL_MESSAGE, URL_OVERRIDE, config.getServerLibLocation().toExternalForm());
+      log.info("Got expected: " + URL_OVERRIDE);
+   }
+
+   /**
+    * Ensures that the Server Temp may be overridden from
+    * the corresponding property
+    */
+   @Test
+   public void testServerTempPropOverride() throws Throwable
+   {
+      // Log
+      log.info("testServerTempPropOverride");
+
+      // Get the config
+      final JBossASServerConfig config = this.config;
+
+      // Explicitly set
+      config.serverTempLocation(URL_EXPLICIT_SETTING);
+
+      // Set override property
+      config.property(JBossASServerConfig.PROP_KEY_JBOSSAS_SERVER_TEMP_DIR, URL_OVERRIDE);
+
+      // Initialize
+      initializer.initialize(config);
+
+      // Test
+      TestCase.assertEquals(FAIL_MESSAGE, URL_OVERRIDE, config.getServerTempLocation().toExternalForm());
+      log.info("Got expected: " + URL_OVERRIDE);
+   }
+
+   /**
+    * Ensures that the Server Data may be overridden from
+    * the corresponding property
+    */
+   @Test
+   public void testServerDataPropOverride() throws Throwable
+   {
+      // Log
+      log.info("testServerDataPropOverride");
+
+      // Get the config
+      final JBossASServerConfig config = this.config;
+
+      // Explicitly set
+      config.serverDataLocation(URL_EXPLICIT_SETTING);
+
+      // Set override property
+      config.property(JBossASServerConfig.PROP_KEY_JBOSSAS_SERVER_DATA_DIR, URL_OVERRIDE);
+
+      // Initialize
+      initializer.initialize(config);
+
+      // Test
+      TestCase.assertEquals(FAIL_MESSAGE, URL_OVERRIDE, config.getServerDataLocation().toExternalForm());
+      log.info("Got expected: " + URL_OVERRIDE);
+   }
+
+   /**
+    * Ensures that the Server Conf may be overridden from
+    * the corresponding property
+    */
+   @Test
+   public void testServerConfPropOverride() throws Throwable
+   {
+      // Log
+      log.info("testServerConfPropOverride");
+
+      // Get the config
+      final JBossASServerConfig config = this.config;
+
+      // Explicitly set
+      config.serverConfLocation(URL_EXPLICIT_SETTING);
+
+      // Set override property
+      config.property(JBossASServerConfig.PROP_KEY_JBOSSAS_SERVER_CONF_URL, URL_OVERRIDE);
+
+      // Initialize
+      initializer.initialize(config);
+
+      // Test
+      TestCase.assertEquals(FAIL_MESSAGE, URL_OVERRIDE, config.getServerConfLocation().toExternalForm());
+      log.info("Got expected: " + URL_OVERRIDE);
+   }
+
+   /**
+    * Ensures that the Bind Address may be overridden from
+    * the corresponding property
+    */
+   @Test
+   public void testBindAddressPropOverride() throws Throwable
+   {
+      // Log
+      log.info("testBindAddressPropOverride");
+
+      // Get the config
+      final JBossASServerConfig config = this.config;
+
+      // Explicitly set
+      config.bindAddress(STRING_EXPLICIT_SETTING);
+
+      // Set override property
+      config.property(JBossASServerConfig.PROP_KEY_JBOSSAS_BIND_ADDRESS, STRING_OVERRIDE);
+
+      // Initialize
+      initializer.initialize(config);
+
+      // Test
+      TestCase.assertEquals(FAIL_MESSAGE, STRING_OVERRIDE, config.getBindAddress());
+      log.info("Got expected: " + STRING_OVERRIDE);
+   }
+
+}

Modified: projects/bootstrap/trunk/impl-base/src/main/java/org/jboss/bootstrap/impl/base/config/AbstractBasicConfigurationInitializer.java
===================================================================
--- projects/bootstrap/trunk/impl-base/src/main/java/org/jboss/bootstrap/impl/base/config/AbstractBasicConfigurationInitializer.java	2009-04-24 06:43:11 UTC (rev 87762)
+++ projects/bootstrap/trunk/impl-base/src/main/java/org/jboss/bootstrap/impl/base/config/AbstractBasicConfigurationInitializer.java	2009-04-24 07:49:23 UTC (rev 87763)
@@ -85,7 +85,7 @@
       }
 
       // Apply overrides
-      this.applySystemPropertyOverrides(config);
+      this.applyPropertyOverrides(config);
 
       /*
        * Default the config
@@ -216,11 +216,11 @@
    }
 
    /**
-    * Sets the values of contracted system properties upon the supplied configuration
+    * Sets the values of contracted system/config properties upon the supplied configuration
     * 
     * @throws IllegalArgumentException If the config was not specified
     */
-   protected void applySystemPropertyOverrides(final T config) throws IllegalArgumentException
+   protected void applyPropertyOverrides(final T config) throws IllegalArgumentException
    {
       // Log
       if (log.isTraceEnabled())




More information about the jboss-cvs-commits mailing list