[jboss-cvs] JBossAS SVN: r89345 - in branches/Branch_5_x: build and 61 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sun May 24 05:27:09 EDT 2009


Author: ALRubinger
Date: 2009-05-24 05:27:07 -0400 (Sun, 24 May 2009)
New Revision: 89345

Added:
   branches/Branch_5_x/main/src/main/org/jboss/SecurityActions.java
   branches/Branch_5_x/server/src/main/org/jboss/config/
   branches/Branch_5_x/server/src/main/org/jboss/config/ServerConfigUtil.java
   branches/Branch_5_x/system-jmx/src/main/org/jboss/system/server/ServerConstants.java
Removed:
   branches/Branch_5_x/server/src/main/org/jboss/config/ServerConfigUtil.java
Modified:
   branches/Branch_5_x/aspects/.classpath
   branches/Branch_5_x/build/build-distr.xml
   branches/Branch_5_x/build/pom.xml
   branches/Branch_5_x/cluster/.classpath
   branches/Branch_5_x/cluster/build.xml
   branches/Branch_5_x/cluster/pom.xml
   branches/Branch_5_x/cluster/src/main/org/jboss/ha/framework/server/ClusterFileTransfer.java
   branches/Branch_5_x/cluster/src/main/org/jboss/ha/framework/server/ClusterPartition.java
   branches/Branch_5_x/cluster/src/main/org/jboss/ha/framework/server/FarmMemberService.java
   branches/Branch_5_x/cluster/src/main/org/jboss/ha/framework/server/JChannelFactory.java
   branches/Branch_5_x/cluster/src/main/org/jboss/ha/framework/server/util/TopologyMonitorService.java
   branches/Branch_5_x/cluster/src/main/org/jboss/invocation/http/server/HttpProxyFactoryHA.java
   branches/Branch_5_x/component-matrix/pom.xml
   branches/Branch_5_x/connector/.classpath
   branches/Branch_5_x/connector/build.xml
   branches/Branch_5_x/connector/src/main/org/jboss/resource/deployers/RARDeployment.java
   branches/Branch_5_x/connector/src/main/org/jboss/resource/deployment/RARDeployment.java
   branches/Branch_5_x/console/.classpath
   branches/Branch_5_x/console/build.xml
   branches/Branch_5_x/console/pom.xml
   branches/Branch_5_x/console/src/main/org/jboss/console/manager/DeploymentFileRepository.java
   branches/Branch_5_x/iiop/.classpath
   branches/Branch_5_x/iiop/build.xml
   branches/Branch_5_x/iiop/src/main/org/jboss/iiop/CorbaORBService.java
   branches/Branch_5_x/main/.classpath
   branches/Branch_5_x/main/build.xml
   branches/Branch_5_x/main/pom.xml
   branches/Branch_5_x/main/src/main/org/jboss/Main.java
   branches/Branch_5_x/main/src/resources/log4j-debug.properties
   branches/Branch_5_x/main/src/resources/log4j-trace.properties
   branches/Branch_5_x/main/src/resources/log4j.properties
   branches/Branch_5_x/management/.classpath
   branches/Branch_5_x/management/build.xml
   branches/Branch_5_x/management/pom.xml
   branches/Branch_5_x/management/src/main/org/jboss/management/j2ee/cluster/HAManagementService.java
   branches/Branch_5_x/profileservice/src/resources/hdscanner-jboss-beans.xml
   branches/Branch_5_x/server/.classpath
   branches/Branch_5_x/server/build.xml
   branches/Branch_5_x/server/pom.xml
   branches/Branch_5_x/server/src/etc/conf/all/bootstrap/profile.xml
   branches/Branch_5_x/server/src/etc/conf/all/xmdesc/NamingProviderURLWriter-xmbean.xml
   branches/Branch_5_x/server/src/main/org/jboss/Shutdown.java
   branches/Branch_5_x/server/src/main/org/jboss/deployment/JBossEjbParsingDeployer.java
   branches/Branch_5_x/server/src/main/org/jboss/ejb/plugins/CMPFilePersistenceManager.java
   branches/Branch_5_x/server/src/main/org/jboss/ejb/plugins/StatefulSessionFilePersistenceManager.java
   branches/Branch_5_x/server/src/main/org/jboss/invocation/http/server/HttpInvoker.java
   branches/Branch_5_x/server/src/main/org/jboss/invocation/http/server/HttpProxyFactory.java
   branches/Branch_5_x/server/src/main/org/jboss/invocation/pooled/server/PooledInvoker.java
   branches/Branch_5_x/server/src/main/org/jboss/naming/NamingProviderURLWriter.java
   branches/Branch_5_x/server/src/main/org/jboss/web/WebService.java
   branches/Branch_5_x/server/src/main/org/jboss/web/deployers/AbstractWarDeployment.java
   branches/Branch_5_x/system-jmx/.classpath
   branches/Branch_5_x/system-jmx/build.xml
   branches/Branch_5_x/system-jmx/pom.xml
   branches/Branch_5_x/system-jmx/src/main/org/jboss/deployment/MainDeployer.java
   branches/Branch_5_x/system-jmx/src/main/org/jboss/deployment/SARDeployer.java
   branches/Branch_5_x/system-jmx/src/main/org/jboss/deployment/SubDeployerSupport.java
   branches/Branch_5_x/system-jmx/src/main/org/jboss/deployment/XSLSubDeployer.java
   branches/Branch_5_x/system-jmx/src/main/org/jboss/deployment/scanner/URLDeploymentScanner.java
   branches/Branch_5_x/system-jmx/src/main/org/jboss/system/deployers/SARDeployer.java
   branches/Branch_5_x/system-jmx/src/main/org/jboss/system/pm/XMLAttributePersistenceManager.java
   branches/Branch_5_x/system-jmx/src/main/org/jboss/system/server/ServerConfigImpl.java
   branches/Branch_5_x/system-jmx/src/main/org/jboss/system/server/ServerConfigImplMBean.java
   branches/Branch_5_x/system-jmx/src/main/org/jboss/system/server/ServerConfigLocator.java
   branches/Branch_5_x/system-jmx/src/main/org/jboss/system/server/ServerImplMBean.java
   branches/Branch_5_x/system-jmx/src/main/org/jboss/system/server/jmx/JMXKernel.java
   branches/Branch_5_x/system/.classpath
   branches/Branch_5_x/system/build.xml
   branches/Branch_5_x/system/pom.xml
   branches/Branch_5_x/system/src/main/org/jboss/deployers/plugins/managed/TypedManagedDeploymentCreator.java
   branches/Branch_5_x/system/src/main/org/jboss/system/server/profile/repository/metadata/AbstractProfileMetaData.java
   branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java
   branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/SecurityActions.java
   branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/repository/clustered/local/JAXBRepositoryContentMetadataPersister.java
   branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/repository/clustered/local/LocalContentManagerFactory.java
   branches/Branch_5_x/system/src/main/org/jboss/system/tools/DeploymentRepositoryAdapter.java
   branches/Branch_5_x/system/src/main/org/jboss/system/tools/DeploymentScanner.java
   branches/Branch_5_x/system/src/main/org/jboss/system/tools/DeploymentScannerMBean.java
   branches/Branch_5_x/system/src/tests/org/jboss/test/server/profileservice/MainWithSimpleHotDeployTestCase.java
   branches/Branch_5_x/system/src/tests/org/jboss/test/server/profileservice/support/MockServer.java
   branches/Branch_5_x/system/src/tests/org/jboss/test/server/profileservice/support/MockServerConfig.java
   branches/Branch_5_x/system/src/tests/org/jboss/test/server/profileservice/test/AbstractProfileServiceTestBase.java
   branches/Branch_5_x/testsuite/.classpath
   branches/Branch_5_x/testsuite/build.xml
   branches/Branch_5_x/testsuite/src/main/org/jboss/test/jmx/mbean/TestDeployer.java
   branches/Branch_5_x/testsuite/src/main/org/jboss/test/jmx/xmbean/XMLAttributePersistenceManagerTestService.java
   branches/Branch_5_x/thirdparty/pom.xml
   branches/Branch_5_x/tomcat/.classpath
   branches/Branch_5_x/tomcat/build.xml
   branches/Branch_5_x/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatService.java
   branches/Branch_5_x/varia/.classpath
   branches/Branch_5_x/varia/build.xml
   branches/Branch_5_x/varia/pom.xml
   branches/Branch_5_x/varia/src/main/org/jboss/jdbc/HypersonicDatabase.java
   branches/Branch_5_x/varia/src/main/org/jboss/jmx/adaptor/snmp/agent/SnmpAgentService.java
   branches/Branch_5_x/varia/src/main/org/jboss/jmx/adaptor/snmp/agent/TrapEmitter.java
   branches/Branch_5_x/varia/src/main/org/jboss/jmx/adaptor/snmp/trapd/TrapdService.java
   branches/Branch_5_x/varia/src/main/org/jboss/services/binding/impl/Util.java
   branches/Branch_5_x/varia/src/main/org/jboss/services/deployment/DeploymentManager.java
   branches/Branch_5_x/varia/src/main/org/jboss/services/deployment/LibraryManager.java
   branches/Branch_5_x/varia/src/main/org/jboss/varia/deployment/FoeDeployer.java
   branches/Branch_5_x/varia/src/main/org/jboss/varia/property/SystemPropertiesService.java
   branches/Branch_5_x/varia/src/tests/org/jboss/test/services/binding/test/ServiceBindingTestBase.java
Log:
[JBAS-6856] Merging Branch_5_x_BootstrapLegacyRemoval into Branch_5_x, first attempt.  Regressions warrant a rollback.

Modified: branches/Branch_5_x/aspects/.classpath
===================================================================
--- branches/Branch_5_x/aspects/.classpath	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/aspects/.classpath	2009-05-24 09:27:07 UTC (rev 89345)
@@ -43,6 +43,5 @@
 	<classpathentry kind="lib" path="/thirdparty/jboss/aop/lib/jboss-aop-aspects.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/aop/lib/jboss-aop-asintegration-jmx.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/web/lib/servlet-api.jar"/>
-	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap/lib/jboss-bootstrap.jar" sourcepath="/thirdparty/jboss/jboss-bootstrap/lib/jboss-bootstrap-sources.jar"/>
 	<classpathentry kind="output" path="output/eclipse-classes"/>
 </classpath>

Modified: branches/Branch_5_x/build/build-distr.xml
===================================================================
--- branches/Branch_5_x/build/build-distr.xml	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/build/build-distr.xml	2009-05-24 09:27:07 UTC (rev 89345)
@@ -1947,8 +1947,18 @@
       <fileset dir="${jboss.aop.lib}">
         <include name="jboss-aop.jar"/>
       </fileset>
-      <fileset dir="${jboss.jboss.bootstrap.lib}" includes="*.jar"
+      <fileset dir="${jboss.jboss.bootstrap.spi.lib}" includes="*.jar"
         excludes="*-sources.jar, *-javadoc.jar" />
+    	<fileset dir="${jboss.jboss.bootstrap.spi.as.lib}" includes="*.jar"
+    	  excludes="*-sources.jar, *-javadoc.jar" />
+    	<fileset dir="${jboss.jboss.bootstrap.spi.mc.lib}" includes="*.jar"
+    	  excludes="*-sources.jar, *-javadoc.jar" />
+      <fileset dir="${jboss.jboss.bootstrap.impl.base.lib}" includes="*.jar"
+        excludes="*-sources.jar, *-javadoc.jar" />
+      <fileset dir="${jboss.jboss.bootstrap.impl.as.lib}" includes="*.jar"
+        excludes="*-sources.jar, *-javadoc.jar" />
+      <fileset dir="${jboss.jboss.bootstrap.impl.mc.lib}" includes="*.jar"
+        excludes="*-sources.jar, *-javadoc.jar" />
       <fileset dir="${jboss.common.core.lib}">
         <exclude name="*-sources.jar"/>
       </fileset>

Modified: branches/Branch_5_x/build/pom.xml
===================================================================
--- branches/Branch_5_x/build/pom.xml	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/build/pom.xml	2009-05-24 09:27:07 UTC (rev 89345)
@@ -22,7 +22,7 @@
     
     <dependency>
       <groupId>org.jboss.bootstrap</groupId>
-      <artifactId>jboss-bootstrap</artifactId>
+      <artifactId>jboss-bootstrap-impl-as</artifactId>
     </dependency>
     
     <dependency>

Modified: branches/Branch_5_x/cluster/.classpath
===================================================================
--- branches/Branch_5_x/cluster/.classpath	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/cluster/.classpath	2009-05-24 09:27:07 UTC (rev 89345)
@@ -12,8 +12,10 @@
 	<classpathentry exported="true" kind="lib" path="/thirdparty/org/jboss/cluster/lib/jboss-ha-server-cache-jbc.jar" sourcepath="/thirdparty/org/jboss/cluster/lib/jboss-ha-server-cache-jbc-sources.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/profileservice-spi/lib/jboss-profileservice-spi.jar" sourcepath="/thirdparty/jboss/profileservice-spi/lib/jboss-profileservice-spi-sources.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-kernel.jar" sourcepath="/thirdparty/jboss/microcontainer/lib/jboss-kernel-sources.jar"/>
-	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap/lib/jboss-bootstrap.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-dependency.jar" sourcepath="/thirdparty/jboss/microcontainer/lib/jboss-dependency-sources.jar"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/system"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap-spi/lib/jboss-bootstrap-spi.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap-spi-as/lib/jboss-bootstrap-spi-as.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap-spi-mc/lib/jboss-bootstrap-spi-mc.jar"/>
 	<classpathentry kind="output" path="output/eclipse-classes"/>
 </classpath>

Modified: branches/Branch_5_x/cluster/build.xml
===================================================================
--- branches/Branch_5_x/cluster/build.xml	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/cluster/build.xml	2009-05-24 09:27:07 UTC (rev 89345)
@@ -102,7 +102,9 @@
     &modules;
     <!-- The combined dependent module classpath -->
     <path id="dependentmodule.classpath">
-      <path refid="jboss.jboss.bootstrap.classpath"/>
+      <path refid="jboss.jboss.bootstrap.spi.as.classpath"/>
+    	<path refid="jboss.jboss.bootstrap.spi.mc.classpath"/>
+    	<path refid="jboss.jboss.bootstrap.spi.classpath"/>
       <path refid="jboss.profileservice.spi.classpath"/>
       <path refid="jboss.system.classpath"/>
       <path refid="jboss.systemjmx.classpath"/>

Modified: branches/Branch_5_x/cluster/pom.xml
===================================================================
--- branches/Branch_5_x/cluster/pom.xml	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/cluster/pom.xml	2009-05-24 09:27:07 UTC (rev 89345)
@@ -155,7 +155,7 @@
     
     <dependency>
       <groupId>org.jboss.bootstrap</groupId>
-      <artifactId>jboss-bootstrap</artifactId>
+      <artifactId>jboss-bootstrap-impl-as</artifactId>
     </dependency>
     
     <dependency>

Modified: branches/Branch_5_x/cluster/src/main/org/jboss/ha/framework/server/ClusterFileTransfer.java
===================================================================
--- branches/Branch_5_x/cluster/src/main/org/jboss/ha/framework/server/ClusterFileTransfer.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/cluster/src/main/org/jboss/ha/framework/server/ClusterFileTransfer.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -21,14 +21,30 @@
  */
 package org.jboss.ha.framework.server;
 
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.Serializable;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Vector;
+
+import org.jboss.ha.framework.interfaces.ClusterNode;
 import org.jboss.ha.framework.interfaces.HAPartition;
-import org.jboss.ha.framework.interfaces.ClusterNode;
+import org.jboss.ha.framework.interfaces.HAPartition.AsynchHAMembershipListener;
+import org.jboss.logging.Logger;
 import org.jboss.system.server.ServerConfigLocator;
-import org.jboss.logging.Logger;
-import org.jboss.ha.framework.interfaces.HAPartition.AsynchHAMembershipListener;
 
-import java.util.*;
-import java.io.*;
+import com.sun.org.apache.xerces.internal.util.URI.MalformedURIException;
 
 /**
  * Handles transfering files on the cluster.  Files are sent in small chunks at a time (up to MAX_CHUNK_BUFFER_SIZE bytes per
@@ -54,7 +70,18 @@
 
    private HAPartition mPartition;
 
-   private static final File TEMP_DIRECTORY = ServerConfigLocator.locate().getServerTempDir();
+   private static final File TEMP_DIRECTORY;
+   static
+   {
+      try
+      {
+         TEMP_DIRECTORY = new File(ServerConfigLocator.locate().getServerTempLocation().toURI());
+      }
+      catch (URISyntaxException urise)
+      {
+         throw new RuntimeException("Error on initialization", urise);
+      }
+   }
 
    // Mapping between parent folder name and target destination folder
    // the search key is the parent folder name and value is the java.io.File.

Modified: branches/Branch_5_x/cluster/src/main/org/jboss/ha/framework/server/ClusterPartition.java
===================================================================
--- branches/Branch_5_x/cluster/src/main/org/jboss/ha/framework/server/ClusterPartition.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/cluster/src/main/org/jboss/ha/framework/server/ClusterPartition.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -39,10 +39,6 @@
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CountDownLatch;
 
-import javax.management.JMException;
-import javax.management.MBeanServer;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.Name;
@@ -50,7 +46,7 @@
 import javax.naming.Reference;
 import javax.naming.StringRefAddr;
 
-import org.jboss.bootstrap.spi.util.ServerConfigUtil;
+import org.jboss.bootstrap.spi.as.config.JBossASConfigurationInitializer;
 import org.jboss.ha.framework.interfaces.ClusterNode;
 import org.jboss.ha.framework.interfaces.DistributedReplicantManager;
 import org.jboss.ha.framework.interfaces.HAPartition;
@@ -208,7 +204,7 @@
    private   String cacheConfigName;
    private   ChannelFactory channelFactory;
    private   String stackName;
-   private   String partitionName = ServerConfigUtil.getDefaultPartitionName();
+   private   String partitionName = JBossASConfigurationInitializer.VALUE_PARTITION_NAME_DEFAULT;
    private   InetAddress nodeAddress = null;
    private   long state_transfer_timeout=60000;
    private   long method_call_timeout=60000;

Modified: branches/Branch_5_x/cluster/src/main/org/jboss/ha/framework/server/FarmMemberService.java
===================================================================
--- branches/Branch_5_x/cluster/src/main/org/jboss/ha/framework/server/FarmMemberService.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/cluster/src/main/org/jboss/ha/framework/server/FarmMemberService.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -24,10 +24,13 @@
 import java.io.File;
 import java.net.MalformedURLException;
 import java.net.URL;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
 
-import org.jboss.bootstrap.spi.ServerConfig;
-import org.jboss.deployment.Deployer;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
 import org.jboss.deployment.scanner.URLDeploymentScanner;
 import org.jboss.ha.framework.interfaces.HAPartition;
 import org.jboss.system.server.ServerConfigLocator;
@@ -110,8 +113,8 @@
    protected void createService() throws Exception
    {
       super.createService();
-      ServerConfig lConfig = ServerConfigLocator.locate();
-      mTempDirectory = lConfig.getServerTempDir();
+      JBossASServerConfig lConfig = ServerConfigLocator.locate();
+      mTempDirectory = new File(lConfig.getServerTempLocation().toURI());
       
       createUnexistingLocalDir ();
    }

Modified: branches/Branch_5_x/cluster/src/main/org/jboss/ha/framework/server/JChannelFactory.java
===================================================================
--- branches/Branch_5_x/cluster/src/main/org/jboss/ha/framework/server/JChannelFactory.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/cluster/src/main/org/jboss/ha/framework/server/JChannelFactory.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -36,7 +36,7 @@
 import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
-import org.jboss.bootstrap.spi.util.ServerConfigUtil;
+import org.jboss.config.ServerConfigUtil;
 import org.jboss.logging.Logger;
 import org.jboss.system.ServiceMBean;
 import org.jboss.util.loading.ContextClassLoaderSwitcher;

Modified: branches/Branch_5_x/cluster/src/main/org/jboss/ha/framework/server/util/TopologyMonitorService.java
===================================================================
--- branches/Branch_5_x/cluster/src/main/org/jboss/ha/framework/server/util/TopologyMonitorService.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/cluster/src/main/org/jboss/ha/framework/server/util/TopologyMonitorService.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -30,7 +30,7 @@
 import javax.naming.InitialContext;
 
 import org.apache.log4j.MDC;
-import org.jboss.bootstrap.spi.util.ServerConfigUtil;
+import org.jboss.bootstrap.spi.as.config.JBossASConfigurationInitializer;
 import org.jboss.ha.framework.interfaces.HAPartition;
 import org.jboss.ha.framework.interfaces.HAPartition.AsynchHAMembershipListener;
 import org.jboss.ha.framework.server.HAPartitionLocator;
@@ -88,7 +88,7 @@
 
    private static Logger changeLog = Logger.getLogger(CHANGE_NAME);
 
-   private volatile String partitionName = ServerConfigUtil.getDefaultPartitionName();
+   private volatile String partitionName = JBossASConfigurationInitializer.VALUE_PARTITION_NAME_DEFAULT;
 
    private volatile HAPartition partition;
 

Modified: branches/Branch_5_x/cluster/src/main/org/jboss/invocation/http/server/HttpProxyFactoryHA.java
===================================================================
--- branches/Branch_5_x/cluster/src/main/org/jboss/invocation/http/server/HttpProxyFactoryHA.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/cluster/src/main/org/jboss/invocation/http/server/HttpProxyFactoryHA.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -24,19 +24,20 @@
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Hashtable;
+
+import javax.management.MBeanServer;
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
-import javax.management.MBeanServer;
 
+import org.jboss.bootstrap.spi.as.config.JBossASConfigurationInitializer;
+import org.jboss.ha.framework.interfaces.HAPartition;
+import org.jboss.ha.framework.interfaces.LoadBalancePolicy;
+import org.jboss.ha.framework.server.HAPartitionLocator;
+import org.jboss.ha.framework.server.HATarget;
 import org.jboss.invocation.Invoker;
 import org.jboss.invocation.InvokerInterceptor;
 import org.jboss.invocation.http.interfaces.ClientMethodInterceptorHA;
 import org.jboss.invocation.http.interfaces.HttpInvokerProxyHA;
-import org.jboss.bootstrap.spi.util.ServerConfigUtil;
-import org.jboss.ha.framework.interfaces.LoadBalancePolicy;
-import org.jboss.ha.framework.interfaces.HAPartition;
-import org.jboss.ha.framework.server.HAPartitionLocator;
-import org.jboss.ha.framework.server.HATarget;
 
 /** An extension of HttpProxyFactory that supports clustering of invoker proxies.
  * It does this by creating a HATarget that monitors the replication of the
@@ -52,7 +53,7 @@
 {
    private ObjectName realJmxInvokerName;
    private ObjectName wrappedJmxInvokerName;
-   private String partitionName = ServerConfigUtil.getDefaultPartitionName();
+   private String partitionName = JBossASConfigurationInitializer.VALUE_PARTITION_NAME_DEFAULT;
    private Class policyClass;
    private HAInvokerWrapper invokerWrapper;
    private HATarget invokerTarget;

Modified: branches/Branch_5_x/component-matrix/pom.xml
===================================================================
--- branches/Branch_5_x/component-matrix/pom.xml	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/component-matrix/pom.xml	2009-05-24 09:27:07 UTC (rev 89345)
@@ -35,7 +35,7 @@
     <version.javax.faces>1.2_12</version.javax.faces>
     <version.jboss.jaxr>1.2.1.GA</version.jboss.jaxr>
     <version.jboss.jbossts>4.6.1.GA</version.jboss.jbossts>
-    <version.jboss.jbossws-common>1.1.0.SP1</version.jboss.jbossws-common>
+    <version.jboss.jbossws-common>1.1.1.Alpha1</version.jboss.jbossws-common>
     <version.jboss.jbossws-framework>3.1.2.SP1</version.jboss.jbossws-framework>
     <version.jboss.jbossws-spi>1.1.2.GA</version.jboss.jbossws-spi>
     <version.jboss.jbossws>3.1.2.GA</version.jboss.jbossws>
@@ -54,7 +54,12 @@
     <version.org.jboss.aspects.currentinvocation>1.0.0.GA</version.org.jboss.aspects.currentinvocation>
     <version.org.jboss.aspects.remoting>1.0.1.GA</version.org.jboss.aspects.remoting>
     <version.org.jboss.aspects.security>1.0.0.GA</version.org.jboss.aspects.security>
-    <version.org.jboss.bootstrap>1.0.0-Beta-3</version.org.jboss.bootstrap>
+    <version.org.jboss.bootstrap.impl.as>0.1.2</version.org.jboss.bootstrap.impl.as>
+    <version.org.jboss.bootstrap.impl.base>0.1.2</version.org.jboss.bootstrap.impl.base>
+    <version.org.jboss.bootstrap.impl.mc>0.1.2</version.org.jboss.bootstrap.impl.mc>
+    <version.org.jboss.bootstrap.spi>0.1.2</version.org.jboss.bootstrap.spi>
+    <version.org.jboss.bootstrap.spi.as>0.1.2</version.org.jboss.bootstrap.spi.as>
+    <version.org.jboss.bootstrap.spi.mc>0.1.2</version.org.jboss.bootstrap.spi.mc>
     <version.org.jboss.aspects.transaction>1.0.0.GA</version.org.jboss.aspects.transaction>
     <version.org.jboss.cache.core>3.1.0.GA</version.org.jboss.cache.core>
     <version.org.jboss.cache.pojo>3.0.0.GA</version.org.jboss.cache.pojo>
@@ -544,11 +549,41 @@
 
       <dependency>
         <groupId>org.jboss.bootstrap</groupId>
-        <artifactId>jboss-bootstrap</artifactId>
-        <version>${version.org.jboss.bootstrap}</version>
+        <artifactId>jboss-bootstrap-impl-as</artifactId>
+        <version>${version.org.jboss.bootstrap.impl.as}</version>
       </dependency>
       
       <dependency>
+        <groupId>org.jboss.bootstrap</groupId>
+        <artifactId>jboss-bootstrap-impl-base</artifactId>
+        <version>${version.org.jboss.bootstrap.impl.base}</version>
+      </dependency>
+      
+      <dependency>
+        <groupId>org.jboss.bootstrap</groupId>
+        <artifactId>jboss-bootstrap-impl-mc</artifactId>
+        <version>${version.org.jboss.bootstrap.impl.mc}</version>
+      </dependency>
+      
+      <dependency>
+        <groupId>org.jboss.bootstrap</groupId>
+        <artifactId>jboss-bootstrap-spi</artifactId>
+        <version>${version.org.jboss.bootstrap.spi}</version>
+      </dependency>
+      
+      <dependency>
+        <groupId>org.jboss.bootstrap</groupId>
+        <artifactId>jboss-bootstrap-spi-as</artifactId>
+        <version>${version.org.jboss.bootstrap.spi.as}</version>
+      </dependency>
+      
+      <dependency>
+        <groupId>org.jboss.bootstrap</groupId>
+        <artifactId>jboss-bootstrap-spi-mc</artifactId>
+        <version>${version.org.jboss.bootstrap.spi.mc}</version>
+      </dependency>
+      
+      <dependency>
         <groupId>org.jboss.logging</groupId>
         <artifactId>jboss-logging-spi</artifactId>
         <version>2.1.0.GA</version>
@@ -1266,7 +1301,7 @@
       <dependency>
         <groupId>org.jboss.test</groupId>
         <artifactId>jboss-test</artifactId>
-        <version>1.1.4.GA</version>
+        <version>1.1.5-alpha-2</version>
         <exclusions>
           <exclusion>
             <groupId>apache-log4j</groupId>
@@ -1278,7 +1313,7 @@
       <dependency>
         <groupId>org.jboss.jbossas</groupId>
         <artifactId>jboss-server-manager</artifactId>
-        <version>1.0.2.GA</version>
+        <version>1.0.3-alpha-2</version>
         <exclusions>
           <exclusion>
             <groupId>org.jboss.jbossas</groupId>
@@ -2196,6 +2231,7 @@
 			<!-- JBAS-6904: use org.hibernate:hibernate-core -->
 			<exclude>org.hibernate:hibernate</exclude>
                         <exclude>org.jboss.jbossas:jboss-as-bootstrap</exclude> <!-- org.jboss.bootstrap:jboss-bootstrap JBAS-6171 -->
+                        <exclude>org.jboss.jbossas:jboss-bootstrap</exclude> <!-- org.jboss.bootstrap:jboss-bootstrap-impl-as JBAS-6856 -->
                       </excludes>
                     </bannedDependencies>
                   </rules>

Modified: branches/Branch_5_x/connector/.classpath
===================================================================
--- branches/Branch_5_x/connector/.classpath	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/connector/.classpath	2009-05-24 09:27:07 UTC (rev 89345)
@@ -19,6 +19,5 @@
 	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-kernel.jar" sourcepath="/thirdparty/jboss/microcontainer/lib/jboss-kernel-sources.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-mdr/lib/jboss-mdr.jar" sourcepath="/thirdparty/jboss/jboss-mdr/lib/jboss-mdr-sources.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-dependency.jar" sourcepath="/thirdparty/jboss/microcontainer/lib/jboss-dependency-sources.jar"/>
-	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap/lib/jboss-bootstrap.jar"/>
 	<classpathentry kind="output" path="output/eclipse-classes"/>
 </classpath>

Modified: branches/Branch_5_x/connector/build.xml
===================================================================
--- branches/Branch_5_x/connector/build.xml	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/connector/build.xml	2009-05-24 09:27:07 UTC (rev 89345)
@@ -111,7 +111,7 @@
       <path refid="jboss.jboss.security.spi.classpath"/>
       <path refid="jboss.security.int.classpath"/>
       <path refid="jboss.server.classpath"/>
-      <path refid="jboss.jboss.bootstrap.classpath"/>
+      <path refid="jboss.jboss.bootstrap.impl.as.classpath"/>
       <path refid="jboss.system.classpath"/>
       <path refid="jboss.systemjmx.classpath"/>
       <path refid="jboss.j2se.classpath"/>

Modified: branches/Branch_5_x/connector/src/main/org/jboss/resource/deployers/RARDeployment.java
===================================================================
--- branches/Branch_5_x/connector/src/main/org/jboss/resource/deployers/RARDeployment.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/connector/src/main/org/jboss/resource/deployers/RARDeployment.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -41,7 +41,7 @@
 import javax.resource.spi.endpoint.MessageEndpointFactory;
 import javax.resource.spi.work.WorkManager;
 
-import org.jboss.bootstrap.spi.util.ServerConfigUtil;
+import org.jboss.config.ServerConfigUtil;
 import org.jboss.deployers.spi.DeploymentException;
 import org.jboss.resource.deployment.ActivationSpecFactory;
 import org.jboss.resource.deployment.ResourceAdapterFactory;

Modified: branches/Branch_5_x/connector/src/main/org/jboss/resource/deployment/RARDeployment.java
===================================================================
--- branches/Branch_5_x/connector/src/main/org/jboss/resource/deployment/RARDeployment.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/connector/src/main/org/jboss/resource/deployment/RARDeployment.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -39,7 +39,7 @@
 import javax.resource.spi.endpoint.MessageEndpointFactory;
 import javax.resource.spi.work.WorkManager;
 
-import org.jboss.bootstrap.spi.util.ServerConfigUtil;
+import org.jboss.config.ServerConfigUtil;
 import org.jboss.deployers.spi.DeploymentException;
 import org.jboss.deployment.DeploymentInfo;
 import org.jboss.resource.metadata.ConfigPropertyMetaData;

Modified: branches/Branch_5_x/console/.classpath
===================================================================
--- branches/Branch_5_x/console/.classpath	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/console/.classpath	2009-05-24 09:27:07 UTC (rev 89345)
@@ -11,6 +11,8 @@
 	<classpathentry kind="lib" path="/thirdparty/jboss/web/lib/jsp-api.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/web/lib/servlet-api.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-kernel.jar" sourcepath="/thirdparty/jboss/microcontainer/lib/jboss-kernel-sources.jar"/>
-	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap/lib/jboss-bootstrap.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap-spi/lib/jboss-bootstrap-spi.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap-spi-as/lib/jboss-bootstrap-spi-as.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap-spi-mc/lib/jboss-bootstrap-spi-mc.jar"/>
 	<classpathentry kind="output" path="output/eclipse-classes"/>
 </classpath>

Modified: branches/Branch_5_x/console/build.xml
===================================================================
--- branches/Branch_5_x/console/build.xml	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/console/build.xml	2009-05-24 09:27:07 UTC (rev 89345)
@@ -99,7 +99,9 @@
       <path refid="jboss.jbosssx.classpath"/>
       <path refid="jboss.server.classpath"/>
       <path refid="jboss.mq.classpath"/>
-      <path refid="jboss.jboss.bootstrap.classpath"/>
+      <path refid="jboss.jboss.bootstrap.spi.as.classpath"/>
+    	<path refid="jboss.jboss.bootstrap.spi.mc.classpath"/>
+      <path refid="jboss.jboss.bootstrap.spi.classpath"/>
       <path refid="jboss.system.classpath"/>
       <path refid="jboss.systemjmx.classpath"/>
       <path refid="jboss.varia.classpath"/>

Modified: branches/Branch_5_x/console/pom.xml
===================================================================
--- branches/Branch_5_x/console/pom.xml	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/console/pom.xml	2009-05-24 09:27:07 UTC (rev 89345)
@@ -108,7 +108,7 @@
     </dependency>
     <dependency>
       <groupId>org.jboss.bootstrap</groupId>
-      <artifactId>jboss-bootstrap</artifactId>
+      <artifactId>jboss-bootstrap-impl-as</artifactId>
     </dependency>
     <dependency>
       <groupId>org.jboss.jbossas</groupId>

Modified: branches/Branch_5_x/console/src/main/org/jboss/console/manager/DeploymentFileRepository.java
===================================================================
--- branches/Branch_5_x/console/src/main/org/jboss/console/manager/DeploymentFileRepository.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/console/src/main/org/jboss/console/manager/DeploymentFileRepository.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -29,7 +29,7 @@
 import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
-import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
 import org.jboss.system.ServiceMBeanSupport;
 import org.jboss.system.server.ServerConfigLocator;
 
@@ -131,8 +131,8 @@
    {
       // get server's home for relative paths, need this for setting
       // attribute final values, so we need to do it here
-      ServerConfig serverConfig = ServerConfigLocator.locate();
-      serverHome = serverConfig.getServerHomeDir();
+      JBossASServerConfig serverConfig = ServerConfigLocator.locate();
+      serverHome = new File(serverConfig.getServerHomeLocation().toURI());
       return super.preRegister(server, name);
    }
 

Modified: branches/Branch_5_x/iiop/.classpath
===================================================================
--- branches/Branch_5_x/iiop/.classpath	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/iiop/.classpath	2009-05-24 09:27:07 UTC (rev 89345)
@@ -7,6 +7,5 @@
 	<classpathentry exported="true" kind="lib" path="/thirdparty/jacorb/lib/jacorb.jar"/>
 	<classpathentry exported="true" kind="lib" path="/thirdparty/apache-avalon/lib/avalon-framework.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-kernel.jar" sourcepath="/thirdparty/jboss/microcontainer/lib/jboss-kernel-sources.jar"/>
-	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap/lib/jboss-bootstrap.jar"/>
 	<classpathentry kind="output" path="output/eclipse-classes"/>
 </classpath>

Modified: branches/Branch_5_x/iiop/build.xml
===================================================================
--- branches/Branch_5_x/iiop/build.xml	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/iiop/build.xml	2009-05-24 09:27:07 UTC (rev 89345)
@@ -97,7 +97,6 @@
       <path refid="jboss.common.logging.spi.classpath"/>
       <path refid="jboss.common.logging.log4j.classpath"/>
       <path refid="jboss.common.logging.jdk.classpath"/>
-      <path refid="jboss.jboss.bootstrap.classpath"/>
     	<path refid="jboss.main.classpath"/>
       <path refid="jboss.system.classpath"/>
       <path refid="jboss.systemjmx.classpath"/>

Modified: branches/Branch_5_x/iiop/src/main/org/jboss/iiop/CorbaORBService.java
===================================================================
--- branches/Branch_5_x/iiop/src/main/org/jboss/iiop/CorbaORBService.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/iiop/src/main/org/jboss/iiop/CorbaORBService.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -33,7 +33,7 @@
 import javax.naming.Reference;
 import javax.naming.spi.ObjectFactory;
 
-import org.jboss.bootstrap.spi.util.ServerConfigUtil;
+import org.jboss.config.ServerConfigUtil;
 import org.jboss.iiop.naming.ORBInitialContextFactory;
 import org.jboss.metadata.MetaData;
 import org.jboss.proxy.ejb.handle.HandleDelegateImpl;

Modified: branches/Branch_5_x/main/.classpath
===================================================================
--- branches/Branch_5_x/main/.classpath	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/main/.classpath	2009-05-24 09:27:07 UTC (rev 89345)
@@ -3,6 +3,8 @@
 	<classpathentry kind="src" path="src/main"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry exported="true" kind="lib" path="/thirdparty/gnu-getopt/lib/getopt.jar"/>
-	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap/lib/jboss-bootstrap.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap-spi/lib/jboss-bootstrap-spi.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap-spi-as/lib/jboss-bootstrap-spi-as.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap-spi-mc/lib/jboss-bootstrap-spi-mc.jar"/>
 	<classpathentry kind="output" path="output/eclipse-classes"/>
 </classpath>

Modified: branches/Branch_5_x/main/build.xml
===================================================================
--- branches/Branch_5_x/main/build.xml	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/main/build.xml	2009-05-24 09:27:07 UTC (rev 89345)
@@ -78,7 +78,10 @@
 
     <!-- The combined dependant module classpath -->
     <path id="dependentmodule.classpath">
-    	<path refid="jboss.jboss.bootstrap.classpath"/>
+    	<path refid="jboss.jboss.bootstrap.impl.as.classpath"/>
+    	<path refid="jboss.jboss.bootstrap.spi.classpath"/>
+      <path refid="jboss.jboss.bootstrap.spi.as.classpath"/>
+      <path refid="jboss.jboss.bootstrap.spi.mc.classpath"/>
     </path>
 
     <!-- ===== -->
@@ -154,13 +157,27 @@
     </jar>
   	
   	<!-- Inflate out contents of the Bootstrap JAR into a Temp Directory -->
-  	<property name="inflated.dir" value="tmp-bootstrap" />
-  	<mkdir dir="${inflated.dir}"/>
-  	<unjar dest="${inflated.dir}">
-  	  <fileset dir="${jboss.jboss.bootstrap.lib}">
-  	    <include name="jboss-bootstrap.jar"/>
+  	<property name="inflated.spi.dir" value="target/tmp-bootstrap-spi" />
+  	<property name="inflated.spi.as.dir" value="target/tmp-bootstrap-spi-as" />
+    <property name="inflated.spi.mc.dir" value="target/tmp-bootstrap-spi-mc" />
+  	<mkdir dir="${inflated.spi.dir}"/>
+  	<unjar dest="${inflated.spi.dir}">
+  	  <fileset dir="${jboss.jboss.bootstrap.spi.lib}">
+  	    <include name="jboss-bootstrap-spi.jar"/>
   	  </fileset>
     </unjar>
+  	<mkdir dir="${inflated.spi.as.dir}"/>
+  	<unjar dest="${inflated.spi.as.dir}">
+      <fileset dir="${jboss.jboss.bootstrap.spi.as.lib}">
+        <include name="jboss-bootstrap-spi-as.jar"/>
+  	  </fileset>
+  	</unjar>
+    <mkdir dir="${inflated.spi.mc.dir}"/>
+     <unjar dest="${inflated.spi.mc.dir}">
+       <fileset dir="${jboss.jboss.bootstrap.spi.mc.lib}">
+         <include name="jboss-bootstrap-spi-mc.jar"/>
+       </fileset>
+     </unjar>
 
     <!-- Build run.jar -->
     <jar jarfile="${build.lib}/run.jar" manifest="${build.etc}/run.mf">
@@ -172,14 +189,17 @@
         <include name="jdklogger.xml"/>
         <include name="org/jboss/version.properties"/>
       </fileset>
-    	<!-- Add some classes from Bootstrap -->
-      <fileset dir="${inflated.dir}">
-         <include name="org/jboss/bootstrap/NoAnnotationURLClassLoader.class"/>
-         <include name="org/jboss/bootstrap/ServerLoader.class"/>
-         <include name="org/jboss/bootstrap/spi/Server.class"/>
-      	 <include name="org/jboss/bootstrap/spi/ServerConfig.class"/>
-      	 <include name="org/jboss/bootstrap/spi/util/ServerConfigUtil.class"/>
+    	<!-- Add Bootstrap SPI classes -->
+      <fileset dir="${inflated.spi.dir}">
+      	<include name="org/jboss/bootstrap/spi/**"/>
       </fileset>
+      <fileset dir="${inflated.spi.as.dir}">
+        <include name="org/jboss/bootstrap/spi/as/config/JBossASServerConfig.class"/>
+      	<include name="org/jboss/bootstrap/spi/as/config/JBossASConfigurationInitializer.class"/>
+      </fileset>
+      <fileset dir="${inflated.spi.mc.dir}">
+        <include name="org/jboss/bootstrap/spi/mc/config/MCBasedServerConfig.class"/>
+      </fileset>
 
       <!-- Include getopt -->
       <zipfileset src="${gnu.getopt.lib}/getopt.jar">

Modified: branches/Branch_5_x/main/pom.xml
===================================================================
--- branches/Branch_5_x/main/pom.xml	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/main/pom.xml	2009-05-24 09:27:07 UTC (rev 89345)
@@ -55,7 +55,7 @@
     <!-- Compile (global dependencies) -->
     <dependency>
       <groupId>org.jboss.bootstrap</groupId>
-      <artifactId>jboss-bootstrap</artifactId>
+      <artifactId>jboss-bootstrap-impl-as</artifactId>
     </dependency>
     <dependency>
       <groupId>gnu-getopt</groupId>

Modified: branches/Branch_5_x/main/src/main/org/jboss/Main.java
===================================================================
--- branches/Branch_5_x/main/src/main/org/jboss/Main.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/main/src/main/org/jboss/Main.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -24,19 +24,29 @@
 import gnu.getopt.Getopt;
 import gnu.getopt.LongOpt;
 
+import java.io.Closeable;
 import java.io.File;
 import java.io.FilenameFilter;
+import java.io.IOException;
+import java.net.InetAddress;
 import java.net.MalformedURLException;
 import java.net.URL;
+import java.net.URLClassLoader;
 import java.net.URLDecoder;
+import java.net.UnknownHostException;
+import java.util.HashMap;
+import java.util.HashSet;
 import java.util.LinkedList;
 import java.util.List;
+import java.util.Map;
 import java.util.Properties;
+import java.util.Set;
 
-import org.jboss.bootstrap.ServerLoader;
-import org.jboss.bootstrap.spi.Server;
-import org.jboss.bootstrap.spi.ServerConfig;
-import org.jboss.bootstrap.spi.util.ServerConfigUtil;
+import org.jboss.bootstrap.spi.as.config.JBossASConfigurationInitializer;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
+import org.jboss.bootstrap.spi.factory.ServerFactory;
+import org.jboss.bootstrap.spi.lifecycle.LifecycleState;
+import org.jboss.bootstrap.spi.server.Server;
 
 /**
  * Provides a command line interface to start the JBoss server.
@@ -61,32 +71,99 @@
  */
 public class Main
 {
-   /** EDU.oswego.cs.dl.util.concurrent */
-   private String concurrentLib = "concurrent.jar";
-
    /** A URL for obtaining microkernel patches */
    private URL bootURL;
-   
+
    /** Extra jars from the /lib location that are added to the start of the boot
     classpath. This can be used to override jboss /lib boot classes.
     */
-   private List<String> bootLibraries = new LinkedList<String>();
+   private List<URL> bootLibraries = new LinkedList<URL>();
 
    /** Extra libraries to load the server with .*/
-   private List<String> extraLibraries = new LinkedList<String>();
+   private List<URL> extraLibraries = new LinkedList<URL>();
 
    /** Extra classpath URLS to load the server with .*/
    private List<URL> extraClasspath = new LinkedList<URL>();
 
    /**
+    * The default list of boot libraries.  Does not include
+    * the JAXP or JMX impl, users of this class should add the
+    * proper libraries.
+    * TODO: use vfs to list the root directory
+    * http://www.jboss.org/index.html?module=bb&op=viewtopic&t=153175
+    * 
+    * Copied from legacy bootstrap ServerLoader
+    * //TODO JBAS-6920
+    */
+   @Deprecated
+   public static final String[] DEFAULT_BOOT_LIBRARY_LIST =
+   {
+         // Concurrent
+         "concurrent.jar",
+         // Logging
+         "log4j-boot.jar", 
+         "jboss-logging-spi.jar", 
+         "jboss-logging-log4j.jar",
+         "jboss-logging-jdk.jar",
+         "jboss-logmanager.jar",
+         "jboss-logbridge.jar",
+         // Common jars
+         "jboss-common-core.jar",
+         "jboss-xml-binding.jar",
+         // Bootstrap
+         "jboss-bootstrap-spi.jar", 
+         "jboss-bootstrap-spi-as.jar", 
+         "jboss-bootstrap-spi-mc.jar",
+         "jboss-bootstrap-impl-base.jar", 
+         "jboss-bootstrap-impl-as.jar",
+         "jboss-bootstrap-impl-mc.jar",
+         // Microcontainer
+         "javassist.jar", 
+         "jboss-reflect.jar", 
+         "jboss-mdr.jar", 
+         "jboss-dependency.jar", 
+         "jboss-kernel.jar",
+         "jboss-metatype.jar", 
+         "jboss-managed.jar",
+         // Fixme ClassLoading
+         "jboss-vfs.jar", 
+         "jboss-classloading-spi.jar", 
+         "jboss-classloader.jar", 
+         "jboss-classloading.jar",
+         "jboss-classloading-vfs.jar",
+         // Fixme aop
+         "jboss-aop.jar", 
+         "jboss-aop-mc-int.jar", 
+         "trove.jar",};
+
+   /**
     * Server properties.  This object holds all of the required
     * information to get the server up and running. Use System
     * properties for defaults.
     */
-   private Properties props = new Properties(System.getProperties());
+   private Map<String,String> props = new HashMap<String, String>();
+
+   /** 
+    * The booted server instance. 
+    * 
+    * We don't use JBossASServer directly here, because it has 
+    * a reference to MC and the Kernel.  This would put the bootstrap
+    * AS SPI upon the application classpath, with references to 
+    * classes on child ClassLoaders, leading to NCDFE.  So just use 
+    * the minimal SPI set and load everything via reflection
+    * using the URLCLs we create which reference the boot libraries.
+    */
+   private Server<?, ?> server;
+
+   /**
+    * The FQN of the default server implementation class to create
+    */
+   private static final String DEFAULT_AS_SERVER_IMPL_CLASS_NAME = "org.jboss.bootstrap.impl.as.server.JBossASServerImpl";
    
-   /** The booted server instance */
-   private Server server;
+   /**
+    * The name of the system property denoting where the boot.log will be placed
+    */
+   private static final String SYS_PROP_BOOT_LOG_DIR_NAME = "jboss.boot.server.log.dir";
 
    /**
     * Explicit constructor.
@@ -94,13 +171,22 @@
    public Main()
    {
       super();
+      
+      // Set default properties
+      final Properties sysProps = System.getProperties();
+      for (final Object propName : sysProps.keySet())
+      {
+         final String propNameString = (String) propName;
+         final String propValue = (String) sysProps.get(propNameString);
+         props.put(propNameString, propValue);
+      }
    }
 
    /**
     * Access the booted server.
     * @return the Server instance.
     */
-   public Server getServer()
+   public Server<?, ?> getServer()
    {
       return server;
    }
@@ -124,15 +210,34 @@
 
       // Initialize the JDK logmanager
       String name = System.getProperty("java.util.logging.manager");
-      if (name == null) {
-         System.setProperty("java.util.logging.manager",
-            "org.jboss.logmanager.LogManager");
+      if (name == null)
+      {
+         SecurityActions.setSystemProperty("java.util.logging.manager", "org.jboss.logmanager.LogManager");
       }
 
-      // Auto set HOME_DIR to ../bin/run.jar if not set
-      String homeDir = props.getProperty(ServerConfig.HOME_DIR);
-      if (homeDir == null)
+      // Get JBOSS_HOME appropriately  
+      final String homeUrl = props.get(JBossASServerConfig.PROP_KEY_JBOSSAS_HOME_URL);
+      final String homeDir = props.get(JBossASServerConfig.PROP_KEY_JBOSSAS_HOME_DIR);
+      URL jbossHome = null;
+      // We've been given home URL
+      if (homeUrl != null)
       {
+         jbossHome = new URL(homeUrl);
+      }
+      // We've been given home dir
+      else if (homeDir != null)
+      {
+         final File homeDirFile = new File(homeDir);
+         if(!homeDirFile.exists())
+         {
+            throw new IllegalArgumentException("Specified " + JBossASServerConfig.PROP_KEY_JBOSSAS_HOME_DIR
+                  + " does not point to a valid location: " + homeDirFile.toString());
+         }
+         jbossHome = homeDirFile.toURI().toURL();
+      }
+      // Nothing specified, so autoset relative to our location
+      else
+      {
          String path = Main.class.getProtectionDomain().getCodeSource().getLocation().getFile();
          /* The 1.4 JDK munges the code source file with URL encoding so run
           * this path through the decoder so that is JBoss starts in a path with
@@ -141,21 +246,54 @@
          path = URLDecoder.decode(path, "UTF-8");
          File runJar = new File(path);
          File homeFile = runJar.getParentFile().getParentFile();
-         homeDir = homeFile.getCanonicalPath();
+         URL homeUrlFromDir = homeFile.toURI().toURL();
+         jbossHome = homeUrlFromDir;
       }
-      props.setProperty(ServerConfig.HOME_DIR, homeDir);
-
-      // Setup HOME_URL too, ServerLoader needs this
-      String homeURL = props.getProperty(ServerConfig.HOME_URL);
-      if (homeURL == null)
+      
+      // Get Library URL
+      String libUrlFromProp = props.get(JBossASServerConfig.PROP_KEY_JBOSSAS_BOOT_LIBRARY_URL);
+      URL libUrl = null;
+      if (libUrlFromProp != null)
       {
-         File file = new File(homeDir);
-         homeURL = file.toURI().toURL().toString();
-         props.setProperty(ServerConfig.HOME_URL, homeURL);
+         libUrl = new URL(libUrlFromProp);
       }
+      else
+      {
+         libUrl = new URL(jbossHome, JBossASConfigurationInitializer.VALUE_LIBRARY_URL_SUFFIX_DEFAULT);
+      }
+      
+      /*
+       * Set boot log directory
+       */
+      final String sysPropBootLogDir = SYS_PROP_BOOT_LOG_DIR_NAME;
+      final String sysPropLogDir = JBossASServerConfig.PROP_KEY_JBOSSAS_SERVER_LOG_DIR;
+      String serverName = props.get(JBossASServerConfig.PROP_KEY_JBOSSAS_SERVER_NAME);
+      if (serverName == null || serverName.length() == 0)
+      {
+         serverName = JBossASConfigurationInitializer.VALUE_SERVER_NAME_DEFAULT;
+      }
+      final String manualBootLogDir = props.get(sysPropBootLogDir);
+      final String manualLogDir = props.get(sysPropLogDir);
+      // If nothing's been explicitly specified
+      if (manualBootLogDir == null && manualLogDir == null)
+      {
+         // We default it
+         final URL serverLog = new URL(jbossHome, "server/" + serverName + "/log/");
+         final File serverLogFile = new File(serverLog.toURI());
+         final String serverLogString = serverLogFile.getAbsolutePath();
+         SecurityActions.setSystemProperty(sysPropBootLogDir, serverLogString);
+      }
+      // If we've got a manual log dir, use it
+      else if (manualLogDir != null)
+      {
+         SecurityActions.setSystemProperty(sysPropBootLogDir, manualLogDir);
+      }
+      
+      // Get TCCL
+      final ClassLoader tccl = SecurityActions.getThreadContextClassLoader();
 
-      // Load the server instance
-      ServerLoader loader = new ServerLoader(props);
+      // Define a Set URLs to have visible to the CL loading the Server
+      final Set<URL> urls = new HashSet<URL>();
 
       /* If there is a patch dir specified make it the first element of the
       loader bootstrap classpath. If its a file url pointing to a dir, then
@@ -169,63 +307,108 @@
             if (dir.exists())
             {
                // Add the local file patch directory
-               loader.addURL(dir.toURL());
+               urls.add(dir.toURL());
 
                // Add the contents of the directory too
                File[] jars = dir.listFiles(new JarFilter());
 
                for (int j = 0; jars != null && j < jars.length; j++)
                {
-                  loader.addURL(jars[j].getCanonicalFile().toURL());
+                  urls.add(jars[j].getCanonicalFile().toURL());
                }
             }
          }
          else
          {
-            loader.addURL(bootURL);
+            urls.add(bootURL);
          }
       }
 
       // Add any extra libraries
       for (int i = 0; i < bootLibraries.size(); i++)
       {
-         loader.addLibrary(bootLibraries.get(i));
+         urls.add(bootLibraries.get(i));
       }
 
-      // Add the jars from the endorsed dir
-      loader.addEndorsedJars();
+      //      // Add the jars from the endorsed dir
+      //      loader.addEndorsedJars();
 
       // jmx UnifiedLoaderRepository needs a concurrent class...
-      loader.addLibrary(concurrentLib);
+      //      urls.add(concurrentLib);
 
       // Add any extra libraries after the boot libs
       for (int i = 0; i < extraLibraries.size(); i++)
       {
-         loader.addLibrary(extraLibraries.get(i));
+         urls.add(extraLibraries.get(i));
       }
 
       // Add any extra classapth URLs
       for (int i = 0; i < extraClasspath.size(); i++)
       {
-         loader.addURL(extraClasspath.get(i));
+         urls.add(extraClasspath.get(i));
       }
+      
+      // Add all boot libs required from $JBOSS_HOME/lib
+      final File bootLibDir = new File(libUrl.toURI());
+      if (!bootLibDir.exists())
+      {
+         throw new IllegalArgumentException("Boot lib directory not found: " + bootLibDir.toString());
+      }
+      if (!bootLibDir.isDirectory())
+      {
+         throw new IllegalArgumentException("Boot lib directory is not a directory: " + bootLibDir.toString());
+      }
+      for (String filename : DEFAULT_BOOT_LIBRARY_LIST)
+      {
+         final File bootLibFile = new File(bootLibDir, filename);
+         if (!bootLibFile.exists())
+         {
+            System.out.println("WARNING: Could not find expected boot lib " + bootLibFile);
+         }
+         final URL bootLibUrl = bootLibFile.toURI().toURL(); 
+         urls.add(bootLibUrl);
+      }
+      
+      // Make a ClassLoader to be used in loading the server
+      final URL[] urlArray = urls.toArray(new URL[]
+      {});
+      final ClassLoader loadingCl = new URLClassLoader(urlArray, tccl);
 
       // Load the server
-      ClassLoader parentCL = Thread.currentThread().getContextClassLoader();
-      server = loader.load(parentCL);
+      server = ServerFactory.createServer(DEFAULT_AS_SERVER_IMPL_CLASS_NAME,loadingCl);
 
-      // Initialize the server
-      server.init(props);
+      // Get out the default configuration
+      JBossASServerConfig config = (JBossASServerConfig) server.getConfiguration();
+      
+      // Set JBOSS_HOME and properties
+      config.properties(props).jbossHome(jbossHome);
+      
+      // Make a shutdown hook
+      SecurityActions.addShutdownHook(new ShutdownHook(server,loadingCl));
 
-      // Start 'er up mate!
-      server.start();
+      try
+      {
+         // Set the CL
+         SecurityActions.setThreadContextClassLoader(loadingCl);
+
+         // Initialize the server
+         server.initialize();
+
+         // Start 'er up mate!
+         server.start();
+      }
+      finally
+      {
+         // Reset the CL 
+         SecurityActions.setThreadContextClassLoader(tccl);
+      }
    }
 
    /**
     * Shutdown the booted Server instance.
     *
     */
-   public void shutdown()
+   public void shutdown() throws Throwable
    {
       server.shutdown();
    }
@@ -270,54 +453,52 @@
       String programName = System.getProperty("program.name", "jboss");
       String sopts = "-:hD:d:p:n:c:Vj::B:L:C:P:b:g:u:m:l:";
       LongOpt[] lopts =
-      {
-         new LongOpt("help", LongOpt.NO_ARGUMENT, null, 'h'),
-         new LongOpt("bootdir", LongOpt.REQUIRED_ARGUMENT, null, 'd'),
-         new LongOpt("patchdir", LongOpt.REQUIRED_ARGUMENT, null, 'p'),
-         new LongOpt("netboot", LongOpt.REQUIRED_ARGUMENT, null, 'n'),
-         new LongOpt("configuration", LongOpt.REQUIRED_ARGUMENT, null, 'c'),
-         new LongOpt("version", LongOpt.NO_ARGUMENT, null, 'V'),
-         new LongOpt("jaxp", LongOpt.REQUIRED_ARGUMENT, null, 'j'),
-         new LongOpt("bootlib", LongOpt.REQUIRED_ARGUMENT, null, 'B'),
-         new LongOpt("library", LongOpt.REQUIRED_ARGUMENT, null, 'L'),
-         new LongOpt("classpath", LongOpt.REQUIRED_ARGUMENT, null, 'C'),
-         new LongOpt("properties", LongOpt.REQUIRED_ARGUMENT, null, 'P'),
-         new LongOpt("host", LongOpt.REQUIRED_ARGUMENT, null, 'b'),
-         new LongOpt("partition", LongOpt.REQUIRED_ARGUMENT, null, 'g'),
-         new LongOpt("udp", LongOpt.REQUIRED_ARGUMENT, null, 'u'),
-         new LongOpt("mcast_port", LongOpt.REQUIRED_ARGUMENT, null, 'm'),
-         new LongOpt("log", LongOpt.REQUIRED_ARGUMENT, null, 'l'),
-      };
+      {new LongOpt("help", LongOpt.NO_ARGUMENT, null, 'h'),
+            new LongOpt("bootdir", LongOpt.REQUIRED_ARGUMENT, null, 'd'),
+            new LongOpt("patchdir", LongOpt.REQUIRED_ARGUMENT, null, 'p'),
+            new LongOpt("netboot", LongOpt.REQUIRED_ARGUMENT, null, 'n'),
+            new LongOpt("configuration", LongOpt.REQUIRED_ARGUMENT, null, 'c'),
+            new LongOpt("version", LongOpt.NO_ARGUMENT, null, 'V'),
+            new LongOpt("jaxp", LongOpt.REQUIRED_ARGUMENT, null, 'j'),
+            new LongOpt("bootlib", LongOpt.REQUIRED_ARGUMENT, null, 'B'),
+            new LongOpt("library", LongOpt.REQUIRED_ARGUMENT, null, 'L'),
+            new LongOpt("classpath", LongOpt.REQUIRED_ARGUMENT, null, 'C'),
+            new LongOpt("properties", LongOpt.REQUIRED_ARGUMENT, null, 'P'),
+            new LongOpt("host", LongOpt.REQUIRED_ARGUMENT, null, 'b'),
+            new LongOpt("partition", LongOpt.REQUIRED_ARGUMENT, null, 'g'),
+            new LongOpt("udp", LongOpt.REQUIRED_ARGUMENT, null, 'u'),
+            new LongOpt("mcast_port", LongOpt.REQUIRED_ARGUMENT, null, 'm'),
+            new LongOpt("log", LongOpt.REQUIRED_ARGUMENT, null, 'l'),};
 
       Getopt getopt = new Getopt(programName, args, sopts, lopts);
       int code;
       String arg;
-      if (System.getProperty(ServerConfig.SERVER_BIND_ADDRESS) == null)
+      final String propKeyJBossasBindAddress = JBossASServerConfig.PROP_KEY_JBOSSAS_BIND_ADDRESS;
+      if (props.get(propKeyJBossasBindAddress) == null)
       {
-         // ServerConfig.SERVER_BIND_ADDRESS could have been defined via 
+         // JBossASServerConfig.PROP_KEY_JBOSSAS_BIND_ADDRESS could have been defined via 
          // run.conf and so we don't wanna override that. 
-         props.setProperty(ServerConfig.SERVER_BIND_ADDRESS, "127.0.0.1");
-         System.setProperty(ServerConfig.SERVER_BIND_ADDRESS, "127.0.0.1");
+         final String defaultBindAddress = "127.0.0.1";
+         props.put(propKeyJBossasBindAddress, defaultBindAddress);
+         System.setProperty(propKeyJBossasBindAddress, defaultBindAddress);
       }
       while ((code = getopt.getopt()) != -1)
       {
          switch (code)
          {
-            case ':':
-            case '?':
+            case ':' :
+            case '?' :
                // for now both of these should exit with error status
                System.exit(1);
                break; // for completeness
 
-            case 1:
+            case 1 :
                // this will catch non-option arguments
                // (which we don't currently care about)
-               System.err.println(programName +
-                                  ": unused non-option argument: " +
-                                  getopt.getOptarg());
+               System.err.println(programName + ": unused non-option argument: " + getopt.getOptarg());
                break; // for completeness
 
-            case 'h':
+            case 'h' :
                // show command line help
                System.out.println("usage: " + programName + " [options]");
                System.out.println();
@@ -326,7 +507,8 @@
                System.out.println("    -V, --version                 Show version information");
                System.out.println("    --                            Stop processing options");
                System.out.println("    -D<name>[=<value>]            Set a system property");
-               System.out.println("    -d, --bootdir=<dir>           Set the boot patch directory; Must be absolute or url");
+               System.out
+                     .println("    -d, --bootdir=<dir>           Set the boot patch directory; Must be absolute or url");
                System.out.println("    -p, --patchdir=<dir>          Set the patch directory; Must be absolute or url");
                System.out.println("    -n, --netboot=<url>           Boot from net with the given url as base");
                System.out.println("    -c, --configuration=<name>    Set the server configuration name");
@@ -343,8 +525,7 @@
                System.exit(0);
                break; // for completeness
 
-            case 'D':
-            {
+            case 'D' : {
                // set a system property
                arg = getopt.getOptarg();
                String name, value;
@@ -377,38 +558,38 @@
                break;
             }
 
-            case 'd':
+            case 'd' :
                // set the boot patch URL
                bootURL = makeURL(getopt.getOptarg());
                break;
 
-            case 'p':
-            {
+            case 'p' : {
                // set the patch URL
                URL patchURL = makeURL(getopt.getOptarg());
-               props.put(ServerConfig.PATCH_URL, patchURL.toString());
+               //TODO
+               //               props.put(ServerConfig.PATCH_URL, patchURL.toString());
 
                break;
             }
 
-            case 'n':
+            case 'n' :
                // set the net boot url
                arg = getopt.getOptarg();
 
                // make sure there is a trailing '/'
-               if (!arg.endsWith("/")) arg += "/";
+               if (!arg.endsWith("/"))
+                  arg += "/";
 
-               props.put(ServerConfig.HOME_URL, new URL(arg).toString());
+               props.put(JBossASServerConfig.PROP_KEY_JBOSSAS_HOME_URL, new URL(arg).toString());
                break;
 
-            case 'c':
+            case 'c' :
                // set the server name
                arg = getopt.getOptarg();
-               props.put(ServerConfig.SERVER_NAME, arg);
+               props.put(JBossASServerConfig.PROP_KEY_JBOSSAS_SERVER_NAME, arg);
                break;
 
-            case 'V':
-            {
+            case 'V' : {
                // Package information for org.jboss
                Package jbossPackage = Package.getPackage("org.jboss");
 
@@ -422,41 +603,40 @@
                break; // for completness
             }
 
-            case 'j':
+            case 'j' :
                // Show an error and exit
                System.err.println(programName + ": option '-j, --jaxp' no longer supported");
                System.exit(1);
                break; // for completness
 
-            case 'B':
+            case 'B' :
                arg = getopt.getOptarg();
-               bootLibraries.add(arg);
+               bootLibraries.add(new File(arg).toURI().toURL());
                break;
 
-            case 'L':
+            case 'L' :
                arg = getopt.getOptarg();
-               extraLibraries.add(arg);
+               extraLibraries.add(new File(arg).toURI().toURL());
                break;
 
-            case 'C':
-            {
+            case 'C' : {
                URL url = makeURL(getopt.getOptarg());
                extraClasspath.add(url);
                break;
             }
 
-            case 'P':
-            {
+            case 'P' : {
                // Set system properties from url/file
                URL url = makeURL(getopt.getOptarg());
                Properties props = System.getProperties();
                props.load(url.openConnection().getInputStream());
                break;
             }
-            case 'b':
+            case 'b' :
                arg = getopt.getOptarg();
-               props.put(ServerConfig.SERVER_BIND_ADDRESS, arg);
-               System.setProperty(ServerConfig.SERVER_BIND_ADDRESS, arg);
+               final String bindAddressPropName = JBossASServerConfig.PROP_KEY_JBOSSAS_BIND_ADDRESS;
+               props.put(bindAddressPropName, arg);
+               System.setProperty(bindAddressPropName, arg);
                // used by JGroups; only set if not set via -D so users
                // can use a different interface for cluster communication
                // There are 2 versions of this property, deprecated bind.address
@@ -475,49 +655,51 @@
                   bindAddress = ServerConfigUtil.fixRemoteAddress(arg);
                   System.setProperty("jgroups.bind_addr", bindAddress);
                }
-               
+
                // Set the java.rmi.server.hostname if not set
                String rmiHost = System.getProperty("java.rmi.server.hostname");
-               if( rmiHost == null )
+               if (rmiHost == null)
                {
                   rmiHost = ServerConfigUtil.fixRemoteAddress(arg);
                   System.setProperty("java.rmi.server.hostname", rmiHost);
                }
                break;
-               
-            case 'g':
+
+            case 'g' :
                arg = getopt.getOptarg();
-               props.put(ServerConfig.PARTITION_NAME_PROPERTY, arg);
-               System.setProperty(ServerConfig.PARTITION_NAME_PROPERTY, arg);
+               final String partitionNamePropName = JBossASServerConfig.PROP_KEY_JBOSSAS_PARTITION_NAME;
+               props.put(partitionNamePropName, arg);
+               System.setProperty(partitionNamePropName, arg);
                break;
-               
-            case 'u':
+
+            case 'u' :
                arg = getopt.getOptarg();
-               props.put(ServerConfig.PARTITION_UDP_PROPERTY, arg);
-               System.setProperty(ServerConfig.PARTITION_UDP_PROPERTY, arg);
+               final String udpGroupPropName = JBossASServerConfig.PROP_KEY_JBOSSAS_PARTITION_UDP_GROUP;
+               props.put(udpGroupPropName, arg);
+               System.setProperty(udpGroupPropName, arg);
                // the new jgroups property name
                System.setProperty("jgroups.udp.mcast_addr", arg);
                break;
-               
-            case 'm':
+
+            case 'm' :
                arg = getopt.getOptarg();
-               props.put(ServerConfig.PARTITION_UDP_PORT_PROPERTY, arg);
-               System.setProperty(ServerConfig.PARTITION_UDP_PORT_PROPERTY, arg);
+               final String udpPortPropName = JBossASServerConfig.PROP_KEY_JBOSSAS_PARTITION_UDP_PORT;
+               props.put(udpPortPropName, arg);
+               System.setProperty(udpPortPropName, arg);
                break;
-               
-            case 'l':
-            {
+
+            case 'l' : {
                arg = getopt.getOptarg();
                String logPlugin = arg;
-               if( arg.equalsIgnoreCase("log4j") )
+               if (arg.equalsIgnoreCase("log4j"))
                   logPlugin = "org.jboss.logging.Log4jLoggerPlugin";
-               else if( arg.equalsIgnoreCase("jdk") )
+               else if (arg.equalsIgnoreCase("jdk"))
                   logPlugin = "org.jboss.logging.jdk.JDK14LoggerPlugin";
                System.setProperty("org.jboss.logging.Logger.pluginClass", logPlugin);
                break;
             }
-            
-            default:
+
+            default :
                // this should not happen,
                // if it does throw an error so we know about it
                throw new Error("unhandled option code: " + code);
@@ -525,12 +707,12 @@
       }
 
       // Fix up other bind addresses
-      String bindAddress = System.getProperty(ServerConfig.SERVER_BIND_ADDRESS);
+      String bindAddress = System.getProperty(JBossASServerConfig.PROP_KEY_JBOSSAS_BIND_ADDRESS);
       if (System.getProperty("java.rmi.server.hostname") == null)
          System.setProperty("java.rmi.server.hostname", bindAddress);
       if (System.getProperty("jgroups.bind_addr") == null)
          System.setProperty("jgroups.bind_addr", bindAddress);
-      
+
       // Enable jboss.vfs.forceCopy by default, if unspecified
       if (System.getProperty("jboss.vfs.forceCopy") == null)
          System.setProperty("jboss.vfs.forceCopy", "true");
@@ -547,22 +729,23 @@
     */
    public static void main(final String[] args) throws Exception
    {
-      Runnable worker = new Runnable() {
-            public void run()
+      Runnable worker = new Runnable()
+      {
+         public void run()
+         {
+            try
             {
-               try
-               {
-                  Main main = new Main();
-                  main.boot(args);
-               }
-               catch (Exception e)
-               {
-                  System.err.println("Failed to boot JBoss:");
-                  e.printStackTrace();
-               }
+               Main main = new Main();
+               main.boot(args);
             }
+            catch (Exception e)
+            {
+               System.err.println("Failed to boot JBoss:");
+               e.printStackTrace();
+            }
+         }
 
-         };
+      };
 
       ThreadGroup threads = new ThreadGroup("jboss");
       new Thread(threads, worker, "main").start();
@@ -587,4 +770,185 @@
          return name.endsWith(".jar");
       }
    }
+
+   /**
+    * ServerConfigUtil
+    * 
+    * Utilities for accessing server configuration
+    * 
+    * @author <a href="mailto:adrian at jboss.org">Adrian Brock</a>
+    * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a> Maintained only
+    * @version $Revision$
+    * @deprecated Moved from jboss-bootstrap Legacy as a transition class; 
+    *   will be removed once we move entirely to a new Main
+    */
+   @Deprecated
+   private static class ServerConfigUtil
+   {
+      /**
+       * Retrieve the default bind address for the server
+       * 
+       * @return the default bind adress
+       */
+      public static String getDefaultBindAddress()
+      {
+         return System.getProperty(JBossASServerConfig.PROP_KEY_JBOSSAS_BIND_ADDRESS);
+      }
+
+      /**
+       * Fix the remote inet address.
+       * 
+       * If we pass the address to the client we don't want to
+       * tell it to connect to 0.0.0.0, use our host name instead
+       * @param address the passed address
+       * @return the fixed address
+       */
+      public static InetAddress fixRemoteAddress(InetAddress address)
+      {
+         try
+         {
+            if (address == null
+                  || InetAddress.getByName(JBossASConfigurationInitializer.VALUE_BIND_ADDRESS_ANY).equals(address))
+               return InetAddress.getLocalHost();
+         }
+         catch (UnknownHostException ignored)
+         {
+         }
+         return address;
+      }
+
+      /**
+       * Fix the remote address.
+       * 
+       * If we pass the address to the client we don't want to
+       * tell it to connect to 0.0.0.0, use our host name instead
+       * @param address the passed address
+       * @return the fixed address
+       */
+      public static String fixRemoteAddress(String address)
+      {
+         try
+         {
+            if (address == null || JBossASConfigurationInitializer.VALUE_BIND_ADDRESS_ANY.equals(address))
+               return InetAddress.getLocalHost().getHostName();
+         }
+         catch (UnknownHostException ignored)
+         {
+         }
+         return address;
+      }
+
+      /**
+       * Get the default partition name
+       * 
+       * @return the default partition name
+       */
+      public static String getDefaultPartitionName()
+      {
+         return System.getProperty(JBossASServerConfig.PROP_KEY_JBOSSAS_PARTITION_NAME,
+               JBossASConfigurationInitializer.VALUE_PARTITION_NAME_DEFAULT);
+      }
+
+   }
+   
+   /**
+    * ShutdownHook
+    *
+    * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+    * @version $Revision$
+    */
+   private static class ShutdownHook extends Thread
+   {
+      
+      /**
+       * Underlying server instance
+       */
+      private Server<?, ?> server;
+      
+      /**
+       * ClassLoader used to start/init the server
+       */
+      private ClassLoader serverCl;
+
+      /**
+       * Constructor
+       * 
+       * @param server
+       * @param serverCl The ClassLoader to be optionally closed upon shutdown
+       * @throws IllegalArgumentException If any argument is not supplied (null)
+       */
+      ShutdownHook(final Server<?, ?> server,final ClassLoader serverCl) throws IllegalArgumentException
+      {
+         // Precondition checks
+         if(server==null)
+         {
+            throw new IllegalArgumentException("server must be specified");
+         }
+         if(serverCl==null)
+         {
+            throw new IllegalArgumentException("server ClassLoader must be specified");
+         }
+         
+         // Set properties
+         this.server = server;
+         this.serverCl = serverCl;
+      }
+
+      /**
+       * Shuts down the server if running
+       */
+      @Override
+      public void run()
+      {
+         // If we have a server
+         if (server != null)
+         {
+            // Log out
+            System.out.println("Posting Shutdown Request to the server...");
+
+            // If we're started or starting
+            final LifecycleState currentState = server.getState();
+            if (currentState.equals(LifecycleState.STARTED) || currentState.equals(LifecycleState.STARTING))
+            {
+               // start in new thread to give positive
+               // feedback to requesting client of success.
+               new Thread()
+               {
+                  public void run()
+                  {
+                     try
+                     {
+                        // just run the hook, don't call System.exit, as we may
+                        // be embeded in a vm that would not like that very much
+                        server.shutdown();
+                        
+                        /*
+                         * Close the Loading CL, if URLCL and JDK7+
+                         * JBBOOT-23
+                         */
+                        if (serverCl != null && serverCl instanceof Closeable)
+                        {
+                           try
+                           {
+                              ((Closeable) serverCl).close();
+                           }
+                           catch (IOException ioe)
+                           {
+                              // Swallow
+                           }
+                        }
+                     }
+                     // In case of any Exception thrown up the chain, let us know
+                     catch (final Exception e)
+                     {
+                        throw new RuntimeException("Exception encountered in shutting down the server", e);
+                     }
+                  }
+               }.start();
+            }
+
+         }         
+      }
+   }
+
 }

Copied: branches/Branch_5_x/main/src/main/org/jboss/SecurityActions.java (from rev 89343, branches/Branch_5_x_BootstrapLegacyRemoval/main/src/main/org/jboss/SecurityActions.java)
===================================================================
--- branches/Branch_5_x/main/src/main/org/jboss/SecurityActions.java	                        (rev 0)
+++ branches/Branch_5_x/main/src/main/org/jboss/SecurityActions.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -0,0 +1,149 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+/**
+ * SecurityActions
+ * 
+ * Collection of tasks to be run under a security manager, 
+ * package-private so we don't leak out.
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+class SecurityActions
+{
+
+   //-------------------------------------------------------------------------------||
+   // Constructor ------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------||
+
+   /**
+    * No external instanciation
+    */
+   private SecurityActions()
+   {
+
+   }
+
+   //-------------------------------------------------------------------------------||
+   // Utility Methods --------------------------------------------------------------||
+   //-------------------------------------------------------------------------------||
+
+   /**
+    * Sets the specified property with key and value
+    */
+   static void setSystemProperty(final String key, final String value)
+   {
+      AccessController.doPrivileged(new PrivilegedAction<Void>()
+      {
+         public Void run()
+         {
+            System.setProperty(key, value);
+            return null;
+         }
+      });
+   }
+
+   /**
+    * Obtains the system property with the specified key
+    * 
+    * @param key
+    * @return
+    * @throws IllegalArgumentException If the key is null
+    */
+   static String getSystemProperty(final String key) throws IllegalArgumentException
+   {
+      // Precondition check
+      if (key == null)
+      {
+         throw new IllegalArgumentException("key was null");
+      }
+
+      // Get sysprop
+      return AccessController.doPrivileged(new PrivilegedAction<String>()
+      {
+         public String run()
+         {
+            return System.getProperty(key);
+         }
+      });
+   }
+
+   /**
+    * Obtains the Thread Context ClassLoader
+    */
+   static ClassLoader getThreadContextClassLoader()
+   {
+      return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
+      {
+         public ClassLoader run()
+         {
+            return Thread.currentThread().getContextClassLoader();
+         }
+      });
+   }
+
+   /**
+    * Sets the specified CL upon the current Thread's Context 
+    * 
+    * @param cl
+    * @throws IllegalArgumentException If the CL was null
+    */
+   static void setThreadContextClassLoader(final ClassLoader cl) throws IllegalArgumentException
+   {
+      if (cl == null)
+      {
+         throw new IllegalArgumentException("ClassLoader was null");
+      }
+
+      AccessController.doPrivileged(new PrivilegedAction<Void>()
+      {
+         public Void run()
+         {
+            Thread.currentThread().setContextClassLoader(cl);
+            return null;
+         };
+      });
+   }
+
+   /**
+    * Adds the specified shutdown hook
+    * 
+    * @param shutdownHook
+    */
+   static void addShutdownHook(final Thread shutdownHook)
+   {
+      AccessController.doPrivileged(new PrivilegedAction<Void>()
+      {
+         public Void run()
+         {
+            Runtime.getRuntime().addShutdownHook(shutdownHook);
+            return null;
+         }
+      });
+
+   }
+}

Modified: branches/Branch_5_x/main/src/resources/log4j-debug.properties
===================================================================
--- branches/Branch_5_x/main/src/resources/log4j-debug.properties	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/main/src/resources/log4j-debug.properties	2009-05-24 09:27:07 UTC (rev 89345)
@@ -10,7 +10,7 @@
 
 ### A bootstrap file appender
 log4j.appender.FILE=org.jboss.logging.appender.FileAppender
-log4j.appender.FILE.File=${jboss.server.log.dir}/boot.log
+log4j.appender.FILE.File=${jboss.boot.server.log.dir}/boot.log
 log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
 log4j.appender.FILE.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}] %m%n
 log4j.appender.FILE.Append=false

Modified: branches/Branch_5_x/main/src/resources/log4j-trace.properties
===================================================================
--- branches/Branch_5_x/main/src/resources/log4j-trace.properties	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/main/src/resources/log4j-trace.properties	2009-05-24 09:27:07 UTC (rev 89345)
@@ -10,7 +10,7 @@
 
 ### A bootstrap file appender
 log4j.appender.FILE=org.jboss.logging.appender.FileAppender
-log4j.appender.FILE.File=${jboss.server.log.dir}/boot.log
+log4j.appender.FILE.File=${jboss.boot.server.log.dir}/boot.log
 log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
 log4j.appender.FILE.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}] %m%n
 log4j.appender.FILE.Append=false

Modified: branches/Branch_5_x/main/src/resources/log4j.properties
===================================================================
--- branches/Branch_5_x/main/src/resources/log4j.properties	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/main/src/resources/log4j.properties	2009-05-24 09:27:07 UTC (rev 89345)
@@ -10,7 +10,7 @@
 
 ### A bootstrap file appender
 log4j.appender.FILE=org.jboss.logging.appender.FileAppender
-log4j.appender.FILE.File=${jboss.server.log.dir}/boot.log
+log4j.appender.FILE.File=${jboss.boot.server.log.dir}/boot.log
 log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
 log4j.appender.FILE.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}] %m%n
 log4j.appender.FILE.Append=false

Modified: branches/Branch_5_x/management/.classpath
===================================================================
--- branches/Branch_5_x/management/.classpath	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/management/.classpath	2009-05-24 09:27:07 UTC (rev 89345)
@@ -5,6 +5,8 @@
 	<classpathentry exported="true" kind="src" path="/cluster"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-kernel.jar" sourcepath="/thirdparty/jboss/microcontainer/lib/jboss-kernel-sources.jar"/>
-	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap/lib/jboss-bootstrap.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap-spi/lib/jboss-bootstrap-spi.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap-spi-as/lib/jboss-bootstrap-spi-as.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap-spi-mc/lib/jboss-bootstrap-spi-mc.jar"/>
 	<classpathentry kind="output" path="output/eclipse-classes"/>
 </classpath>

Modified: branches/Branch_5_x/management/build.xml
===================================================================
--- branches/Branch_5_x/management/build.xml	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/management/build.xml	2009-05-24 09:27:07 UTC (rev 89345)
@@ -112,7 +112,9 @@
       <path refid="jboss.cluster.classpath"/>
       <path refid="jboss.jca.classpath"/>
       <path refid="jboss.server.classpath"/>
-      <path refid="jboss.jboss.bootstrap.classpath"/>
+      <path refid="jboss.jboss.bootstrap.spi.as.classpath"/>
+    	<path refid="jboss.jboss.bootstrap.spi.mc.classpath"/>
+    	<path refid="jboss.jboss.bootstrap.spi.classpath"/>
       <path refid="jboss.system.classpath"/>
       <path refid="jboss.systemjmx.classpath"/>
       <path refid="jboss.j2se.classpath"/>

Modified: branches/Branch_5_x/management/pom.xml
===================================================================
--- branches/Branch_5_x/management/pom.xml	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/management/pom.xml	2009-05-24 09:27:07 UTC (rev 89345)
@@ -105,7 +105,7 @@
     </dependency>
     <dependency>
       <groupId>org.jboss.bootstrap</groupId>
-      <artifactId>jboss-bootstrap</artifactId>
+      <artifactId>jboss-bootstrap-impl-as</artifactId>
     </dependency>
     <dependency>
       <groupId>oswego-concurrent</groupId>

Modified: branches/Branch_5_x/management/src/main/org/jboss/management/j2ee/cluster/HAManagementService.java
===================================================================
--- branches/Branch_5_x/management/src/main/org/jboss/management/j2ee/cluster/HAManagementService.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/management/src/main/org/jboss/management/j2ee/cluster/HAManagementService.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -45,7 +45,7 @@
 import javax.management.QueryExp;
 import javax.management.ReflectionException;
 
-import org.jboss.bootstrap.spi.util.ServerConfigUtil;
+import org.jboss.bootstrap.spi.as.config.JBossASConfigurationInitializer;
 import org.jboss.ha.framework.interfaces.HAPartition;
 import org.jboss.management.j2ee.J2EEDomain;
 import org.jboss.mx.util.ObjectNameFactory;
@@ -79,7 +79,7 @@
    
    private ObjectName mHAManagementName;
    private ObjectName mClusterPartitionName;
-   private String mBackgroundPartition = ServerConfigUtil.getDefaultPartitionName();
+   private String mBackgroundPartition = JBossASConfigurationInitializer.VALUE_PARTITION_NAME_DEFAULT;
    private HAPartition mPartition;
    
    // Static --------------------------------------------------------

Modified: branches/Branch_5_x/profileservice/src/resources/hdscanner-jboss-beans.xml
===================================================================
--- branches/Branch_5_x/profileservice/src/resources/hdscanner-jboss-beans.xml	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/profileservice/src/resources/hdscanner-jboss-beans.xml	2009-05-24 09:27:07 UTC (rev 89345)
@@ -19,7 +19,7 @@
       <constructor>
         <parameter><inject bean="ProfileServiceDeploymentRepositoryAdapter"/></parameter>
       </constructor>
-      <property name="serverConfig"><inject bean="JBossServer" property="config"/></property>
+      <property name="serverConfig"><inject bean="JBossServer" property="configuration"/></property>
     </bean>
 
     <bean name="ProfileServiceDeploymentRepositoryAdapter" class="org.jboss.system.tools.ProfileServiceDeploymentRepositoryAdapter">

Modified: branches/Branch_5_x/server/.classpath
===================================================================
--- branches/Branch_5_x/server/.classpath	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/server/.classpath	2009-05-24 09:27:07 UTC (rev 89345)
@@ -21,8 +21,9 @@
 	<classpathentry kind="lib" path="/thirdparty/jboss/web/lib/servlet-api.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-dependency.jar" sourcepath="/thirdparty/jboss/microcontainer/lib/jboss-dependency-sources.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-kernel.jar" sourcepath="/thirdparty/jboss/microcontainer/lib/jboss-kernel-sources.jar"/>
-	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap/lib/jboss-bootstrap.jar"/>
-	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-man/lib/jboss-managed.jar" sourcepath="/thirdparty/jboss/jboss-man/lib/jboss-managed-sources.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap-spi/lib/jboss-bootstrap-spi.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap-spi-as/lib/jboss-bootstrap-spi-as.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap-spi-mc/lib/jboss-bootstrap-spi-mc.jar"/><classpathentry kind="lib" path="/thirdparty/jboss/jboss-man/lib/jboss-managed.jar" sourcepath="/thirdparty/jboss/jboss-man/lib/jboss-managed-sources.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-man/lib/jboss-metatype.jar" sourcepath="/thirdparty/jboss/jboss-man/lib/jboss-metatype-sources.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-mdr/lib/jboss-mdr.jar" sourcepath="/thirdparty/jboss/jboss-mdr/lib/jboss-mdr-sources.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/jbossts/lib/jbossjts-integration.jar"/>

Modified: branches/Branch_5_x/server/build.xml
===================================================================
--- branches/Branch_5_x/server/build.xml	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/server/build.xml	2009-05-24 09:27:07 UTC (rev 89345)
@@ -115,7 +115,9 @@
       <path refid="jboss.common.logging.spi.classpath"/>
       <path refid="jboss.common.logging.log4j.classpath"/>
       <path refid="jboss.common.logging.jdk.classpath"/>
-      <path refid="jboss.jboss.bootstrap.classpath"/>
+      <path refid="jboss.jboss.bootstrap.spi.as.classpath"/>
+      <path refid="jboss.jboss.bootstrap.spi.mc.classpath"/>
+      <path refid="jboss.jboss.bootstrap.spi.classpath"/>
       <path refid="jboss.system.classpath"/>
       <path refid="jboss.systemjmx.classpath"/>
       <path refid="jboss.j2se.classpath"/>
@@ -504,12 +506,12 @@
       </fileset>
     </jar>
 
-    <!-- Inflate out contents of the Bootstrap JAR into a Temp Directory -->
+    <!-- Inflate out contents of the Bootstrap SPIs into a Temp Directory -->
      <property name="inflated.dir" value="tmp-bootstrap" />
      <mkdir dir="${inflated.dir}"/>
      <unjar dest="${inflated.dir}">
-       <fileset dir="${jboss.jboss.bootstrap.lib}">
-         <include name="jboss-bootstrap.jar"/>
+       <fileset dir="${jboss.jboss.bootstrap.spi.lib}">
+         <include name="jboss-bootstrap-spi.jar"/>
        </fileset>
      </unjar>
     
@@ -524,10 +526,7 @@
       </fileset>
       <!-- Add some classes from Bootstrap -->
        <fileset dir="${inflated.dir}">
-          <include name="org/jboss/bootstrap/spi/Server.class"/>
-          <include name="org/jboss/bootstrap/spi/ServerConfig.class"/>
-       	  <include name="org/jboss/bootstrap/spi/ServerProcess.class"/>
-          <include name="org/jboss/bootstrap/spi/util/ServerConfigUtil.class"/>
+          <include name="org/jboss/bootstrap/spi/**/*.class"/>
        </fileset>
 
       <!-- Include getopt -->

Modified: branches/Branch_5_x/server/pom.xml
===================================================================
--- branches/Branch_5_x/server/pom.xml	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/server/pom.xml	2009-05-24 09:27:07 UTC (rev 89345)
@@ -177,7 +177,7 @@
     
     <dependency>
       <groupId>org.jboss.bootstrap</groupId>
-      <artifactId>jboss-bootstrap</artifactId>
+      <artifactId>jboss-bootstrap-impl-as</artifactId>
     </dependency>
     
     <dependency>

Modified: branches/Branch_5_x/server/src/etc/conf/all/bootstrap/profile.xml
===================================================================
--- branches/Branch_5_x/server/src/etc/conf/all/bootstrap/profile.xml	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/server/src/etc/conf/all/bootstrap/profile.xml	2009-05-24 09:27:07 UTC (rev 89345)
@@ -151,7 +151,7 @@
          <!-- Here we use the constructor version that takes the Server impl and 
               uses it to find the data dir. You could alternatively use a version 
               that takes a URI or a File. -->
-         <parameter class="org.jboss.bootstrap.spi.Server"><inject bean="JBossServer"/></parameter>
+         <parameter class="org.jboss.bootstrap.spi.as.server.JBossASServer"><inject bean="JBossServer"/></parameter>
       </constructor>
    </bean>
          

Modified: branches/Branch_5_x/server/src/etc/conf/all/xmdesc/NamingProviderURLWriter-xmbean.xml
===================================================================
--- branches/Branch_5_x/server/src/etc/conf/all/xmdesc/NamingProviderURLWriter-xmbean.xml	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/server/src/etc/conf/all/xmdesc/NamingProviderURLWriter-xmbean.xml	2009-05-24 09:27:07 UTC (rev 89345)
@@ -31,7 +31,7 @@
    <attribute access="write-only" setMethod="setServer">
        <description>Server object from which the OutputDirURL can be obtained if not directly configured</description>
        <name>Server</name>
-       <type>org.jboss.bootstrap.spi.Server</type>
+       <type>org.jboss.bootstrap.spi.as.server.JBossASServer</type>
    </attribute>
    
    <attribute access="read-write" getMethod="getBootstrapURL" setMethod="setBootstrapURL">

Modified: branches/Branch_5_x/server/src/main/org/jboss/Shutdown.java
===================================================================
--- branches/Branch_5_x/server/src/main/org/jboss/Shutdown.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/server/src/main/org/jboss/Shutdown.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -21,27 +21,25 @@
  */
 package org.jboss;
 
+import gnu.getopt.Getopt;
+import gnu.getopt.LongOpt;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Method;
 import java.lang.reflect.Proxy;
 import java.lang.reflect.UndeclaredThrowableException;
-import java.util.Hashtable;
 import java.util.ArrayList;
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
+import java.util.Hashtable;
+
 import javax.management.MBeanServerConnection;
 import javax.management.ObjectName;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 
-
-import gnu.getopt.Getopt;
-import gnu.getopt.LongOpt;
-
-import org.jboss.bootstrap.spi.Server;
-import org.jboss.bootstrap.spi.ServerProcess;
+import org.jboss.bootstrap.spi.server.Server;
 import org.jboss.naming.HttpNamingContextFactory;
-import org.jboss.system.server.ServerImplMBean;
 import org.jboss.security.SecurityAssociation;
 import org.jboss.security.SimplePrincipal;
 import org.jnp.interfaces.NamingContext;
@@ -80,8 +78,6 @@
       System.out.println();
       System.out.println("operations:");
       System.out.println("    -S, --shutdown            Shutdown the server");
-      System.out.println("    -e, --exit=<code>         Force the VM to exit with a status code");
-      System.out.println("    -H, --halt=<code>         Force the VM to halt with a status code");
       System.out.println();
    }
 
@@ -93,7 +89,7 @@
          System.exit(0);
       }
       
-      String sopts = "-:hD:s:n:a:u:p:Se:H:";
+      String sopts = "-:hD:s:n:a:u:p:S";
       LongOpt[] lopts =
       {
          new LongOpt("help", LongOpt.NO_ARGUMENT, null, 'h'),
@@ -101,8 +97,6 @@
          new LongOpt("adapter", LongOpt.REQUIRED_ARGUMENT, null, 'a'),
          new LongOpt("serverName", LongOpt.REQUIRED_ARGUMENT, null, 'n'),
          new LongOpt("shutdown", LongOpt.NO_ARGUMENT, null, 'S'),
-         new LongOpt("exit", LongOpt.REQUIRED_ARGUMENT, null, 'e'),
-         new LongOpt("halt", LongOpt.REQUIRED_ARGUMENT, null, 'H'),
          new LongOpt("user", LongOpt.REQUIRED_ARGUMENT, null, 'u'),
          new LongOpt("password", LongOpt.REQUIRED_ARGUMENT, null, 'p'),
       };
@@ -115,10 +109,7 @@
       String adapterName = "jmx/rmi/RMIAdaptor";
       String username = null;
       String password = null;
-      ObjectName serverJMXName = ServerImplMBean.OBJECT_NAME;
-      boolean exit = false;
-      boolean halt = false;
-      int exitcode = -1;
+      ObjectName serverJMXName = new ObjectName("jboss.system:type=Server");
 
       while ((code = getopt.getopt()) != -1)
       {
@@ -179,14 +170,6 @@
                password = getopt.getOptarg();
                SecurityAssociation.setCredential(password);
                break;
-            case 'e':
-               exitcode = Integer.parseInt(getopt.getOptarg());
-               exit = true;
-               break;
-            case 'H':
-               exitcode = Integer.parseInt(getopt.getOptarg());
-               halt = true;
-               break;
          }
       }
       
@@ -225,22 +208,11 @@
 
       MBeanServerConnection adaptor = (MBeanServerConnection) obj;
       ServerProxyHandler handler = new ServerProxyHandler(adaptor, serverJMXName);
-      Class<?>[] ifaces = {ServerProcess.class};
+      Class<?>[] ifaces = {Server.class};
       ClassLoader tcl = Thread.currentThread().getContextClassLoader();
-      ServerProcess server = (ServerProcess) Proxy.newProxyInstance(tcl, ifaces, handler);
-
-      if (exit)
-      {
-         server.exit(exitcode);
-      }
-      else if (halt)
-      {
-         server.halt(exitcode);
-      }
-      else
-      {
-         server.shutdown();
-      }
+      Server<?,?> server = (Server<?,?>) Proxy.newProxyInstance(tcl, ifaces, handler);
+      server.shutdown();
+      
       System.out.println("Shutdown message has been posted to the server.");
       System.out.println("Server shutdown may take a while - check logfiles for completion");
    }

Copied: branches/Branch_5_x/server/src/main/org/jboss/config (from rev 89343, branches/Branch_5_x_BootstrapLegacyRemoval/server/src/main/org/jboss/config)

Deleted: branches/Branch_5_x/server/src/main/org/jboss/config/ServerConfigUtil.java
===================================================================
--- branches/Branch_5_x_BootstrapLegacyRemoval/server/src/main/org/jboss/config/ServerConfigUtil.java	2009-05-23 19:53:49 UTC (rev 89343)
+++ branches/Branch_5_x/server/src/main/org/jboss/config/ServerConfigUtil.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -1,131 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, 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.config;
-
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-
-import org.jboss.bootstrap.spi.as.config.JBossASConfigurationInitializer;
-import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
-
-/**
- * ServerConfigUtil
- * 
- * Utilities for accessing server configuration.  Moved from 
- * legacy bootstrap implementation and preserved to protect
- * legacy, working code from being disturbed.
- *
- * @author <a href="mailto:adrian at jboss.org">Adrian Brock</a>
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a> Maintain only
- * @version $Revision: $
- */
-public final class ServerConfigUtil
-{
-   /**
-    * Private constructor
-    */
-   private ServerConfigUtil()
-   {
-      // No external instances
-   }
-
-   /**
-    * Retrieve the default bind address, but only if it is specific
-    * 
-    * @return the specific bind address
-    */
-   public static String getSpecificBindAddress()
-   {
-      String address = System.getProperty(JBossASServerConfig.PROP_KEY_JBOSSAS_BIND_ADDRESS);
-      if (address == null || address.equals(JBossASConfigurationInitializer.VALUE_BIND_ADDRESS_ANY))
-         return null;
-      return address;
-   }
-
-   /**
-    * Fix the remote inet address.
-    * 
-    * If we pass the address to the client we don't want to
-    * tell it to connect to 0.0.0.0, use our host name instead
-    * @param address the passed address
-    * @return the fixed address
-    */
-   public static InetAddress fixRemoteAddress(InetAddress address)
-   {
-      try
-      {
-         if (address == null
-               || InetAddress.getByName(JBossASConfigurationInitializer.VALUE_BIND_ADDRESS_ANY).equals(address))
-            return InetAddress.getLocalHost();
-      }
-      catch (UnknownHostException ignored)
-      {
-      }
-      return address;
-   }
-
-   /**
-    * Fix the remote address.
-    * 
-    * If we pass the address to the client we don't want to
-    * tell it to connect to 0.0.0.0, use our host name instead
-    * @param address the passed address
-    * @return the fixed address
-    */
-   public static String fixRemoteAddress(String address)
-   {
-      try
-      {
-         if (address == null || JBossASConfigurationInitializer.VALUE_BIND_ADDRESS_ANY.equals(address))
-            return InetAddress.getLocalHost().getHostName();
-      }
-      catch (UnknownHostException ignored)
-      {
-      }
-      return address;
-   }
-   
-   /**
-    * Utility to get a shortened url relative to the server home if possible
-    * 
-    * @param longUrl
-    * @return the short url
-    */
-   public static String shortUrlFromServerHome(String longUrl)
-   {
-      String serverHomeUrl = System.getProperty(JBossASServerConfig.PROP_KEY_JBOSSAS_HOME_URL);
-
-      if (longUrl == null || serverHomeUrl == null)
-          return longUrl;
-
-      if (longUrl.startsWith(serverHomeUrl))
-        return ".../" + longUrl.substring(serverHomeUrl.length());
-      else
-      {
-         String jarServerHomeUrl = "jar:" + serverHomeUrl;
-         if (longUrl.startsWith(jarServerHomeUrl))
-            return ".../" + longUrl.substring(jarServerHomeUrl.length());
-         else
-            return longUrl;
-      }
-   }
-}

Copied: branches/Branch_5_x/server/src/main/org/jboss/config/ServerConfigUtil.java (from rev 89343, branches/Branch_5_x_BootstrapLegacyRemoval/server/src/main/org/jboss/config/ServerConfigUtil.java)
===================================================================
--- branches/Branch_5_x/server/src/main/org/jboss/config/ServerConfigUtil.java	                        (rev 0)
+++ branches/Branch_5_x/server/src/main/org/jboss/config/ServerConfigUtil.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -0,0 +1,131 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.config;
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
+import org.jboss.bootstrap.spi.as.config.JBossASConfigurationInitializer;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
+
+/**
+ * ServerConfigUtil
+ * 
+ * Utilities for accessing server configuration.  Moved from 
+ * legacy bootstrap implementation and preserved to protect
+ * legacy, working code from being disturbed.
+ *
+ * @author <a href="mailto:adrian at jboss.org">Adrian Brock</a>
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a> Maintain only
+ * @version $Revision: $
+ */
+public final class ServerConfigUtil
+{
+   /**
+    * Private constructor
+    */
+   private ServerConfigUtil()
+   {
+      // No external instances
+   }
+
+   /**
+    * Retrieve the default bind address, but only if it is specific
+    * 
+    * @return the specific bind address
+    */
+   public static String getSpecificBindAddress()
+   {
+      String address = System.getProperty(JBossASServerConfig.PROP_KEY_JBOSSAS_BIND_ADDRESS);
+      if (address == null || address.equals(JBossASConfigurationInitializer.VALUE_BIND_ADDRESS_ANY))
+         return null;
+      return address;
+   }
+
+   /**
+    * Fix the remote inet address.
+    * 
+    * If we pass the address to the client we don't want to
+    * tell it to connect to 0.0.0.0, use our host name instead
+    * @param address the passed address
+    * @return the fixed address
+    */
+   public static InetAddress fixRemoteAddress(InetAddress address)
+   {
+      try
+      {
+         if (address == null
+               || InetAddress.getByName(JBossASConfigurationInitializer.VALUE_BIND_ADDRESS_ANY).equals(address))
+            return InetAddress.getLocalHost();
+      }
+      catch (UnknownHostException ignored)
+      {
+      }
+      return address;
+   }
+
+   /**
+    * Fix the remote address.
+    * 
+    * If we pass the address to the client we don't want to
+    * tell it to connect to 0.0.0.0, use our host name instead
+    * @param address the passed address
+    * @return the fixed address
+    */
+   public static String fixRemoteAddress(String address)
+   {
+      try
+      {
+         if (address == null || JBossASConfigurationInitializer.VALUE_BIND_ADDRESS_ANY.equals(address))
+            return InetAddress.getLocalHost().getHostName();
+      }
+      catch (UnknownHostException ignored)
+      {
+      }
+      return address;
+   }
+   
+   /**
+    * Utility to get a shortened url relative to the server home if possible
+    * 
+    * @param longUrl
+    * @return the short url
+    */
+   public static String shortUrlFromServerHome(String longUrl)
+   {
+      String serverHomeUrl = System.getProperty(JBossASServerConfig.PROP_KEY_JBOSSAS_HOME_URL);
+
+      if (longUrl == null || serverHomeUrl == null)
+          return longUrl;
+
+      if (longUrl.startsWith(serverHomeUrl))
+        return ".../" + longUrl.substring(serverHomeUrl.length());
+      else
+      {
+         String jarServerHomeUrl = "jar:" + serverHomeUrl;
+         if (longUrl.startsWith(jarServerHomeUrl))
+            return ".../" + longUrl.substring(jarServerHomeUrl.length());
+         else
+            return longUrl;
+      }
+   }
+}

Modified: branches/Branch_5_x/server/src/main/org/jboss/deployment/JBossEjbParsingDeployer.java
===================================================================
--- branches/Branch_5_x/server/src/main/org/jboss/deployment/JBossEjbParsingDeployer.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/server/src/main/org/jboss/deployment/JBossEjbParsingDeployer.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -23,7 +23,7 @@
 
 import java.net.URL;
 
-import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
 import org.jboss.deployers.spi.DeploymentException;
 import org.jboss.deployers.structure.spi.DeploymentUnit;
 import org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer;
@@ -121,11 +121,12 @@
             if(standardJBossXmlPath == null)
             {
                // Use default server conf/standardjboss.xml location
-               String configPath = System.getProperty(ServerConfig.SERVER_CONFIG_URL);
+               final String configUrlProp = JBossASServerConfig.PROP_KEY_JBOSSAS_SERVER_CONF_URL;
+               String configPath = System.getProperty(configUrlProp);
                if(configPath == null )
                {
                   if(ignoreMissingStandardJBossXml == false)
-                     throw new DeploymentException("standardjboss.xml not specified and "+ServerConfig.SERVER_CONFIG_URL+" does not exist");
+                     throw new DeploymentException("standardjboss.xml not specified and "+configUrlProp+" does not exist");
                   return null;
                }
                URL configUrl = new URL(configPath);

Modified: branches/Branch_5_x/server/src/main/org/jboss/ejb/plugins/CMPFilePersistenceManager.java
===================================================================
--- branches/Branch_5_x/server/src/main/org/jboss/ejb/plugins/CMPFilePersistenceManager.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/server/src/main/org/jboss/ejb/plugins/CMPFilePersistenceManager.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -195,7 +195,7 @@
       String ejbName = con.getBeanMetaData().getEjbName();
 
       // Get the system data directory
-      File dir = ServerConfigLocator.locate().getServerDataDir();
+      File dir = new File(ServerConfigLocator.locate().getServerDataLocation().toURI());
 
       //
       // jason: may have to use a generated token from container config

Modified: branches/Branch_5_x/server/src/main/org/jboss/ejb/plugins/StatefulSessionFilePersistenceManager.java
===================================================================
--- branches/Branch_5_x/server/src/main/org/jboss/ejb/plugins/StatefulSessionFilePersistenceManager.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/server/src/main/org/jboss/ejb/plugins/StatefulSessionFilePersistenceManager.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -192,7 +192,7 @@
       String ejbName = con.getBeanMetaData().getEjbName();
 
       // Get the system data directory
-      File dir = ServerConfigLocator.locate().getServerTempDir();
+      File dir = new File(ServerConfigLocator.locate().getServerTempLocation().toURI());
 
       // Setup the reference to the session data store directory
       dir = new File(dir, storeDirName);

Modified: branches/Branch_5_x/server/src/main/org/jboss/invocation/http/server/HttpInvoker.java
===================================================================
--- branches/Branch_5_x/server/src/main/org/jboss/invocation/http/server/HttpInvoker.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/server/src/main/org/jboss/invocation/http/server/HttpInvoker.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -23,6 +23,7 @@
 
 import java.net.InetAddress;
 import java.net.UnknownHostException;
+
 import javax.management.MBeanException;
 import javax.management.ObjectName;
 import javax.management.RuntimeMBeanException;
@@ -31,7 +32,8 @@
 import javax.naming.NamingException;
 import javax.transaction.Transaction;
 
-import org.jboss.bootstrap.spi.util.ServerConfigUtil;
+import org.jboss.bootstrap.spi.as.config.JBossASConfigurationInitializer;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
 import org.jboss.invocation.Invocation;
 import org.jboss.invocation.Invoker;
 import org.jboss.invocation.MarshalledInvocation;
@@ -203,7 +205,7 @@
       {
          InetAddress addr = InetAddress.getLocalHost();
          // First check for a global bind address
-         String host = ServerConfigUtil.getSpecificBindAddress();
+         String host = getSpecificBindAddress();
          if( host == null )
          {
             host = useHostName ? addr.getHostName() : addr.getHostAddress();
@@ -212,5 +214,18 @@
          setInvokerURL(url);
       }
    }
+   
+   /**
+    * Retrieve the default bind address, but only if it is specific
+    * 
+    * @return the specific bind address
+    */
+   protected static String getSpecificBindAddress()
+   {
+      String address = System.getProperty(JBossASServerConfig.PROP_KEY_JBOSSAS_BIND_ADDRESS);
+      if (address == null || address.equals(JBossASConfigurationInitializer.VALUE_BIND_ADDRESS_ANY))
+         return null;
+      return address;
+   }
 }
 

Modified: branches/Branch_5_x/server/src/main/org/jboss/invocation/http/server/HttpProxyFactory.java
===================================================================
--- branches/Branch_5_x/server/src/main/org/jboss/invocation/http/server/HttpProxyFactory.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/server/src/main/org/jboss/invocation/http/server/HttpProxyFactory.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -25,20 +25,21 @@
 import java.net.UnknownHostException;
 import java.util.ArrayList;
 import java.util.Iterator;
+
 import javax.management.ObjectName;
 import javax.naming.InitialContext;
 
-import org.jboss.bootstrap.spi.util.ServerConfigUtil;
+import org.jboss.config.ServerConfigUtil;
 import org.jboss.invocation.Invoker;
 import org.jboss.invocation.InvokerInterceptor;
+import org.jboss.invocation.http.interfaces.ClientMethodInterceptor;
 import org.jboss.invocation.http.interfaces.HttpInvokerProxy;
-import org.jboss.invocation.http.interfaces.ClientMethodInterceptor;
+import org.jboss.metadata.MetaData;
 import org.jboss.naming.Util;
 import org.jboss.proxy.GenericProxyFactory;
 import org.jboss.system.Registry;
 import org.jboss.system.ServiceMBeanSupport;
 import org.jboss.util.StringPropertyReplacer;
-import org.jboss.metadata.MetaData;
 import org.w3c.dom.Element;
 
 /** Create an interface proxy that uses HTTP to communicate with the server

Modified: branches/Branch_5_x/server/src/main/org/jboss/invocation/pooled/server/PooledInvoker.java
===================================================================
--- branches/Branch_5_x/server/src/main/org/jboss/invocation/pooled/server/PooledInvoker.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/server/src/main/org/jboss/invocation/pooled/server/PooledInvoker.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -21,37 +21,38 @@
  */
 package org.jboss.invocation.pooled.server;
 
+import java.lang.reflect.Method;
 import java.net.InetAddress;
 import java.net.ServerSocket;
 import java.net.Socket;
 import java.net.UnknownHostException;
-import java.util.LinkedList;
-import java.security.PrivilegedExceptionAction;
+import java.rmi.NoSuchObjectException;
 import java.security.AccessController;
 import java.security.PrivilegedActionException;
-import java.lang.reflect.Method;
-import java.rmi.NoSuchObjectException;
+import java.security.PrivilegedExceptionAction;
+import java.util.LinkedList;
+
 import javax.management.ObjectName;
 import javax.naming.InitialContext;
+import javax.net.ServerSocketFactory;
+import javax.net.SocketFactory;
 import javax.transaction.Transaction;
 import javax.transaction.TransactionManager;
-import javax.net.SocketFactory;
-import javax.net.ServerSocketFactory;
 
-import org.jboss.bootstrap.spi.util.ServerConfigUtil;
+import org.jboss.config.ServerConfigUtil;
 import org.jboss.invocation.Invocation;
 import org.jboss.invocation.pooled.interfaces.PooledInvokerProxy;
+import org.jboss.invocation.pooled.interfaces.PooledMarshalledInvocation;
 import org.jboss.invocation.pooled.interfaces.ServerAddress;
-import org.jboss.invocation.pooled.interfaces.PooledMarshalledInvocation;
 import org.jboss.logging.Logger;
+import org.jboss.net.sockets.DefaultSocketFactory;
 import org.jboss.proxy.TransactionInterceptor;
+import org.jboss.security.SecurityDomain;
 import org.jboss.system.Registry;
 import org.jboss.system.ServiceMBeanSupport;
 import org.jboss.tm.TransactionPropagationContextFactory;
 import org.jboss.tm.TransactionPropagationContextImporter;
 import org.jboss.tm.TransactionPropagationContextUtil;
-import org.jboss.security.SecurityDomain;
-import org.jboss.net.sockets.DefaultSocketFactory;
 
 /**
  * This invoker pools Threads and client connections to one server socket.

Modified: branches/Branch_5_x/server/src/main/org/jboss/naming/NamingProviderURLWriter.java
===================================================================
--- branches/Branch_5_x/server/src/main/org/jboss/naming/NamingProviderURLWriter.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/server/src/main/org/jboss/naming/NamingProviderURLWriter.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -26,7 +26,7 @@
 import java.io.PrintWriter;
 import java.net.URI;
 
-import org.jboss.bootstrap.spi.Server;
+import org.jboss.bootstrap.spi.as.server.JBossASServer;
 import org.jboss.logging.Logger;
 
 /**
@@ -43,7 +43,7 @@
    private static final Logger log = Logger.getLogger(NamingProviderURLWriter.class);
    
    private String bootstrapUrl;
-   private Server server;
+   private JBossASServer server;
    private URI outputDir;
    private String filename = DEFAULT_PERSIST_FILE_NAME;
    private File outputFile;
@@ -68,7 +68,7 @@
       this.filename = name;
    }
 
-   public void setServer(Server server)
+   public void setServer(JBossASServer server)
    {
       this.server = server;
    }
@@ -92,7 +92,7 @@
          {
             if (server != null)
             {
-               base =  server.getConfig().getServerDataDir();
+               base =  new File(server.getConfiguration().getServerDataLocation().toURI());
                outputDir = base.toURI();
             }
          }

Modified: branches/Branch_5_x/server/src/main/org/jboss/web/WebService.java
===================================================================
--- branches/Branch_5_x/server/src/main/org/jboss/web/WebService.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/server/src/main/org/jboss/web/WebService.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -30,8 +30,8 @@
 import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
-import org.jboss.bootstrap.spi.ServerConfig;
-import org.jboss.bootstrap.spi.util.ServerConfigUtil;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
+import org.jboss.config.ServerConfigUtil;
 import org.jboss.system.ServiceMBeanSupport;
 import org.jboss.util.threadpool.BasicThreadPoolMBean;
 
@@ -293,7 +293,7 @@
 
       // if no override has been specified, default to the jboss bind address
       if (getBindAddress() == null)
-         setBindAddress(System.getProperty(ServerConfig.SERVER_BIND_ADDRESS));
+         setBindAddress(System.getProperty(JBossASServerConfig.PROP_KEY_JBOSSAS_BIND_ADDRESS));
       
       // if no host specified, default to the java.rmi.server.hostname property value
       if (getHost() == null)

Modified: branches/Branch_5_x/server/src/main/org/jboss/web/deployers/AbstractWarDeployment.java
===================================================================
--- branches/Branch_5_x/server/src/main/org/jboss/web/deployers/AbstractWarDeployment.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/server/src/main/org/jboss/web/deployers/AbstractWarDeployment.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -37,6 +37,7 @@
 import javax.naming.NamingException;
 
 import org.jboss.beans.metadata.api.annotations.Inject;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
 import org.jboss.deployers.structure.spi.DeploymentUnit;
 import org.jboss.deployers.structure.spi.main.MainDeployerStructure;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
@@ -68,9 +69,9 @@
 import org.jboss.security.ISecurityManagement;
 import org.jboss.security.SecurityConstants;
 import org.jboss.security.authorization.PolicyRegistration;
+import org.jboss.virtual.VFSUtils;
 import org.jboss.web.WebApplication;
 import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
-import org.jboss.virtual.VFSUtils;
 import org.omg.CORBA.ORB;
 
 /**
@@ -168,7 +169,7 @@
     */
    public static String shortWarUrlFromServerHome(String warUrl)
    {
-      String serverHomeUrl = System.getProperty(org.jboss.bootstrap.spi.ServerConfig.SERVER_HOME_URL);
+      String serverHomeUrl = System.getProperty(JBossASServerConfig.PROP_KEY_JBOSSAS_SERVER_HOME_URL);
 
       if (warUrl == null || serverHomeUrl == null)
          return warUrl;

Modified: branches/Branch_5_x/system/.classpath
===================================================================
--- branches/Branch_5_x/system/.classpath	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/system/.classpath	2009-05-24 09:27:07 UTC (rev 89345)
@@ -37,7 +37,12 @@
 	<classpathentry kind="lib" path="/thirdparty/jboss/common-core/lib/jboss-common-core.jar" sourcepath="/thirdparty/jboss/common-core/lib/jboss-common-core-sources.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-reflect/lib/jboss-reflect.jar" sourcepath="/thirdparty/jboss/jboss-reflect/lib/jboss-reflect-sources.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-kernel.jar" sourcepath="/thirdparty/jboss/microcontainer/lib/jboss-kernel-sources.jar"/>
-	<classpathentry exported="true" kind="lib" path="/thirdparty/jboss/jboss-bootstrap/lib/jboss-bootstrap.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/jbossxb/lib/jboss-xml-binding.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap-spi-as/lib/jboss-bootstrap-spi-as.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap-impl-as/lib/jboss-bootstrap-impl-as.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap-impl-mc/lib/jboss-bootstrap-impl-mc.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap-spi-mc/lib/jboss-bootstrap-spi-mc.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap-impl-base/lib/jboss-bootstrap-impl-base.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap-spi/lib/jboss-bootstrap-spi.jar"/>
 	<classpathentry kind="output" path="output/eclipse-classes"/>
 </classpath>

Modified: branches/Branch_5_x/system/build.xml
===================================================================
--- branches/Branch_5_x/system/build.xml	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/system/build.xml	2009-05-24 09:27:07 UTC (rev 89345)
@@ -95,7 +95,9 @@
     <!-- The combined dependant module classpath -->
     <path id="dependentmodule.classpath">
       <path refid="jboss.main.classpath"/>
-      <path refid="jboss.jboss.bootstrap.classpath"/>
+      <path refid="jboss.jboss.bootstrap.spi.as.classpath"/>
+    	<path refid="jboss.jboss.bootstrap.spi.mc.classpath"/>
+    	<path refid="jboss.jboss.bootstrap.spi.classpath"/>
     </path>
 
     <!-- ===== -->

Modified: branches/Branch_5_x/system/pom.xml
===================================================================
--- branches/Branch_5_x/system/pom.xml	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/system/pom.xml	2009-05-24 09:27:07 UTC (rev 89345)
@@ -193,7 +193,7 @@
     </dependency>
     <dependency>
       <groupId>org.jboss.bootstrap</groupId>
-      <artifactId>jboss-bootstrap</artifactId>
+      <artifactId>jboss-bootstrap-impl-as</artifactId>
     </dependency>
     <dependency>
       <groupId>org.jboss</groupId>

Modified: branches/Branch_5_x/system/src/main/org/jboss/deployers/plugins/managed/TypedManagedDeploymentCreator.java
===================================================================
--- branches/Branch_5_x/system/src/main/org/jboss/deployers/plugins/managed/TypedManagedDeploymentCreator.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/system/src/main/org/jboss/deployers/plugins/managed/TypedManagedDeploymentCreator.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -41,8 +41,8 @@
 import org.jboss.managed.api.ManagedDeployment;
 import org.jboss.managed.api.ManagedObject;
 import org.jboss.managed.api.ManagedDeployment.DeploymentPhase;
+import org.jboss.managed.api.annotation.ManagementConstants;
 import org.jboss.managed.api.annotation.ManagementDeployment;
-import org.jboss.managed.api.annotation.ManagementConstants;
 import org.jboss.managed.plugins.ManagedDeploymentImpl;
 
 /**

Modified: branches/Branch_5_x/system/src/main/org/jboss/system/server/profile/repository/metadata/AbstractProfileMetaData.java
===================================================================
--- branches/Branch_5_x/system/src/main/org/jboss/system/server/profile/repository/metadata/AbstractProfileMetaData.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/system/src/main/org/jboss/system/server/profile/repository/metadata/AbstractProfileMetaData.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -25,7 +25,6 @@
 
 import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
 
 import org.jboss.profileservice.spi.metadata.ProfileMetaData;
 import org.jboss.profileservice.spi.metadata.SubProfileMetaData;

Modified: branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java
===================================================================
--- branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -25,7 +25,6 @@
 import java.lang.annotation.Annotation;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -36,11 +35,11 @@
 
 import org.jboss.beans.info.spi.BeanInfo;
 import org.jboss.beans.metadata.spi.BeanMetaData;
-import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
-import org.jboss.bootstrap.spi.Bootstrap;
-import org.jboss.bootstrap.spi.Server;
-import org.jboss.bootstrap.spi.ServerConfig;
-import org.jboss.bootstrap.spi.microcontainer.MCServer;
+import org.jboss.bootstrap.spi.as.JBossASBootstrap;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
+import org.jboss.bootstrap.spi.as.server.JBossASServer;
+import org.jboss.bootstrap.spi.mc.config.MCServerConfig;
+import org.jboss.bootstrap.spi.mc.server.MCServer;
 import org.jboss.dependency.spi.ControllerContext;
 import org.jboss.dependency.spi.ControllerState;
 import org.jboss.deployers.client.spi.IncompleteDeploymentException;
@@ -67,7 +66,6 @@
 import org.jboss.managed.api.ManagedProperty;
 import org.jboss.managed.api.MutableManagedObject;
 import org.jboss.managed.api.annotation.ManagementComponent;
-import org.jboss.managed.api.annotation.ManagementConstants;
 import org.jboss.managed.api.annotation.ManagementObject;
 import org.jboss.managed.api.annotation.ViewUse;
 import org.jboss.managed.api.factory.ManagedObjectFactory;
@@ -76,16 +74,12 @@
 import org.jboss.managed.plugins.ManagedObjectImpl;
 import org.jboss.managed.plugins.ManagedOperationImpl;
 import org.jboss.managed.plugins.ManagedPropertyImpl;
-import org.jboss.managed.plugins.factory.AbstractManagedObjectFactory;
 import org.jboss.metatype.api.types.ArrayMetaType;
-import org.jboss.metatype.api.types.CollectionMetaType;
 import org.jboss.metatype.api.types.MetaType;
 import org.jboss.metatype.api.types.SimpleMetaType;
 import org.jboss.metatype.api.values.ArrayValueSupport;
-import org.jboss.metatype.api.values.CollectionValueSupport;
 import org.jboss.metatype.api.values.EnumValue;
 import org.jboss.metatype.api.values.EnumValueSupport;
-import org.jboss.metatype.api.values.GenericValue;
 import org.jboss.profileservice.spi.MutableProfile;
 import org.jboss.profileservice.spi.NoSuchProfileException;
 import org.jboss.profileservice.spi.Profile;
@@ -103,7 +97,7 @@
  * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
  * @version $Revision$
  */
-public class ProfileServiceBootstrap implements Bootstrap, KernelRegistryPlugin
+public class ProfileServiceBootstrap implements JBossASBootstrap, KernelRegistryPlugin
 {
    /** The log */
    private static final Logger log = Logger.getLogger(ProfileServiceBootstrap.class);
@@ -231,7 +225,7 @@
    /**
     * 
     */
-   public void start(Server server)
+   public void start(JBossASServer server)
       throws Exception
    {
       shutdown.set(false);
@@ -251,7 +245,7 @@
 
       // Load the profiles
       if(this.profileKey == null)
-         this.profileKey = new ProfileKey(server.getConfig().getServerName());
+         this.profileKey = new ProfileKey(server.getConfiguration().getServerName());
       
       Map<String, Object> metaData = server.getMetaData();
       ProfileMetaData pmd = (ProfileMetaData) metaData.get(ProfileMetaData.class.getName());
@@ -298,14 +292,14 @@
       }
    }
 
-   public void prepareShutdown(Server server)
+   public void prepareShutdown(JBossASServer server)
    {
       shutdown.set(true);
       if (mainDeployer != null)
          mainDeployer.prepareShutdown();
    }
 
-   public void shutdown(Server server)
+   public void shutdown(JBossASServer server)
    {
       // Disable hotdeployment scanning
       for(ProfileKey key : profileService.getActiveProfileKeys())
@@ -408,7 +402,7 @@
     * @param server - the Bootstrap.start Server instance. This must be an
     * MCServer in order for there to be KernelDeployments available.
     */
-   protected void initBootstrapMDs(Server server)
+   protected void initBootstrapMDs(JBossASServer server)
    {
       if(mof == null || mgtDeploymentCreator == null)
       {
@@ -417,10 +411,10 @@
       }
 
       Map<String, KernelDeployment> serverDeployments = null;
-      if(server instanceof MCServer)
+      if(server instanceof JBossASServer)
       {
          // Build ManagedDeployments for the KernelDeployments
-         MCServer mcserver = MCServer.class.cast(server);
+         JBossASServer mcserver = JBossASServer.class.cast(server);
          Kernel kernel = mcserver.getKernel();
          serverDeployments = mcserver.getDeployments();
          ManagedDeployment firstDeployment = null;
@@ -562,7 +556,7 @@
             }
             // ServerConfig
             type = new ComponentType("MCBean", "ServerConfig");
-            ServerConfig config = mcserver.getConfig();
+            JBossASServerConfig config = mcserver.getConfiguration();
             ManagedObject mo = mof.initManagedObject(config, null);
             ManagedComponentImpl configComp = new ManagedComponentImpl(type, firstDeployment, mo);
             firstDeployment.addComponent("ServerConfig", configComp);

Modified: branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/SecurityActions.java
===================================================================
--- branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/SecurityActions.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/SecurityActions.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -21,8 +21,8 @@
  */
 package org.jboss.system.server.profileservice;
 
+import java.security.AccessController;
 import java.security.PrivilegedAction;
-import java.security.AccessController;
 
 /**
  * Package privileged actions.

Modified: branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/repository/clustered/local/JAXBRepositoryContentMetadataPersister.java
===================================================================
--- branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/repository/clustered/local/JAXBRepositoryContentMetadataPersister.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/repository/clustered/local/JAXBRepositoryContentMetadataPersister.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -24,11 +24,13 @@
 
 import java.io.File;
 import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
 
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.Marshaller;
 
-import org.jboss.bootstrap.spi.Server;
+import org.jboss.bootstrap.spi.as.server.JBossASServer;
 import org.jboss.logging.Logger;
 import org.jboss.system.server.profileservice.repository.clustered.metadata.RepositoryContentMetadata;
 import org.jboss.xb.binding.Unmarshaller;
@@ -56,11 +58,16 @@
       resolver.addClassBindingForLocation("repository-content", RepositoryContentMetadata.class);
    }
    
-   public JAXBRepositoryContentMetadataPersister(Server server)
+   public JAXBRepositoryContentMetadataPersister(JBossASServer server) throws Throwable
    {
-      this(server.getConfig().getServerDataDir());
+      this(server.getConfiguration().getServerDataLocation());
    }
    
+   public JAXBRepositoryContentMetadataPersister(URL url) throws URISyntaxException
+   {
+         this(url.toURI());
+   }
+   
    public JAXBRepositoryContentMetadataPersister(URI uri)
    {
       this(new File(uri));

Modified: branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/repository/clustered/local/LocalContentManagerFactory.java
===================================================================
--- branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/repository/clustered/local/LocalContentManagerFactory.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/repository/clustered/local/LocalContentManagerFactory.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -26,6 +26,7 @@
 import java.util.Collection;
 import java.util.Map;
 
+import org.jboss.profileservice.spi.Profile;
 import org.jboss.profileservice.spi.ProfileKey;
 import org.jboss.system.server.profileservice.repository.clustered.sync.SynchronizationActionContext;
 

Modified: branches/Branch_5_x/system/src/main/org/jboss/system/tools/DeploymentRepositoryAdapter.java
===================================================================
--- branches/Branch_5_x/system/src/main/org/jboss/system/tools/DeploymentRepositoryAdapter.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/system/src/main/org/jboss/system/tools/DeploymentRepositoryAdapter.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -21,8 +21,8 @@
  */
 package org.jboss.system.tools;
 
+import java.net.URISyntaxException;
 import java.net.URL;
-import java.net.URISyntaxException;
 
 /**
  * Deployment repository adapter.

Modified: branches/Branch_5_x/system/src/main/org/jboss/system/tools/DeploymentScanner.java
===================================================================
--- branches/Branch_5_x/system/src/main/org/jboss/system/tools/DeploymentScanner.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/system/src/main/org/jboss/system/tools/DeploymentScanner.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -21,15 +21,15 @@
  */
 package org.jboss.system.tools;
 
-import java.net.URL;
 import java.net.MalformedURLException;
 import java.net.URISyntaxException;
+import java.net.URL;
 
 import org.jboss.aop.microcontainer.aspects.jmx.JMX;
 import org.jboss.beans.metadata.api.annotations.Start;
 import org.jboss.beans.metadata.api.annotations.Stop;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
 import org.jboss.util.StringPropertyReplacer;
-import org.jboss.bootstrap.spi.ServerConfig;
 
 /**
  * Deployment scanner impl - hooking into ProfileService.
@@ -39,7 +39,7 @@
 @JMX(name = "jboss.deployment:flavor=URL,type=DeploymentScanner", exposedInterface = DeploymentScannerMBean.class, registerDirectly = true)
 public class DeploymentScanner implements DeploymentScannerMBean
 {
-   private ServerConfig serverConfig;
+   private JBossASServerConfig serverConfig;
    private URL serverHomeURL;
 
    private DeploymentRepositoryAdapter adapter;
@@ -60,7 +60,7 @@
       if (serverConfig == null)
          throw new IllegalArgumentException("Null server config.");
 
-      serverHomeURL = serverConfig.getServerHomeURL();
+      serverHomeURL = serverConfig.getServerHomeLocation();
    }
 
    @Start(ignored = true)
@@ -147,7 +147,7 @@
     *
     * @param serverConfig the server config
     */
-   public void setServerConfig(ServerConfig serverConfig)
+   public void setServerConfig(JBossASServerConfig serverConfig)
    {
       this.serverConfig = serverConfig;
    }

Modified: branches/Branch_5_x/system/src/main/org/jboss/system/tools/DeploymentScannerMBean.java
===================================================================
--- branches/Branch_5_x/system/src/main/org/jboss/system/tools/DeploymentScannerMBean.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/system/src/main/org/jboss/system/tools/DeploymentScannerMBean.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -21,9 +21,9 @@
  */
 package org.jboss.system.tools;
 
-import java.net.URL;
 import java.net.MalformedURLException;
 import java.net.URISyntaxException;
+import java.net.URL;
 
 /**
  * Deployment api for tools.

Modified: branches/Branch_5_x/system/src/tests/org/jboss/test/server/profileservice/MainWithSimpleHotDeployTestCase.java
===================================================================
--- branches/Branch_5_x/system/src/tests/org/jboss/test/server/profileservice/MainWithSimpleHotDeployTestCase.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/system/src/tests/org/jboss/test/server/profileservice/MainWithSimpleHotDeployTestCase.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -25,8 +25,8 @@
 import java.security.CodeSource;
 
 import org.jboss.Main;
-import org.jboss.bootstrap.microcontainer.ServerImpl;
-import org.jboss.bootstrap.spi.Server;
+import org.jboss.bootstrap.impl.as.server.JBossASServerImpl;
+import org.jboss.bootstrap.spi.as.server.JBossASServer;
 import org.jboss.dependency.spi.ControllerState;
 import org.jboss.kernel.Kernel;
 import org.jboss.kernel.spi.registry.KernelRegistry;
@@ -101,9 +101,9 @@
       String[] args = {"-c", "defaulthotdeploy", "-Djboss.server.deployerBeansPrefix="+deployPrefix};
       Main main = new Main();
       main.boot(args);
-      Server server = main.getServer();
-      assertTrue("Server", server instanceof ServerImpl);
-      ServerImpl serverImpl = (ServerImpl) server;
+      JBossASServer server = (JBossASServer) main.getServer();
+      assertTrue("Server", server instanceof JBossASServerImpl);
+      JBossASServerImpl serverImpl = (JBossASServerImpl) server;
 
       // Validate that the expected deployment beans exist
       Kernel kernel = serverImpl.getKernel();
@@ -135,7 +135,14 @@
       
 
       // Shutdown
-      main.shutdown();
+      try
+      {
+         main.shutdown();
+      }
+      catch (Throwable t)
+      {
+         throw new Exception("Error in shutdown", t);
+      }
    }
 
    private void assertInstalled(Kernel kernel, String name)

Modified: branches/Branch_5_x/system/src/tests/org/jboss/test/server/profileservice/support/MockServer.java
===================================================================
--- branches/Branch_5_x/system/src/tests/org/jboss/test/server/profileservice/support/MockServer.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/system/src/tests/org/jboss/test/server/profileservice/support/MockServer.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -21,123 +21,224 @@
  */ 
 package org.jboss.test.server.profileservice.support;
 
-import java.util.Collections;
 import java.util.Date;
+import java.util.EnumSet;
 import java.util.Map;
-import java.util.Properties;
 
-import org.jboss.bootstrap.spi.Server;
-import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.bootstrap.spi.Bootstrap;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
+import org.jboss.bootstrap.spi.as.server.JBossASServer;
+import org.jboss.bootstrap.spi.config.ConfigurationInitializer;
+import org.jboss.bootstrap.spi.config.ConfigurationValidator;
+import org.jboss.bootstrap.spi.config.InvalidConfigurationException;
+import org.jboss.bootstrap.spi.lifecycle.LifecycleEventException;
+import org.jboss.bootstrap.spi.lifecycle.LifecycleEventHandler;
+import org.jboss.bootstrap.spi.lifecycle.LifecycleState;
+import org.jboss.bootstrap.spi.server.ServerInitializer;
+import org.jboss.kernel.Kernel;
+import org.jboss.kernel.spi.deployment.KernelDeployment;
 
 /**
  * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
  * @version $Revision$
  */
-public class MockServer implements Server
+public class MockServer implements JBossASServer
 {
 
-   public ServerConfig config;
+   public JBossASServerConfig config;
    
-   public MockServer(ServerConfig config)
+   public MockServer(JBossASServerConfig config)
    {
       this.config = config;
    }
-   
-   public ServerConfig getConfig() throws IllegalStateException
-   {
-      return this.config;
-   }
-   
+
    public String getBuildDate()
    {
-      // FIXME getBuildDate
+      // TODO Auto-generated method stub
       return null;
    }
 
    public String getBuildID()
    {
-      // FIXME getBuildID
+      // TODO Auto-generated method stub
       return null;
    }
 
    public String getBuildJVM()
    {
-      // FIXME getBuildJVM
+      // TODO Auto-generated method stub
       return null;
    }
 
    public String getBuildNumber()
    {
-      // FIXME getBuildNumber
+      // TODO Auto-generated method stub
       return null;
    }
 
    public String getBuildOS()
    {
-      // FIXME getBuildOS
+      // TODO Auto-generated method stub
       return null;
    }
 
    public Date getStartDate()
    {
-      // FIXME getStartDate
+      // TODO Auto-generated method stub
       return null;
    }
 
    public String getVersion()
    {
-      // FIXME getVersion
+      // TODO Auto-generated method stub
       return null;
    }
 
    public String getVersionName()
    {
-      // FIXME getVersionName
+      // TODO Auto-generated method stub
       return null;
    }
 
    public String getVersionNumber()
    {
-      // FIXME getVersionNumber
+      // TODO Auto-generated method stub
       return null;
    }
 
-   public void init(Properties props) throws IllegalStateException, Exception
+   public Kernel getKernel()
    {
-      init(props, null);
+      // TODO Auto-generated method stub
+      return null;
    }
-   public void init(Properties props, Map<String, Object> metadata) throws IllegalStateException, Exception
+
+   public void addBootstrap(Bootstrap<JBossASServer, JBossASServerConfig> arg0) throws IllegalArgumentException
    {
-      // FIXME init
+      // TODO Auto-generated method stub
       
    }
-   public Map<String, Object> getMetaData()
+
+   public ConfigurationInitializer<JBossASServerConfig> getConfigInitializer()
    {
-      return Collections.emptyMap();
+      // TODO Auto-generated method stub
+      return null;
    }
-   public boolean isInShutdown()
+
+   public JBossASServerConfig getConfiguration()
    {
-      // FIXME isInShutdown
-      return false;
+      return this.config;
    }
 
-   public boolean isStarted()
+   public ServerInitializer<JBossASServer, JBossASServerConfig> getServerInitializer()
    {
-      // FIXME isStarted
-      return false;
+      // TODO Auto-generated method stub
+      return null;
    }
 
-   public void shutdown() throws IllegalStateException
+   public LifecycleState getState()
    {
-      // FIXME shutdown
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public ConfigurationValidator<JBossASServerConfig> getValidator()
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public void initialize() throws IllegalStateException, InvalidConfigurationException, LifecycleEventException
+   {
+      // TODO Auto-generated method stub
       
    }
 
+   public void registerEventHandler(LifecycleState arg0, LifecycleEventHandler arg1) throws IllegalArgumentException
+   {
+      // TODO Auto-generated method stub
+      
+   }
+
+   public void registerEventHandler(LifecycleEventHandler arg0, EnumSet<LifecycleState> arg1)
+         throws IllegalArgumentException
+   {
+      // TODO Auto-generated method stub
+      
+   }
+
+   public void registerEventHandler(LifecycleEventHandler arg0, LifecycleState... arg1) throws IllegalArgumentException
+   {
+      // TODO Auto-generated method stub
+      
+   }
+
+   public void registerEventHandlers(LifecycleState arg0, LifecycleEventHandler... arg1)
+         throws IllegalArgumentException
+   {
+      // TODO Auto-generated method stub
+      
+   }
+
+   public void removeBootstrap(Bootstrap arg0) throws IllegalArgumentException
+   {
+      // TODO Auto-generated method stub
+      
+   }
+
+   public void setConfigInitializer(ConfigurationInitializer<JBossASServerConfig> arg0) throws IllegalStateException
+   {
+      // TODO Auto-generated method stub
+      
+   }
+
+   public void setConfiguration(JBossASServerConfig arg0)
+   {
+      // TODO Auto-generated method stub
+      
+   }
+
+   public void setServerInitializer(ServerInitializer<JBossASServer, JBossASServerConfig> arg0)
+         throws IllegalStateException
+   {
+      // TODO Auto-generated method stub
+      
+   }
+
+   public void setValidator(ConfigurationValidator<JBossASServerConfig> arg0) throws IllegalStateException
+   {
+      // TODO Auto-generated method stub
+      
+   }
+
+   public void shutdown() throws IllegalStateException, Exception
+   {
+      // TODO Auto-generated method stub
+      
+   }
+
    public void start() throws IllegalStateException, Exception
    {
-      // FIXME start
+      // TODO Auto-generated method stub
       
    }
 
+   public boolean unregisterEventHandler(LifecycleEventHandler arg0, LifecycleState arg1)
+         throws IllegalArgumentException
+   {
+      // TODO Auto-generated method stub
+      return false;
+   }
+
+   public Map<String, Object> getMetaData()
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public Map<String, KernelDeployment> getDeployments()
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
 }
 

Modified: branches/Branch_5_x/system/src/tests/org/jboss/test/server/profileservice/support/MockServerConfig.java
===================================================================
--- branches/Branch_5_x/system/src/tests/org/jboss/test/server/profileservice/support/MockServerConfig.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/system/src/tests/org/jboss/test/server/profileservice/support/MockServerConfig.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -21,16 +21,17 @@
  */ 
 package org.jboss.test.server.profileservice.support;
 
-import java.io.File;
 import java.net.URL;
+import java.util.Map;
+import java.util.Properties;
 
-import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
 
 /**
  * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
  * @version $Revision$
  */
-public class MockServerConfig implements ServerConfig
+public class MockServerConfig implements JBossASServerConfig
 {
    String serverName;
    URL configURL;
@@ -50,183 +51,403 @@
       this.commonBaseURL = commonBaseURL;
    }
    
-   public URL getServerConfigURL()
+   public String getServerName()
    {
-      return this.configURL;
+      return this.serverName;
    }
    
-   public URL getCommonBaseURL()
+   /*
+    * Below this marker are unimplemented stubs
+    */
+
+   public JBossASServerConfig bindAddress(String arg0)
    {
-      return this.commonBaseURL;
+      // TODO Auto-generated method stub
+      return null;
    }
-   
-   public String getServerName()
+
+   public JBossASServerConfig bootLibraryLocation(URL arg0)
    {
-      return this.serverName;
+      // TODO Auto-generated method stub
+      return null;
    }
-   
-   public boolean getBlockingShutdown()
+
+   public JBossASServerConfig bootLibraryLocation(String arg0) throws IllegalArgumentException
    {
-      // FIXME getBlockingShutdown
-      return false;
+      // TODO Auto-generated method stub
+      return null;
    }
 
-   public URL getBootstrapURL()
+   public JBossASServerConfig commonBaseLocation(URL arg0)
    {
-      // FIXME getBootstrapURL
+      // TODO Auto-generated method stub
       return null;
    }
 
-   public URL getCommonLibraryURL()
+   public JBossASServerConfig commonBaseLocation(String arg0) throws IllegalArgumentException
    {
-      // FIXME getCommonLibraryURL
+      // TODO Auto-generated method stub
       return null;
    }
 
-   
-   public boolean getExitOnShutdown()
+   public JBossASServerConfig commonLibLocation(URL arg0)
    {
-      // FIXME getExitOnShutdown
-      return false;
+      // TODO Auto-generated method stub
+      return null;
    }
 
-   public File getHomeDir()
+   public JBossASServerConfig commonLibLocation(String arg0) throws IllegalArgumentException
    {
-      // FIXME getHomeDir
+      // TODO Auto-generated method stub
       return null;
    }
 
-   public URL getHomeURL()
+   public String getBindAddress()
    {
-      // FIXME getHomeURL
+      // TODO Auto-generated method stub
       return null;
    }
 
-   public URL getLibraryURL()
+   public URL getBootLibraryLocation()
    {
-      // FIXME getLibraryURL
+      // TODO Auto-generated method stub
       return null;
    }
 
-   public URL getPatchURL()
+   public URL getCommonBaseLocation()
    {
-      // FIXME getPatchURL
+      // TODO Auto-generated method stub
       return null;
    }
 
-   public boolean getPlatformMBeanServer()
+   public URL getCommonLibLocation()
    {
-      // FIXME getPlatformMBeanServer
-      return false;
+      // TODO Auto-generated method stub
+      return null;
    }
 
-   public boolean getRequireJBossURLStreamHandlerFactory()
+   public URL getJBossHome()
    {
-      // FIXME getRequireJBossURLStreamHandlerFactory
-      return false;
+      // TODO Auto-generated method stub
+      return null;
    }
 
-   public String getRootDeploymentFilename()
+   public URL getNativeLibraryLocation()
    {
-      // FIXME getRootDeploymentFilename
+      // TODO Auto-generated method stub
       return null;
    }
 
-   public File getServerBaseDir()
+   public String getPartitionName()
    {
-      // FIXME getServerBaseDir
+      // TODO Auto-generated method stub
       return null;
    }
 
-   public URL getServerBaseURL()
+   public URL getServerBaseLocation()
    {
-      // FIXME getServerBaseURL
+      // TODO Auto-generated method stub
       return null;
    }
 
-   public File getServerDataDir()
+   public URL getServerConfLocation()
    {
-      // FIXME getServerDataDir
+      // TODO Auto-generated method stub
       return null;
    }
 
-   public File getServerHomeDir()
+   public URL getServerDataLocation()
    {
-      // FIXME getServerHomeDir
+      // TODO Auto-generated method stub
       return null;
    }
 
-   public URL getServerHomeURL()
+   public URL getServerHomeLocation()
    {
-      // FIXME getServerHomeURL
+      // TODO Auto-generated method stub
       return null;
    }
 
-   public URL getServerLibraryURL()
+   public URL getServerLibLocation()
    {
-      // FIXME getServerLibraryURL
+      // TODO Auto-generated method stub
       return null;
    }
 
-   public File getServerLogDir()
+   public URL getServerLogLocation()
    {
-      // FIXME getServerLogDir
+      // TODO Auto-generated method stub
       return null;
    }
 
-   public File getServerNativeDir()
+
+
+   public URL getServerTempLocation()
    {
-      // FIXME getServerNativeDir
+      // TODO Auto-generated method stub
       return null;
    }
 
-   public File getServerTempDeployDir()
+   public String getUdpGroup()
    {
-      // FIXME getServerTempDeployDir
+      // TODO Auto-generated method stub
       return null;
    }
 
-   public File getServerTempDir()
+   public Integer getUdpPort()
    {
-      // FIXME getServerTempDir
+      // TODO Auto-generated method stub
       return null;
    }
 
-   public String getSpecificationVersion()
+   public Boolean isLoadNative()
    {
-      // FIXME getSpecificationVersion
+      // TODO Auto-generated method stub
       return null;
    }
 
-   public boolean isInstallLifeThread()
+   public JBossASServerConfig jbossHome(String arg0) throws IllegalArgumentException
    {
-      // FIXME isInstallLifeThread
-      return false;
+      // TODO Auto-generated method stub
+      return null;
    }
 
-   public void setBlockingShutdown(boolean blockingShutdown)
+   public JBossASServerConfig jbossHome(URL arg0)
    {
-      // FIXME setBlockingShutdown
-      
+      // TODO Auto-generated method stub
+      return null;
    }
 
-   public void setExitOnShutdown(boolean flag)
+   public JBossASServerConfig loadNative(Boolean arg0)
    {
-      // FIXME setExitOnShutdown
-      
+      // TODO Auto-generated method stub
+      return null;
    }
 
-   public void setRequireJBossURLStreamHandlerFactory(boolean requireJBossURLStreamHandlerFactory)
+   public JBossASServerConfig nativeLibraryLocation(URL arg0)
    {
-      // FIXME setRequireJBossURLStreamHandlerFactory
-      
+      // TODO Auto-generated method stub
+      return null;
    }
 
-   public void setRootDeploymentFilename(String filename)
+   public JBossASServerConfig nativeLibraryLocation(String arg0) throws IllegalArgumentException
    {
-      // FIXME setRootDeploymentFilename
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public JBossASServerConfig partitionName(String arg0)
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public JBossASServerConfig serverBaseLocation(URL arg0)
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public JBossASServerConfig serverBaseLocation(String arg0) throws IllegalArgumentException
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public JBossASServerConfig serverConfLocation(URL arg0)
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public JBossASServerConfig serverConfLocation(String arg0) throws IllegalArgumentException
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public JBossASServerConfig serverDataLocation(URL arg0)
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public JBossASServerConfig serverDataLocation(String arg0) throws IllegalArgumentException
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public JBossASServerConfig serverHomeLocation(URL arg0)
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public JBossASServerConfig serverHomeLocation(String arg0) throws IllegalArgumentException
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public JBossASServerConfig serverLibLocation(URL arg0)
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public JBossASServerConfig serverLibLocation(String arg0) throws IllegalArgumentException
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public JBossASServerConfig serverLogLocation(URL arg0)
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public JBossASServerConfig serverLogLocation(String arg0) throws IllegalArgumentException
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public JBossASServerConfig serverName(String arg0)
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public JBossASServerConfig serverTempLocation(URL arg0)
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public JBossASServerConfig serverTempLocation(String arg0) throws IllegalArgumentException
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public JBossASServerConfig udpGroup(String arg0)
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public JBossASServerConfig udpPort(Integer arg0)
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public JBossASServerConfig bootstrapHome(URL arg0) throws IllegalArgumentException, IllegalStateException
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public JBossASServerConfig bootstrapHome(String arg0) throws IllegalArgumentException, IllegalStateException
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public JBossASServerConfig bootstrapName(String arg0) throws IllegalArgumentException, IllegalStateException
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public JBossASServerConfig bootstrapUrl(URL arg0) throws IllegalArgumentException, IllegalStateException
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public JBossASServerConfig bootstrapUrl(String arg0) throws IllegalArgumentException, IllegalStateException
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public void freeze() throws IllegalStateException
+   {
+      // TODO Auto-generated method stub
       
    }
 
+   public URL getBootstrapHome()
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public String getBootstrapName()
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public URL getBootstrapUrl()
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public Map<String, String> getProperties()
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public boolean isFrozen()
+   {
+      // TODO Auto-generated method stub
+      return false;
+   }
+
+   public JBossASServerConfig property(String arg0, String arg1) throws IllegalArgumentException, IllegalStateException
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public Boolean isUsePlatformMBeanServer()
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public JBossASServerConfig usePlatformMBeanServer(Boolean arg0)
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public String getProperty(String arg0) throws IllegalArgumentException
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public JBossASServerConfig properties(Map<String, String> arg0) throws IllegalArgumentException,
+         IllegalStateException
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   public JBossASServerConfig properties(Properties arg0) throws IllegalArgumentException, IllegalStateException
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+   
+  
+
 }
 

Modified: branches/Branch_5_x/system/src/tests/org/jboss/test/server/profileservice/test/AbstractProfileServiceTestBase.java
===================================================================
--- branches/Branch_5_x/system/src/tests/org/jboss/test/server/profileservice/test/AbstractProfileServiceTestBase.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/system/src/tests/org/jboss/test/server/profileservice/test/AbstractProfileServiceTestBase.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -25,8 +25,8 @@
 import java.net.MalformedURLException;
 import java.net.URL;
 
-import org.jboss.bootstrap.spi.Server;
-import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
+import org.jboss.bootstrap.spi.as.server.JBossASServer;
 import org.jboss.deployers.client.spi.main.MainDeployer;
 import org.jboss.system.server.profileservice.repository.AbstractProfileFactory;
 import org.jboss.test.BaseTestCase;
@@ -47,20 +47,20 @@
       super(name);
    }
    
-   protected Server createDefaultServer(String name) throws MalformedURLException
+   protected JBossASServer createDefaultServer(String name) throws MalformedURLException
    {
       File configDir = new File("src/resources/parsing-tests/config/");
       File commonDir = new File("src/resources/parsing-tests/common/");
       return createServer(name, configDir.toURL(), commonDir.toURL());
    }
 
-   protected Server createServer(String name, URL configDir, URL commonDir)
+   protected JBossASServer createServer(String name, URL configDir, URL commonDir)
    {
-      ServerConfig config = new MockServerConfig(name, configDir, commonDir);
+      JBossASServerConfig config = new MockServerConfig(name, configDir, commonDir);
       return createServer(config);
    }
    
-   protected Server createServer(ServerConfig config)
+   protected JBossASServer createServer(JBossASServerConfig config)
    {
       return new MockServer(config);
    }

Modified: branches/Branch_5_x/system-jmx/.classpath
===================================================================
--- branches/Branch_5_x/system-jmx/.classpath	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/system-jmx/.classpath	2009-05-24 09:27:07 UTC (rev 89345)
@@ -24,6 +24,8 @@
 	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-mdr/lib/jboss-mdr.jar" sourcepath="/thirdparty/jboss/jboss-mdr/lib/jboss-mdr-sources.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-dependency.jar" sourcepath="/thirdparty/jboss/microcontainer/lib/jboss-dependency-sources.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-kernel.jar" sourcepath="/thirdparty/jboss/microcontainer/lib/jboss-kernel-sources.jar"/>
-	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap/lib/jboss-bootstrap.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap-spi-as/lib/jboss-bootstrap-spi-as.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap-spi/lib/jboss-bootstrap-spi.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap-spi-mc/lib/jboss-bootstrap-spi-mc.jar"/>
 	<classpathentry kind="output" path="output/eclipse-classes"/>
 </classpath>

Modified: branches/Branch_5_x/system-jmx/build.xml
===================================================================
--- branches/Branch_5_x/system-jmx/build.xml	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/system-jmx/build.xml	2009-05-24 09:27:07 UTC (rev 89345)
@@ -100,7 +100,9 @@
     <path id="dependentmodule.classpath">
       <path refid="jboss.j2se.classpath"/>
       <path refid="jboss.mbeans.classpath"/>
-      <path refid="jboss.jboss.bootstrap.classpath"/>
+      <path refid="jboss.jboss.bootstrap.spi.as.classpath"/>
+      <path refid="jboss.jboss.bootstrap.spi.mc.classpath"/>
+    	<path refid="jboss.jboss.bootstrap.spi.classpath"/>
       <path refid="jboss.system.classpath"/>
     </path>
 

Modified: branches/Branch_5_x/system-jmx/pom.xml
===================================================================
--- branches/Branch_5_x/system-jmx/pom.xml	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/system-jmx/pom.xml	2009-05-24 09:27:07 UTC (rev 89345)
@@ -87,7 +87,7 @@
     </dependency>
     <dependency>
       <groupId>org.jboss.bootstrap</groupId>
-      <artifactId>jboss-bootstrap</artifactId>
+      <artifactId>jboss-bootstrap-impl-as</artifactId>
     </dependency>
     <dependency>
       <groupId>org.jboss.jbossas</groupId>

Modified: branches/Branch_5_x/system-jmx/src/main/org/jboss/deployment/MainDeployer.java
===================================================================
--- branches/Branch_5_x/system-jmx/src/main/org/jboss/deployment/MainDeployer.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/system-jmx/src/main/org/jboss/deployment/MainDeployer.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -45,12 +45,13 @@
 import java.util.StringTokenizer;
 import java.util.jar.Attributes;
 import java.util.jar.Manifest;
+
 import javax.management.MBeanServer;
 import javax.management.MalformedObjectNameException;
 import javax.management.Notification;
 import javax.management.ObjectName;
 
-import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
 import org.jboss.deployers.client.spi.DeployerClient;
 import org.jboss.deployers.client.spi.Deployment;
 import org.jboss.deployers.structure.spi.DeploymentContext;
@@ -502,9 +503,9 @@
     */
    protected void createService() throws Exception
    {
-      ServerConfig config = ServerConfigLocator.locate();
+      JBossASServerConfig config = ServerConfigLocator.locate();
       // Get the temp directory location
-      File basedir = config.getServerTempDir();
+      File basedir = new File(config.getServerTempLocation().toURI());
       // Set the local copy temp dir to tmp/deploy
       tempDir = new File(basedir, "deploy");
       // Delete any existing content

Modified: branches/Branch_5_x/system-jmx/src/main/org/jboss/deployment/SARDeployer.java
===================================================================
--- branches/Branch_5_x/system-jmx/src/main/org/jboss/deployment/SARDeployer.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/system-jmx/src/main/org/jboss/deployment/SARDeployer.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -43,7 +43,7 @@
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 
-import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
 import org.jboss.mx.loading.LoaderRepositoryFactory;
 import org.jboss.mx.loading.LoaderRepositoryFactory.LoaderRepositoryConfig;
 import org.jboss.mx.util.MBeanProxyExt;
@@ -437,9 +437,9 @@
             ServiceControllerMBean.OBJECT_NAME, server);
 
       // Get the data directory, install url & library url
-      ServerConfig config = ServerConfigLocator.locate();
-      dataDir = config.getServerDataDir();
-      serverHomeURL = config.getServerHomeURL();
+      JBossASServerConfig config = ServerConfigLocator.locate();
+      dataDir = new File(config.getServerDataLocation().toURI());
+      serverHomeURL = config.getServerHomeLocation();
    }
 
    /**

Modified: branches/Branch_5_x/system-jmx/src/main/org/jboss/deployment/SubDeployerSupport.java
===================================================================
--- branches/Branch_5_x/system-jmx/src/main/org/jboss/deployment/SubDeployerSupport.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/system-jmx/src/main/org/jboss/deployment/SubDeployerSupport.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -34,8 +34,7 @@
 
 import javax.management.Notification;
 
-import org.jboss.bootstrap.spi.ServerConfig;
-import org.jboss.bootstrap.spi.util.ServerConfigUtil;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
 import org.jboss.mx.util.MBeanProxyExt;
 import org.jboss.system.ServiceMBeanSupport;
 import org.jboss.system.server.ServerConfigLocator;
@@ -103,10 +102,10 @@
    protected void createService() throws Exception
    {
       // get the temporary directories to use
-      ServerConfig config = ServerConfigLocator.locate();
-      tempNativeDir = config.getServerNativeDir();
-      tempDeployDir = config.getServerTempDeployDir();
-      loadNative = ServerConfigUtil.isLoadNative();
+      JBossASServerConfig config = ServerConfigLocator.locate();
+      tempNativeDir = new File(config.getNativeLibraryLocation().toURI());
+      tempDeployDir = new File(config.getServerTempLocation().toURI());
+      loadNative = config.isLoadNative();
 
       // Setup the proxy to mainDeployer
       mainDeployer = (MainDeployerMBean)

Modified: branches/Branch_5_x/system-jmx/src/main/org/jboss/deployment/XSLSubDeployer.java
===================================================================
--- branches/Branch_5_x/system-jmx/src/main/org/jboss/deployment/XSLSubDeployer.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/system-jmx/src/main/org/jboss/deployment/XSLSubDeployer.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -37,7 +37,7 @@
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamSource;
 
-import org.jboss.bootstrap.spi.util.ServerConfigUtil;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
 import org.jboss.mx.util.MBeanProxyExt;
 import org.jboss.util.xml.DOMWriter;
 import org.jboss.util.xml.JBossEntityResolver;
@@ -277,4 +277,40 @@
       }
       return original;
    }
+   
+   /**
+    * ServerConfigUtil
+    *
+    * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+    * @version $Revision$
+    * @deprecated Moved from jboss-bootstrap Legacy as a transition class; 
+    */
+   @Deprecated
+   private static class ServerConfigUtil
+   {
+      /**
+      * Utility to get a shortened url relative to the server home if possible
+      * 
+      * @param longUrl
+      * @return the short url
+      */
+      public static String shortUrlFromServerHome(String longUrl)
+      {
+         String serverHomeUrl = System.getProperty(JBossASServerConfig.PROP_KEY_JBOSSAS_SERVER_HOME_URL);
+
+         if (longUrl == null || serverHomeUrl == null)
+            return longUrl;
+
+         if (longUrl.startsWith(serverHomeUrl))
+            return ".../" + longUrl.substring(serverHomeUrl.length());
+         else
+         {
+            String jarServerHomeUrl = "jar:" + serverHomeUrl;
+            if (longUrl.startsWith(jarServerHomeUrl))
+               return ".../" + longUrl.substring(jarServerHomeUrl.length());
+            else
+               return longUrl;
+         }
+      }
+   }
 }

Modified: branches/Branch_5_x/system-jmx/src/main/org/jboss/deployment/scanner/URLDeploymentScanner.java
===================================================================
--- branches/Branch_5_x/system-jmx/src/main/org/jboss/deployment/scanner/URLDeploymentScanner.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/system-jmx/src/main/org/jboss/deployment/scanner/URLDeploymentScanner.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -39,7 +39,7 @@
 import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
-import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
 import org.jboss.deployment.DefaultDeploymentSorter;
 import org.jboss.deployment.IncompleteDeploymentException;
 import org.jboss.mx.util.JMXExceptionDecoder;
@@ -686,9 +686,9 @@
    {
       // get server's home for relative paths, need this for setting
       // attribute final values, so we need to do it here
-      ServerConfig serverConfig = ServerConfigLocator.locate();
-      serverHome = serverConfig.getServerHomeDir();
-      serverHomeURL = serverConfig.getServerHomeURL();
+      JBossASServerConfig serverConfig = ServerConfigLocator.locate();
+      serverHomeURL = serverConfig.getServerHomeLocation();
+      serverHome = new File(serverHomeURL.toURI());
 
       return super.preRegister(server, name);
    }

Modified: branches/Branch_5_x/system-jmx/src/main/org/jboss/system/deployers/SARDeployer.java
===================================================================
--- branches/Branch_5_x/system-jmx/src/main/org/jboss/system/deployers/SARDeployer.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/system-jmx/src/main/org/jboss/system/deployers/SARDeployer.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -25,7 +25,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
 import org.jboss.deployers.spi.DeploymentException;
 import org.jboss.deployers.vfs.spi.deployer.JAXPDeployer;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
@@ -135,8 +135,8 @@
          VirtualFile codebaseFile = unit.getRoot();
          if (".".equals(codebase) == false)
          {
-            ServerConfig config = ServerConfigLocator.locate();
-            URL codeBaseURL = new URL(config.getServerHomeURL(), codebase);
+            JBossASServerConfig config = ServerConfigLocator.locate();
+            URL codeBaseURL = new URL(config.getServerHomeLocation(), codebase);
             codebaseFile = VFS.getRoot(codeBaseURL);
          }
 

Modified: branches/Branch_5_x/system-jmx/src/main/org/jboss/system/pm/XMLAttributePersistenceManager.java
===================================================================
--- branches/Branch_5_x/system-jmx/src/main/org/jboss/system/pm/XMLAttributePersistenceManager.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/system-jmx/src/main/org/jboss/system/pm/XMLAttributePersistenceManager.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -644,7 +644,7 @@
 	  catch(Exception e) {
 		 // Otherwise, try to make it inside the jboss directory hierarchy
 	     
-	     File homeDir = ServerConfigLocator.locate().getServerHomeDir();
+	     File homeDir = new File(ServerConfigLocator.locate().getServerHomeLocation().toURI());
 	
 	     dir = new File(homeDir, baseDir);
 	

Modified: branches/Branch_5_x/system-jmx/src/main/org/jboss/system/server/ServerConfigImpl.java
===================================================================
--- branches/Branch_5_x/system-jmx/src/main/org/jboss/system/server/ServerConfigImpl.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/system-jmx/src/main/org/jboss/system/server/ServerConfigImpl.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -21,10 +21,11 @@
  */
 package org.jboss.system.server;
 
-import java.io.File;
 import java.net.URL;
+import java.util.Map;
+import java.util.Properties;
 
-import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
 
 /**
  * An mbean wrapper for the BaseServerConfig that exposes the config as the
@@ -35,7 +36,7 @@
  */
 public class ServerConfigImpl implements ServerConfigImplMBean
 {
-   private ServerConfig config;
+   private JBossASServerConfig config;
 
    /**
     * Construct a ServerConfigImpl with the ServerConfig pojo which will be used
@@ -43,12 +44,12 @@
     *
     * @param config - the ServerConfig pojo to expose as a ServerConfigImplMBean
     */
-   public ServerConfigImpl(ServerConfig config)
+   public ServerConfigImpl(JBossASServerConfig config)
    {
       this.config = config;
    }
 
-   public ServerConfig getConfig()
+   public JBossASServerConfig getConfig()
    {
       return config;
    }
@@ -58,148 +59,374 @@
       return config.equals(obj);
    }
 
-   public boolean getBlockingShutdown()
+   /*
+    * All methods below this marker delegate to the underlying config 
+    */
+
+   public JBossASServerConfig bindAddress(String arg0)
    {
-      return config.getBlockingShutdown();
+      config.bindAddress(arg0);
+      return this;
    }
 
-   public boolean getExitOnShutdown()
+   public JBossASServerConfig bootLibraryLocation(String arg0) throws IllegalArgumentException
    {
-      return config.getExitOnShutdown();
+      config.bootLibraryLocation(arg0);
+      return this;
    }
 
-   public File getHomeDir()
+   public JBossASServerConfig bootLibraryLocation(URL arg0)
    {
-      return config.getHomeDir();
+      config.bootLibraryLocation(arg0);
+      return this;
    }
 
-   public URL getHomeURL()
+   public JBossASServerConfig commonBaseLocation(String arg0) throws IllegalArgumentException
    {
-      return config.getHomeURL();
+      config.commonBaseLocation(arg0);
+      return this;
    }
 
-   public URL getLibraryURL()
+   public JBossASServerConfig commonBaseLocation(URL arg0)
    {
-      return config.getLibraryURL();
+      config.commonBaseLocation(arg0);
+      return this;
    }
 
-   public URL getPatchURL()
+   public JBossASServerConfig commonLibLocation(String arg0) throws IllegalArgumentException
    {
-      return config.getPatchURL();
+      config.commonLibLocation(arg0);
+      return this;
    }
 
-   public boolean getPlatformMBeanServer()
+   public JBossASServerConfig commonLibLocation(URL arg0)
    {
-      return config.getPlatformMBeanServer();
+      config.commonLibLocation(arg0);
+      return this;
    }
 
-   public boolean getRequireJBossURLStreamHandlerFactory()
+   public String getBindAddress()
    {
-      return config.getRequireJBossURLStreamHandlerFactory();
+      return config.getBindAddress();
    }
 
-   public String getRootDeploymentFilename()
+   public URL getBootLibraryLocation()
    {
-      return config.getRootDeploymentFilename();
+      return config.getBootLibraryLocation();
    }
 
-   public File getServerBaseDir()
+   public URL getCommonBaseLocation()
    {
-      return config.getServerBaseDir();
+      return config.getCommonBaseLocation();
    }
 
-   public URL getServerBaseURL()
+   public URL getCommonLibLocation()
    {
-      return config.getServerBaseURL();
+      return config.getCommonLibLocation();
    }
 
-   public URL getServerConfigURL()
+   public URL getJBossHome()
    {
-      return config.getServerConfigURL();
+      return config.getJBossHome();
    }
 
-   public File getServerDataDir()
+   public URL getNativeLibraryLocation()
    {
-      return config.getServerDataDir();
+      return config.getNativeLibraryLocation();
    }
 
-   public File getServerHomeDir()
+   public String getPartitionName()
    {
-      return config.getServerHomeDir();
+      return config.getPartitionName();
    }
 
-   public URL getServerHomeURL()
+   public URL getServerBaseLocation()
    {
-      return config.getServerHomeURL();
+      return config.getServerBaseLocation();
    }
 
-   public URL getServerLibraryURL()
+   public URL getServerConfLocation()
    {
-      return config.getServerLibraryURL();
+      return config.getServerConfLocation();
    }
 
-   public URL getCommonBaseURL()
+   public URL getServerDataLocation()
    {
-      return config.getCommonBaseURL();
+      return config.getServerDataLocation();
    }
-   
-   public URL getCommonLibraryURL()
+
+   public URL getServerHomeLocation()
    {
-      return config.getCommonLibraryURL();
+      return config.getServerHomeLocation();
    }
-   
-   public File getServerLogDir()
+
+   public URL getServerLibLocation()
    {
-      return config.getServerLogDir();
+      return config.getServerLibLocation();
    }
 
+   public URL getServerLogLocation()
+   {
+      return config.getServerLibLocation();
+   }
+
    public String getServerName()
    {
       return config.getServerName();
    }
 
-   public File getServerNativeDir()
+   public URL getServerTempLocation()
    {
-      return config.getServerNativeDir();
+      return config.getServerTempLocation();
    }
 
-   public File getServerTempDeployDir()
+   public String getUdpGroup()
    {
-      return config.getServerTempDeployDir();
+      return config.getUdpGroup();
    }
 
-   public File getServerTempDir()
+   public Integer getUdpPort()
    {
-      return config.getServerTempDir();
+      return config.getUdpPort();
    }
 
-   public int hashCode()
+   public Boolean isLoadNative()
    {
-      return config.hashCode();
+      return config.isLoadNative();
    }
 
-   public void setBlockingShutdown(boolean flag)
+   public JBossASServerConfig jbossHome(String arg0) throws IllegalArgumentException
    {
-      config.setBlockingShutdown(flag);
+      config.jbossHome(arg0);
+      return this;
    }
 
-   public void setExitOnShutdown(boolean flag)
+   public JBossASServerConfig jbossHome(URL arg0)
    {
-      config.setExitOnShutdown(flag);
+      config.jbossHome(arg0);
+      return this;
    }
 
-   public void setRequireJBossURLStreamHandlerFactory(boolean flag)
+   public JBossASServerConfig loadNative(Boolean arg0)
    {
-      config.setRequireJBossURLStreamHandlerFactory(flag);
+      config.loadNative(arg0);
+      return this;
    }
 
-   public void setRootDeploymentFilename(String filename)
+   public JBossASServerConfig nativeLibraryLocation(String arg0) throws IllegalArgumentException
    {
-      config.setRootDeploymentFilename(filename);
+      config.nativeLibraryLocation(arg0);
+      return this;
    }
 
-   public String getSpecificationVersion()
+   public JBossASServerConfig nativeLibraryLocation(URL arg0)
    {
-      return config.getSpecificationVersion();
+      config.nativeLibraryLocation(arg0);
+      return this;
    }
+
+   public JBossASServerConfig partitionName(String arg0)
+   {
+      config.partitionName(arg0);
+      return this;
+   }
+
+   public JBossASServerConfig serverBaseLocation(String arg0) throws IllegalArgumentException
+   {
+      config.serverBaseLocation(arg0);
+      return this;
+   }
+
+   public JBossASServerConfig serverBaseLocation(URL arg0)
+   {
+      config.serverBaseLocation(arg0);
+      return this;
+   }
+
+   public JBossASServerConfig serverConfLocation(String arg0) throws IllegalArgumentException
+   {
+      config.serverConfLocation(arg0);
+      return this;
+   }
+
+   public JBossASServerConfig serverConfLocation(URL arg0)
+   {
+      config.serverConfLocation(arg0);
+      return this;
+   }
+
+   public JBossASServerConfig serverDataLocation(String arg0) throws IllegalArgumentException
+   {
+      config.serverDataLocation(arg0);
+      return this;
+   }
+
+   public JBossASServerConfig serverDataLocation(URL arg0)
+   {
+      config.serverDataLocation(arg0);
+      return this;
+   }
+
+   public JBossASServerConfig serverHomeLocation(String arg0) throws IllegalArgumentException
+   {
+      config.serverHomeLocation(arg0);
+      return this;
+   }
+
+   public JBossASServerConfig serverHomeLocation(URL arg0)
+   {
+      config.serverHomeLocation(arg0);
+      return this;
+   }
+
+   public JBossASServerConfig serverLibLocation(String arg0) throws IllegalArgumentException
+   {
+      config.serverLibLocation(arg0);
+      return this;
+   }
+
+   public JBossASServerConfig serverLibLocation(URL arg0)
+   {
+      config.serverLibLocation(arg0);
+      return this;
+   }
+
+   public JBossASServerConfig serverLogLocation(String arg0) throws IllegalArgumentException
+   {
+      config.serverLogLocation(arg0);
+      return this;
+   }
+
+   public JBossASServerConfig serverLogLocation(URL arg0)
+   {
+      config.serverLogLocation(arg0);
+      return this;
+   }
+
+   public JBossASServerConfig serverName(String arg0)
+   {
+      config.serverName(arg0);
+      return this;
+   }
+
+   public JBossASServerConfig serverTempLocation(String arg0) throws IllegalArgumentException
+   {
+      config.serverTempLocation(arg0);
+      return this;
+   }
+
+   public JBossASServerConfig serverTempLocation(URL arg0)
+   {
+      config.serverTempLocation(arg0);
+      return this;
+   }
+
+   public JBossASServerConfig udpGroup(String arg0)
+   {
+      config.udpGroup(arg0);
+      return this;
+   }
+
+   public JBossASServerConfig udpPort(Integer arg0)
+   {
+      config.udpPort(arg0);
+      return this;
+   }
+
+   public JBossASServerConfig bootstrapHome(String arg0) throws IllegalArgumentException, IllegalStateException
+   {
+      config.bootstrapHome(arg0);
+      return this;
+   }
+
+   public JBossASServerConfig bootstrapHome(URL arg0) throws IllegalArgumentException, IllegalStateException
+   {
+      config.bootstrapHome(arg0);
+      return this;
+   }
+
+   public JBossASServerConfig bootstrapName(String arg0) throws IllegalArgumentException, IllegalStateException
+   {
+      config.bootstrapName(arg0);
+      return this;
+   }
+
+   public JBossASServerConfig bootstrapUrl(String arg0) throws IllegalArgumentException, IllegalStateException
+   {
+      config.bootstrapUrl(arg0);
+      return this;
+   }
+
+   public JBossASServerConfig bootstrapUrl(URL arg0) throws IllegalArgumentException, IllegalStateException
+   {
+      config.bootstrapUrl(arg0);
+      return this;
+   }
+
+   public void freeze() throws IllegalStateException
+   {
+      config.freeze();
+
+   }
+
+   public URL getBootstrapHome()
+   {
+      return config.getBootstrapHome();
+   }
+
+   public String getBootstrapName()
+   {
+      return config.getBootstrapName();
+   }
+
+   public URL getBootstrapUrl()
+   {
+      return config.getBootstrapUrl();
+   }
+
+   public Map<String, String> getProperties()
+   {
+      return config.getProperties();
+   }
+
+   public boolean isFrozen()
+   {
+      return config.isFrozen();
+   }
+
+   public JBossASServerConfig property(String arg0, String arg1) throws IllegalArgumentException, IllegalStateException
+   {
+      config.property(arg0, arg1);
+      return this;
+   }
+
+   public Boolean isUsePlatformMBeanServer()
+   {
+      return config.isUsePlatformMBeanServer();
+   }
+
+   public JBossASServerConfig usePlatformMBeanServer(Boolean arg0)
+   {
+      config.usePlatformMBeanServer(arg0);
+      return this;
+   }
+
+   public String getProperty(String arg0) throws IllegalArgumentException
+   {
+      return config.getProperty(arg0);
+   }
+
+   public JBossASServerConfig properties(Map<String, String> arg0) throws IllegalArgumentException,
+         IllegalStateException
+   {
+      config.properties(arg0);
+      return this;
+   }
+
+   public JBossASServerConfig properties(Properties arg0) throws IllegalArgumentException, IllegalStateException
+   {
+      config.properties(arg0);
+      return this;
+   }
+
 }

Modified: branches/Branch_5_x/system-jmx/src/main/org/jboss/system/server/ServerConfigImplMBean.java
===================================================================
--- branches/Branch_5_x/system-jmx/src/main/org/jboss/system/server/ServerConfigImplMBean.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/system-jmx/src/main/org/jboss/system/server/ServerConfigImplMBean.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -21,186 +21,17 @@
  */
 package org.jboss.system.server;
 
-import java.io.File;
-import java.net.URL;
-
 import javax.management.ObjectName;
 
-import org.jboss.bootstrap.spi.Server;
-import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
 import org.jboss.mx.util.ObjectNameFactory;
 
 /**
  * MBean interface.
  */
-public interface ServerConfigImplMBean
+public interface ServerConfigImplMBean extends JBossASServerConfig
 {
    /** Default ObjectName */
    ObjectName OBJECT_NAME = ObjectNameFactory.create("jboss.system:type=ServerConfig");
 
-   /**
-    * Get the server Specification-Version
-    */
-   String getSpecificationVersion();
-   
-   /**
-    * Get the local home directory which the server is running from.
-    */
-   File getHomeDir();
-
-   /**
-    * Get the home URL which the server is running from.
-    */
-   URL getHomeURL();
-
-   /**
-    * Get the home URL which the server is running from.
-    */
-   URL getLibraryURL();
-
-   /**
-    * Get the patch URL for the server.
-    */
-   URL getPatchURL();
-
-   /**
-    * Get the name of the server.
-    */
-   String getServerName();
-
-   /**
-    * Get the base directory for calculating server home directories.
-    */
-   File getServerBaseDir();
-
-   /**
-    * Get the server home directory.
-    */
-   File getServerHomeDir();
-
-   /**
-    * Get the directory where log files will be stored.
-    * @return the writable log directory
-    */
-   java.io.File getServerLogDir();
-
-   /**
-    * Get the directory where temporary files will be stored.
-    */
-   File getServerTempDir();
-
-   /**
-    * Get the directory where local data will be stored.
-    */
-   File getServerDataDir();
-
-   /**
-    * Get the base directory for calculating server home URLs.
-    */
-   URL getServerBaseURL();
-
-   /**
-    * Get the server home URL.
-    */
-   URL getServerHomeURL();
-
-   /**
-    * Get the server library URL.
-    */
-   URL getServerLibraryURL();
-
-   /**
-    * Get the server configuration URL.
-    */
-   URL getServerConfigURL();
-  
-   /**
-    * Get the common base URL.
-    */
-   URL getCommonBaseURL();
-   
-   /**
-    * Get the common library URL.
-    */
-   URL getCommonLibraryURL();
-   
-   /**
-    * Get the current value of the flag that indicates if we are
-    * using the platform MBeanServer as the main jboss server.
-    * Both the {@link ServerConfig.PLATFORM_MBEANSERVER}
-    * property must be set, and the jvm must be jdk1.5+
-    */
-   boolean getPlatformMBeanServer();
-
-   /**
-    * Enable or disable exiting the JVM when {@link Server#shutdown}
-    * is called. If enabled, then shutdown calls {@link Server#exit}.
-    * If disabled, then only the shutdown hook will be run.
-    * @param flag True to enable calling exit on shutdown.
-    */
-   void setExitOnShutdown(boolean flag);
-
-   /**
-    * Get the current value of the exit on shutdown flag.
-    * @return The current value of the exit on shutdown flag.
-    */
-   boolean getExitOnShutdown();
-
-   /**
-    * Enable or disable blocking when {@link Server#shutdown} is called.
-    * If enabled, then shutdown will be called in the current thread.
-    * If disabled, then the shutdown hook will be run ansynchronously
-    * in a separate thread.
-    * @param flag True to enable blocking shutdown.
-    */
-   void setBlockingShutdown(boolean flag);
-
-   /**
-    * Get the current value of the blocking shutdown flag.
-    * @return The current value of the blocking shutdown flag.
-    */
-   boolean getBlockingShutdown();
-
-   /**
-    * Set the RequireJBossURLStreamHandlerFactory flag. if false,
-    * exceptions when setting the URLStreamHandlerFactory will
-    * be logged and ignored.
-    * @param flag True to enable blocking shutdown.
-    */
-   void setRequireJBossURLStreamHandlerFactory(boolean flag);
-
-   /**
-    * Get the current value of the requireJBossURLStreamHandlerFactory flag.
-    * @return The current value of the requireJBossURLStreamHandlerFactory flag.
-    */
-   boolean getRequireJBossURLStreamHandlerFactory();
-  
-   /**
-    * Set the filename of the root deployable that will be used to
-    * finalize the bootstrap process.
-    * @param filename The filename of the root deployable.
-    */
-   void setRootDeploymentFilename(String filename);
-
-   /**
-    * Get the filename of the root deployable that will be used to
-    * finalize the bootstrap process.
-    * @return The filename of the root deployable.
-    */
-   String getRootDeploymentFilename();
-
-   /**
-    * Get the native dir for unpacking
-    * 
-    * @return the directory    
-    */
-  File getServerNativeDir() ;
-
-   /**
-    * Get the temporary deployment dir for unpacking
-    * 
-    * @return the directory
-    */
-  File getServerTempDeployDir() ;
-
 }

Modified: branches/Branch_5_x/system-jmx/src/main/org/jboss/system/server/ServerConfigLocator.java
===================================================================
--- branches/Branch_5_x/system-jmx/src/main/org/jboss/system/server/ServerConfigLocator.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/system-jmx/src/main/org/jboss/system/server/ServerConfigLocator.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -21,11 +21,11 @@
  */
 package org.jboss.system.server;
 
-import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
 import org.jboss.mx.util.MBeanProxyExt;
 
 /**
- * A helper for locating the {@link ServerConfig} instance 
+ * A helper for locating the {@link JBossASServerConfig} instance 
  * for the running server.
  *
  * @version <tt>$Revision$</tt>
@@ -33,13 +33,13 @@
  */
 public class ServerConfigLocator
 {
-   private static volatile ServerConfig instance = null;
+   private static volatile JBossASServerConfig instance = null;
 
-   public static ServerConfig locate()
+   public static JBossASServerConfig locate()
    {
       if (instance == null) {
-         instance = (ServerConfig)
-            MBeanProxyExt.create(ServerConfig.class,
+         instance = (JBossASServerConfig)
+            MBeanProxyExt.create(JBossASServerConfig.class,
                               ServerConfigImplMBean.OBJECT_NAME);
       }
 

Copied: branches/Branch_5_x/system-jmx/src/main/org/jboss/system/server/ServerConstants.java (from rev 89343, branches/Branch_5_x_BootstrapLegacyRemoval/system-jmx/src/main/org/jboss/system/server/ServerConstants.java)
===================================================================
--- branches/Branch_5_x/system-jmx/src/main/org/jboss/system/server/ServerConstants.java	                        (rev 0)
+++ branches/Branch_5_x/system-jmx/src/main/org/jboss/system/server/ServerConstants.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.system.server;
+
+import javax.management.ObjectName;
+
+import org.jboss.mx.util.ObjectNameFactory;
+
+/**
+ * ServerConstants
+ * 
+ * Holds constants used for the Server MBean.  This
+ * class is primarily in place such that we may access
+ * properties without leaking JBossASServer and MC Kernel
+ * references like {@link ServerImplMBean} does.
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface ServerConstants
+{
+   /** The default object name */
+   ObjectName OBJECT_NAME = ObjectNameFactory.create("jboss.system:type=Server");
+}

Modified: branches/Branch_5_x/system-jmx/src/main/org/jboss/system/server/ServerImplMBean.java
===================================================================
--- branches/Branch_5_x/system-jmx/src/main/org/jboss/system/server/ServerImplMBean.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/system-jmx/src/main/org/jboss/system/server/ServerImplMBean.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -21,19 +21,13 @@
  */
 package org.jboss.system.server;
 
-import javax.management.ObjectName;
+import org.jboss.bootstrap.spi.as.server.JBossASServer;
 
-import org.jboss.bootstrap.spi.Server;
-import org.jboss.mx.util.ObjectNameFactory;
-
 /**
  * MBean interface.
  */
-public interface ServerImplMBean extends Server
+public interface ServerImplMBean extends JBossASServer, ServerConstants
 {
-   /** The default object name */
-   ObjectName OBJECT_NAME = ObjectNameFactory.create("jboss.system:type=Server");
-
    // Attributes ----------------------------------------------------
    
    /**

Modified: branches/Branch_5_x/system-jmx/src/main/org/jboss/system/server/jmx/JMXKernel.java
===================================================================
--- branches/Branch_5_x/system-jmx/src/main/org/jboss/system/server/jmx/JMXKernel.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/system-jmx/src/main/org/jboss/system/server/jmx/JMXKernel.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -27,9 +27,10 @@
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Date;
+import java.util.EnumSet;
 import java.util.List;
+import java.util.Map;
 import java.util.Properties;
-import java.util.Map;
 
 import javax.management.ListenerNotFoundException;
 import javax.management.MBeanNotificationInfo;
@@ -41,13 +42,22 @@
 import javax.management.ObjectInstance;
 import javax.management.ObjectName;
 
-import org.jboss.bootstrap.spi.ServerConfig;
-import org.jboss.bootstrap.spi.ServerProcess;
+import org.jboss.bootstrap.spi.Bootstrap;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
+import org.jboss.bootstrap.spi.as.server.JBossASServer;
+import org.jboss.bootstrap.spi.config.ConfigurationInitializer;
+import org.jboss.bootstrap.spi.config.ConfigurationValidator;
+import org.jboss.bootstrap.spi.config.InvalidConfigurationException;
+import org.jboss.bootstrap.spi.lifecycle.LifecycleEventException;
+import org.jboss.bootstrap.spi.lifecycle.LifecycleEventHandler;
+import org.jboss.bootstrap.spi.lifecycle.LifecycleState;
+import org.jboss.bootstrap.spi.server.ServerInitializer;
 import org.jboss.classloader.spi.ClassLoaderSystem;
 import org.jboss.classloading.spi.RealClassLoader;
 import org.jboss.classloading.spi.metadata.ExportAll;
 import org.jboss.classloading.spi.vfs.policy.VFSClassLoaderPolicy;
 import org.jboss.kernel.Kernel;
+import org.jboss.kernel.spi.deployment.KernelDeployment;
 import org.jboss.mx.loading.RepositoryClassLoader;
 import org.jboss.mx.server.ServerConstants;
 import org.jboss.mx.util.JMXExceptionDecoder;
@@ -79,9 +89,9 @@
 
    /** The JMX MBeanServer which will serve as our communication bus. */
    private MBeanServer mbeanServer;
-   private ServerProcess serverImpl;
+   private JBossASServer serverImpl;
    private ServiceController controller;
-   private ServerConfig serverConfig;
+   private JBossASServerConfig serverConfig;
    private ServerConfigImplMBean serverConfigMBean;
    private ServerInfoMBean serverInfo;
    /** The kernel */
@@ -95,11 +105,11 @@
    /** Whether to use the old classloader */
    private boolean oldClassLoader;
    
-   public ServerProcess getServerImpl()
+   public JBossASServer getServerImpl()
    {
       return serverImpl;
    }
-   public void setServerImpl(ServerProcess serverImpl)
+   public void setServerImpl(JBossASServer serverImpl)
    {
       this.serverImpl = serverImpl;
       this.notificationEmitter = (NotificationEmitter) serverImpl;
@@ -178,10 +188,10 @@
                                           ServerConstants.DEFAULT_MBEAN_SERVER_BUILDER_CLASS);
       System.setProperty(ServerConstants.MBEAN_SERVER_BUILDER_CLASS_PROPERTY, builder);
 
-      serverConfig = serverImpl.getConfig();
+      serverConfig = serverImpl.getConfiguration();
       serverConfigMBean = new ServerConfigImpl(serverConfig);
       // Check if we'll use the platform MBeanServer or instantiate our own
-      if (serverConfig.getPlatformMBeanServer() == true)
+      if (serverConfig.isUsePlatformMBeanServer())
       {
          // jdk1.5+
          ClassLoader cl = Thread.currentThread().getContextClassLoader();
@@ -287,21 +297,22 @@
    // ServerImplMBean delegation
    public void init(Properties props) throws Exception
    {
-      serverImpl.init(props);
+      serverImpl.initialize();
    }
 
-   public void exit()
-   {
-      serverImpl.exit();
-   }
+   // AS isn't always going to be a standalone process
+//   public void exit()
+//   {
+//      serverImpl.exit();
+//   }
+//
+//   public void exit(int exitcode)
+//   {
+//      serverImpl.exit(exitcode);
+//   }
 
-   public void exit(int exitcode)
+   public JBossASServerConfig getConfig()
    {
-      serverImpl.exit(exitcode);
-   }
-
-   public ServerConfig getConfig()
-   {
       return serverConfig;
    }
    public String getBuildDate()
@@ -349,24 +360,25 @@
       return serverImpl.getVersionNumber();
    }
 
-   public void halt()
-   {
-      serverImpl.halt();
-   }
+   // AS isn't always going to be a standalone process
+//   public void halt()
+//   {
+//      serverImpl.halt();
+//   }
+//
+//   public void halt(int exitcode)
+//   {
+//      serverImpl.halt(exitcode);
+//   }
 
-   public void halt(int exitcode)
-   {
-      serverImpl.halt(exitcode);
-   }
-
    public boolean isInShutdown()
    {
-      return serverImpl.isInShutdown();
+      return serverImpl.getState().equals(LifecycleState.STOPPING);
    }
 
    public boolean isStarted()
    {
-      return serverImpl.isStarted();
+      return serverImpl.getState().equals(LifecycleState.STARTED);
    }
 
    public void runFinalization()
@@ -389,11 +401,140 @@
       
    }
    
+   public Map<String, KernelDeployment> getDeployments()
+   {
+      return serverImpl.getDeployments();
+   }
+
+   public Kernel getKernel()
+   {
+      return serverImpl.getKernel();
+   }
+
+   public void addBootstrap(final Bootstrap<JBossASServer, JBossASServerConfig> arg0) throws IllegalArgumentException
+   {
+      serverImpl.addBootstrap(arg0);
+   }
+
+   public ConfigurationInitializer<JBossASServerConfig> getConfigInitializer()
+   {
+      return serverImpl.getConfigInitializer();
+   }
+
+   public JBossASServerConfig getConfiguration()
+   {
+      return serverImpl.getConfiguration();
+   }
+
+   public ServerInitializer<JBossASServer, JBossASServerConfig> getServerInitializer()
+   {
+      return serverImpl.getServerInitializer();
+   }
+
+   public LifecycleState getState()
+   {
+      return serverImpl.getState();
+   }
+
+   public ConfigurationValidator<JBossASServerConfig> getValidator()
+   {
+      return serverImpl.getValidator();
+   }
+
+   public void initialize() throws IllegalStateException, InvalidConfigurationException, LifecycleEventException
+   {
+      serverImpl.initialize();
+   }
+
+   public void registerEventHandler(final LifecycleEventHandler arg0, final EnumSet<LifecycleState> arg1)
+         throws IllegalArgumentException
+   {
+      serverImpl.registerEventHandler(arg0, arg1);
+   }
+
+   public void registerEventHandler(final LifecycleEventHandler arg0, final LifecycleState... arg1)
+         throws IllegalArgumentException
+   {
+      serverImpl.registerEventHandler(arg0, arg1);
+
+   }
+
+   public void registerEventHandler(final LifecycleState arg0, final LifecycleEventHandler arg1)
+         throws IllegalArgumentException
+   {
+      serverImpl.registerEventHandler(arg0, arg1);
+   }
+
+   public void registerEventHandlers(final LifecycleState arg0, final LifecycleEventHandler... arg1)
+         throws IllegalArgumentException
+   {
+      serverImpl.registerEventHandlers(arg0, arg1);
+   }
+
+   public void removeBootstrap(final Bootstrap<JBossASServer, JBossASServerConfig> arg0)
+         throws IllegalArgumentException
+   {
+      serverImpl.removeBootstrap(arg0);
+
+   }
+
+   public void setConfigInitializer(final ConfigurationInitializer<JBossASServerConfig> arg0)
+         throws IllegalStateException
+   {
+      serverImpl.setConfigInitializer(arg0);
+
+   }
+
+   public void setConfiguration(final JBossASServerConfig arg0)
+   {
+      serverImpl.setConfiguration(arg0);
+   }
+
+   public void setServerInitializer(final ServerInitializer<JBossASServer, JBossASServerConfig> arg0)
+         throws IllegalStateException
+   {
+      serverImpl.setServerInitializer(arg0);
+
+   }
+
+   public void setValidator(final ConfigurationValidator<JBossASServerConfig> arg0) throws IllegalStateException
+   {
+      serverImpl.setValidator(arg0);
+
+   }
+
+   public boolean unregisterEventHandler(final LifecycleEventHandler arg0, final LifecycleState arg1)
+         throws IllegalArgumentException
+   {
+      return serverImpl.unregisterEventHandler(arg0, arg1);
+   }
+   
    public void shutdown()
    {
-      if (log.isTraceEnabled())
-         log.trace("Shutdown caller:", new Throwable("Here"));
-      serverImpl.shutdown();
+      // JBAS-6916
+      // We'll shut down the server via the Main shutdown hook...
+//      if (log.isTraceEnabled())
+//         log.trace("Shutdown caller:", new Throwable("Here"));
+//      try{
+//         serverImpl.shutdown();
+//      }
+//      catch(Throwable t)
+//      {
+//         throw new RuntimeException("Error in shutdown of server: " + serverImpl,t);
+//      }
+      
+      // JBAS-6916:
+      //TODO This must be removed, VM exit is not a feature of server shutdown.
+      // Now exit the Runtime, because AS has non-daemon Threads still
+      // chugging away. 
+      new Thread()
+      {
+         public void run()
+         {
+            log.info("Server exit called, exiting the JVM now!");
+            Runtime.getRuntime().exit(1);
+         }
+      }.start();
    }
 
    /**
@@ -441,7 +582,7 @@
       try
       {
          MBeanServer registeredServer = mbeanServer;
-         if (serverConfig.getPlatformMBeanServer() == true)
+         if (serverConfig.isUsePlatformMBeanServer())
             registeredServer = LazyMBeanServer.getRegisteredMBeanServer(mbeanServer);
          MBeanServerFactory.releaseMBeanServer(registeredServer);
       }
@@ -466,7 +607,7 @@
 
       // Add the patch URL.  If the url protocol is file, then
       // add the contents of the directory it points to
-      URL patchURL = serverConfig.getPatchURL();
+      URL patchURL = null; //serverConfig.getPatchURL(); //TODO Supply a patchURL?
       if (patchURL != null)
       {
          if (patchURL.getProtocol().equals("file"))
@@ -493,7 +634,7 @@
       }
 
       // Add the mbeanServer configuration directory to be able to load serverConfig files as resources
-      list.add(serverConfig.getServerConfigURL());
+      list.add(serverConfig.getServerConfLocation());
       log.debug("Boot url list: " + list);
       
       return list;

Modified: branches/Branch_5_x/testsuite/.classpath
===================================================================
--- branches/Branch_5_x/testsuite/.classpath	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/testsuite/.classpath	2009-05-24 09:27:07 UTC (rev 89345)
@@ -51,8 +51,10 @@
 	<classpathentry kind="lib" path="/thirdparty/org/jboss/ws/lib/jbossws-common.jar" sourcepath="/thirdparty/org/jboss/ws/lib/jbossws-common-src.zip"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-kernel.jar" sourcepath="/thirdparty/jboss/microcontainer/lib/jboss-kernel-sources.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-dependency.jar" sourcepath="/thirdparty/jboss/microcontainer/lib/jboss-dependency-sources.jar"/>
-	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap/lib/jboss-bootstrap.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/org/slf4j/lib/slf4j-api.jar" sourcepath="/thirdparty/org/slf4j/lib/slf4j-api-sources.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/org/jboss/slf4j/lib/slf4j-jboss-logging.jar" sourcepath="/thirdparty/org/jboss/slf4j/lib/slf4j-jboss-logging-sources.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap-spi/lib/jboss-bootstrap-spi.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap-spi-as/lib/jboss-bootstrap-spi-as.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap-spi-mc/lib/jboss-bootstrap-spi-mc.jar"/>
 	<classpathentry kind="output" path="output/eclipse-classes"/>
 </classpath>

Modified: branches/Branch_5_x/testsuite/build.xml
===================================================================
--- branches/Branch_5_x/testsuite/build.xml	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/testsuite/build.xml	2009-05-24 09:27:07 UTC (rev 89345)
@@ -243,7 +243,9 @@
       <path refid="jboss.security.int.classpath"/>
       <path refid="jboss.server.classpath"/>
       <path refid="jboss.main.classpath"/>
-      <path refid="jboss.jboss.bootstrap.classpath"/>
+      <path refid="jboss.jboss.bootstrap.spi.as.classpath"/>
+   	  <path refid="jboss.jboss.bootstrap.spi.mc.classpath"/>
+      <path refid="jboss.jboss.bootstrap.spi.classpath"/>
       <path refid="jboss.system.classpath"/>
       <path refid="jboss.systemjmx.classpath"/>
       <path refid="jboss.test.classpath"/>

Modified: branches/Branch_5_x/testsuite/src/main/org/jboss/test/jmx/mbean/TestDeployer.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/jmx/mbean/TestDeployer.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/jmx/mbean/TestDeployer.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -21,21 +21,9 @@
  */
 package org.jboss.test.jmx.mbean;
 
-import javax.management.InstanceNotFoundException;
-import javax.management.MBeanException;
-import javax.management.MBeanServer;
-import javax.management.MalformedObjectNameException;
-
-import javax.management.ObjectName;
-import javax.management.ReflectionException;
-import javax.management.RuntimeMBeanException;
-import javax.management.loading.MLet;
-
 import java.io.File;
 
-import org.jboss.system.Service;
 import org.jboss.system.ServiceMBeanSupport;
-
 import org.jboss.system.server.ServerConfigLocator;
 
 /**
@@ -55,7 +43,7 @@
 {
    public String getBaseDir() throws Exception
    {
-      File file = ServerConfigLocator.locate().getServerHomeDir();
+      File file = new File(ServerConfigLocator.locate().getServerHomeLocation().toURI());
 
       return file.getCanonicalPath();
    }

Modified: branches/Branch_5_x/testsuite/src/main/org/jboss/test/jmx/xmbean/XMLAttributePersistenceManagerTestService.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/jmx/xmbean/XMLAttributePersistenceManagerTestService.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/jmx/xmbean/XMLAttributePersistenceManagerTestService.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -55,7 +55,7 @@
    protected void startService()
       throws Exception
    {
-      File tmpDir = ServerConfigLocator.locate().getServerTempDir();
+      File tmpDir = new File(ServerConfigLocator.locate().getServerTempLocation().toURI());
       boolean result;
       
       // Get a temporary file in the server tmp dir, with a space in its name

Modified: branches/Branch_5_x/thirdparty/pom.xml
===================================================================
--- branches/Branch_5_x/thirdparty/pom.xml	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/thirdparty/pom.xml	2009-05-24 09:27:07 UTC (rev 89345)
@@ -288,12 +288,47 @@
             </dependency>
             <dependency>
               <groupId>org.jboss.bootstrap</groupId>
-              <artifactId>jboss-bootstrap</artifactId>
+              <artifactId>jboss-bootstrap-impl-as</artifactId>
               <mapping>
-                <componentId>jboss.jboss-bootstrap</componentId>
+                <componentId>jboss.jboss-bootstrap-impl-as</componentId>
               </mapping>
             </dependency>
             <dependency>
+              <groupId>org.jboss.bootstrap</groupId>
+              <artifactId>jboss-bootstrap-impl-base</artifactId>
+              <mapping>
+                <componentId>jboss.jboss-bootstrap-impl-base</componentId>
+              </mapping>
+            </dependency>
+            <dependency>
+              <groupId>org.jboss.bootstrap</groupId>
+              <artifactId>jboss-bootstrap-impl-mc</artifactId>
+              <mapping>
+                <componentId>jboss.jboss-bootstrap-impl-mc</componentId>
+              </mapping>
+            </dependency>
+            <dependency>
+              <groupId>org.jboss.bootstrap</groupId>
+              <artifactId>jboss-bootstrap-spi</artifactId>
+              <mapping>
+                <componentId>jboss.jboss-bootstrap-spi</componentId>
+              </mapping>
+            </dependency>
+            <dependency>
+              <groupId>org.jboss.bootstrap</groupId>
+              <artifactId>jboss-bootstrap-spi-as</artifactId>
+              <mapping>
+                <componentId>jboss.jboss-bootstrap-spi-as</componentId>
+              </mapping>
+            </dependency>
+            <dependency>
+              <groupId>org.jboss.bootstrap</groupId>
+              <artifactId>jboss-bootstrap-spi-mc</artifactId>
+              <mapping>
+                <componentId>jboss.jboss-bootstrap-spi-mc</componentId>
+              </mapping>
+            </dependency>
+            <dependency>
               <groupId>org.jboss.cache</groupId>
               <artifactId>jbosscache-core</artifactId>
               <mapping>
@@ -1366,8 +1401,28 @@
     </dependency>
     <dependency>
       <groupId>org.jboss.bootstrap</groupId>
-      <artifactId>jboss-bootstrap</artifactId>
+      <artifactId>jboss-bootstrap-impl-as</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.jboss.bootstrap</groupId>
+      <artifactId>jboss-bootstrap-impl-base</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.bootstrap</groupId>
+      <artifactId>jboss-bootstrap-impl-mc</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.bootstrap</groupId>
+      <artifactId>jboss-bootstrap-spi</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.bootstrap</groupId>
+      <artifactId>jboss-bootstrap-spi-as</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.bootstrap</groupId>
+      <artifactId>jboss-bootstrap-spi-mc</artifactId>
+    </dependency>
  
     <!-- Combined integration jar.  Maybe this can be removed when we just use the 
     -  individual compoennts -->    

Modified: branches/Branch_5_x/tomcat/.classpath
===================================================================
--- branches/Branch_5_x/tomcat/.classpath	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/tomcat/.classpath	2009-05-24 09:27:07 UTC (rev 89345)
@@ -29,6 +29,8 @@
 	<classpathentry kind="lib" path="/thirdparty/jboss/aop/lib/jboss-aop.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-kernel.jar" sourcepath="/thirdparty/jboss/microcontainer/lib/jboss-kernel-sources.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-dependency.jar" sourcepath="/thirdparty/jboss/microcontainer/lib/jboss-dependency-sources.jar"/>
-	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap/lib/jboss-bootstrap.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap-spi/lib/jboss-bootstrap-spi.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap-spi-as/lib/jboss-bootstrap-spi-as.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap-spi-mc/lib/jboss-bootstrap-spi-mc.jar"/>
 	<classpathentry kind="output" path="output/eclipse-classes"/>
 </classpath>

Modified: branches/Branch_5_x/tomcat/build.xml
===================================================================
--- branches/Branch_5_x/tomcat/build.xml	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/tomcat/build.xml	2009-05-24 09:27:07 UTC (rev 89345)
@@ -90,7 +90,9 @@
       <path refid="hibernate.entitymanager.classpath"/>
       <path refid="jboss.jboss.javaee.classpath"/>
       <path refid="jboss.jboss.jaspi.api.classpath"/>
-      <path refid="jboss.jboss.bootstrap.classpath"/>
+      <path refid="jboss.jboss.bootstrap.spi.as.classpath"/>
+    	<path refid="jboss.jboss.bootstrap.spi.mc.classpath"/>
+      <path refid="jboss.jboss.bootstrap.spi.classpath"/>
       <path refid="jboss.system.classpath"/>
       <path refid="jboss.systemjmx.classpath"/>
       <path refid="jboss.jboss.security.spi.classpath"/>

Modified: branches/Branch_5_x/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatService.java
===================================================================
--- branches/Branch_5_x/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatService.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatService.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -46,7 +46,8 @@
 import org.apache.catalina.startup.CatalinaProperties;
 import org.apache.tomcat.util.IntrospectionUtils;
 import org.apache.tomcat.util.modeler.Registry;
-import org.jboss.bootstrap.spi.Server;
+import org.jboss.bootstrap.spi.as.server.JBossASServer;
+import org.jboss.bootstrap.spi.lifecycle.LifecycleState;
 import org.jboss.kernel.spi.dependency.KernelController;
 import org.jboss.kernel.spi.dependency.KernelControllerContext;
 import org.jboss.security.plugins.JaasSecurityManagerServiceMBean;
@@ -343,8 +344,8 @@
       // we'll never receive Server.START_NOTIFICATION_TYPE, so check
       // with the Server and start the connectors immediately, if this is the case.
       // Otherwise register to receive the server start-up notification.
-      Boolean started = (Boolean) server.getAttribute(ServerImplMBean.OBJECT_NAME, "Started");
-      if (started.booleanValue() == true)
+      LifecycleState currentState = (LifecycleState) server.getAttribute(ServerImplMBean.OBJECT_NAME, "State");
+      if (currentState.equals(LifecycleState.STARTED))
       {
          log.debug("Server '" + ServerImplMBean.OBJECT_NAME + "' already started, starting connectors now");
 
@@ -448,8 +449,9 @@
          throw new IllegalStateException("Must set TomcatDeployer before stopping");
 
       // Hot undeploy
-      Boolean inShutdown = (Boolean) server.getAttribute(ServerImplMBean.OBJECT_NAME, "InShutdown");
-      if (inShutdown.booleanValue() == false)
+      final LifecycleState currentState = (LifecycleState) server.getAttribute(ServerImplMBean.OBJECT_NAME, "State");
+      boolean inShutdown = currentState.equals(LifecycleState.STOPPING);
+      if (inShutdown == false)
       {
          log.debug("Server '" + ServerImplMBean.OBJECT_NAME + "' already started, stopping connectors now");
 
@@ -656,7 +658,7 @@
    public void handleNotification(Notification msg, Object handback)
    {
       String type = msg.getType();
-      if (type.equals(Server.START_NOTIFICATION_TYPE))
+      if (type.equals(JBossASServer.START_NOTIFICATION_TYPE))
       {
          log.debug("Saw " + type + " notification, starting connectors");
          try
@@ -668,7 +670,7 @@
             log.warn("Failed to startConnectors", e);
          }
       }
-      if (type.equals(Server.STOP_NOTIFICATION_TYPE))
+      if (type.equals(JBossASServer.STOP_NOTIFICATION_TYPE))
       {
          log.debug("Saw " + type + " notification, stopping connectors");
          try

Modified: branches/Branch_5_x/varia/.classpath
===================================================================
--- branches/Branch_5_x/varia/.classpath	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/varia/.classpath	2009-05-24 09:27:07 UTC (rev 89345)
@@ -19,11 +19,13 @@
 	<classpathentry kind="lib" path="/thirdparty/org/apache/lib/xmlsec.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/juddi/lib/juddi.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/beanshell/lib/bsh.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap-spi/lib/jboss-bootstrap-spi.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap-spi-as/lib/jboss-bootstrap-spi-as.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap-spi-mc/lib/jboss-bootstrap-spi-mc.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-deployers/lib/jboss-deployers-client.jar" sourcepath="/thirdparty/jboss/jboss-deployers/lib/jboss-deployers-client-sources.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/junit/lib/junit.jar" sourcepath="/thirdparty/junit/lib/junit-src.zip"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/web/lib/servlet-api.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-dependency.jar" sourcepath="/thirdparty/jboss/microcontainer/lib/jboss-dependency-sources.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-kernel.jar" sourcepath="/thirdparty/jboss/microcontainer/lib/jboss-kernel-sources.jar"/>
-	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-bootstrap/lib/jboss-bootstrap.jar"/>
 	<classpathentry kind="output" path="output/eclipse-classes"/>
 </classpath>

Modified: branches/Branch_5_x/varia/build.xml
===================================================================
--- branches/Branch_5_x/varia/build.xml	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/varia/build.xml	2009-05-24 09:27:07 UTC (rev 89345)
@@ -117,7 +117,9 @@
       <path refid="jboss.common.logging.jdk.classpath"/>
       <path refid="jboss.jmx.classpath"/>
       <path refid="jboss.cluster.classpath"/>
-      <path refid="jboss.jboss.bootstrap.classpath"/>
+      <path refid="jboss.jboss.bootstrap.spi.as.classpath"/>
+    	<path refid="jboss.jboss.bootstrap.spi.mc.classpath"/>
+      <path refid="jboss.jboss.bootstrap.spi.classpath"/>
       <path refid="jboss.system.classpath"/>
       <path refid="jboss.systemjmx.classpath"/>
       <path refid="jboss.j2se.classpath"/>

Modified: branches/Branch_5_x/varia/pom.xml
===================================================================
--- branches/Branch_5_x/varia/pom.xml	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/varia/pom.xml	2009-05-24 09:27:07 UTC (rev 89345)
@@ -44,7 +44,7 @@
     <!-- Compile (global dependencies) -->
     <dependency>
       <groupId>org.jboss.bootstrap</groupId>
-      <artifactId>jboss-bootstrap</artifactId>
+      <artifactId>jboss-bootstrap-impl-as</artifactId>
     </dependency>
     
     <dependency>

Modified: branches/Branch_5_x/varia/src/main/org/jboss/jdbc/HypersonicDatabase.java
===================================================================
--- branches/Branch_5_x/varia/src/main/org/jboss/jdbc/HypersonicDatabase.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/varia/src/main/org/jboss/jdbc/HypersonicDatabase.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -35,7 +35,7 @@
 /**
  * Integration with <a href="http://sourceforge.net/projects/hsqldb">HSQLDB</a>
  *
- * @author <a href="mailto:rickard.oberg at telkel.com">Rickard Öberg</a>
+ * @author <a href="mailto:rickard.oberg at telkel.com">Rickard �berg</a>
  * @author <a href="mailto:Scott_Stark at displayscape.com">Scott Stark</a>.
  * @author <a href="mailto:pf at iprobot.com">Peter Fagerlund</a>
  * @author <a href="mailto:jason at planet57.com">Jason Dillon</a>
@@ -601,7 +601,7 @@
       // Get the server data directory
       File dataDir = null;
 
-      if (dbDataDir == null) dataDir = ServerConfigLocator.locate().getServerDataDir();
+      if (dbDataDir == null) dataDir = new File(ServerConfigLocator.locate().getServerDataLocation().toURI());
       else dataDir = new File(dbDataDir);
 
       // Get DB directory
@@ -643,7 +643,8 @@
    {
       // Get the server data directory
       File dataDir = null;
-      if (dbDataDir == null) dataDir = ServerConfigLocator.locate().getServerDataDir();
+      if (dbDataDir == null)
+         dataDir = new File(ServerConfigLocator.locate().getServerDataLocation().toURI());
       else dataDir = new File(dbDataDir);
 
       // Get DB directory

Modified: branches/Branch_5_x/varia/src/main/org/jboss/jmx/adaptor/snmp/agent/SnmpAgentService.java
===================================================================
--- branches/Branch_5_x/varia/src/main/org/jboss/jmx/adaptor/snmp/agent/SnmpAgentService.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/varia/src/main/org/jboss/jmx/adaptor/snmp/agent/SnmpAgentService.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -25,7 +25,7 @@
 import javax.management.Notification;
 import javax.management.ObjectName;
 
-import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
 import org.jboss.system.ListenerServiceMBeanSupport;
 import org.opennms.protocols.snmp.SnmpAgentSession;
 import org.opennms.protocols.snmp.SnmpPeer;
@@ -568,7 +568,7 @@
    {
       // cater for possible global -b option, if no override has been specified
       InetAddress address = this.bindAddress != null ? this.bindAddress :
-            toInetAddress(System.getProperty(ServerConfig.SERVER_BIND_ADDRESS));
+            toInetAddress(System.getProperty(JBossASServerConfig.PROP_KEY_JBOSSAS_BIND_ADDRESS));
       
       // the listening address
       SnmpPeer peer = new SnmpPeer(address, this.port);

Modified: branches/Branch_5_x/varia/src/main/org/jboss/jmx/adaptor/snmp/agent/TrapEmitter.java
===================================================================
--- branches/Branch_5_x/varia/src/main/org/jboss/jmx/adaptor/snmp/agent/TrapEmitter.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/varia/src/main/org/jboss/jmx/adaptor/snmp/agent/TrapEmitter.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -30,7 +30,8 @@
 
 import javax.management.Notification;
 
-import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.bootstrap.spi.as.config.JBossASConfigurationInitializer;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
 import org.jboss.jmx.adaptor.snmp.config.manager.Manager;
 import org.jboss.logging.Logger;
 import org.jboss.xb.binding.MappingObjectModelFactory;
@@ -299,8 +300,8 @@
    {
       if (host == null || host.length() == 0) {
          
-         String defaultBindAddress = System.getProperty(ServerConfig.SERVER_BIND_ADDRESS);
-         if (defaultBindAddress != null && !defaultBindAddress.equals("0.0.0.0"))
+         String defaultBindAddress = System.getProperty(JBossASServerConfig.PROP_KEY_JBOSSAS_BIND_ADDRESS);
+         if (defaultBindAddress != null && !defaultBindAddress.equals(JBossASConfigurationInitializer.VALUE_BIND_ADDRESS_ANY))
             return InetAddress.getByName(defaultBindAddress);
          else
             return InetAddress.getLocalHost();

Modified: branches/Branch_5_x/varia/src/main/org/jboss/jmx/adaptor/snmp/trapd/TrapdService.java
===================================================================
--- branches/Branch_5_x/varia/src/main/org/jboss/jmx/adaptor/snmp/trapd/TrapdService.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/varia/src/main/org/jboss/jmx/adaptor/snmp/trapd/TrapdService.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -22,7 +22,7 @@
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 
-import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
 import org.jboss.system.ServiceMBeanSupport;
 import org.opennms.protocols.snmp.SnmpTrapSession;
 
@@ -126,7 +126,8 @@
       try {
          // cater for possible global -b option, if no override has been specified
          InetAddress address = this.bindAddress != null ? this.bindAddress :
-               toInetAddress(System.getProperty(ServerConfig.SERVER_BIND_ADDRESS));
+               toInetAddress(System
+               .getProperty(JBossASServerConfig.PROP_KEY_JBOSSAS_BIND_ADDRESS));
          
          this.trapSession =
             new SnmpTrapSession(new TrapReceiver(this.log), this.port, address);

Modified: branches/Branch_5_x/varia/src/main/org/jboss/services/binding/impl/Util.java
===================================================================
--- branches/Branch_5_x/varia/src/main/org/jboss/services/binding/impl/Util.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/varia/src/main/org/jboss/services/binding/impl/Util.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -33,7 +33,7 @@
 import java.net.URL;
 import java.net.URLConnection;
 
-import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
 import org.jboss.services.binding.ServiceBinding;
 import org.jboss.services.binding.ServiceBindingValueSource;
 
@@ -140,7 +140,7 @@
    
    public static File createTempFile() throws IOException
    {
-      String tmpName = SecurityActions.getSystemProperty(ServerConfig.SERVER_TEMP_DIR, "");
+      String tmpName = System.getProperty(JBossASServerConfig.PROP_KEY_JBOSSAS_SERVER_TEMP_DIR,"");
       File tempDirectory = new File(tmpName);
       File targetFile = File.createTempFile("service-binding", ".tmp", tempDirectory);
       targetFile.deleteOnExit();

Modified: branches/Branch_5_x/varia/src/main/org/jboss/services/deployment/DeploymentManager.java
===================================================================
--- branches/Branch_5_x/varia/src/main/org/jboss/services/deployment/DeploymentManager.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/varia/src/main/org/jboss/services/deployment/DeploymentManager.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -49,7 +49,6 @@
 
 import org.apache.velocity.VelocityContext;
 import org.apache.velocity.app.VelocityEngine;
-import org.jboss.bootstrap.spi.ServerConfig;
 import org.jboss.deployment.DeploymentInfo;
 import org.jboss.logging.Logger;
 import org.jboss.mx.util.MBeanServerLocator;
@@ -574,7 +573,7 @@
      catch(Exception e) {
        // Otherwise, try to see inside the jboss directory hierarchy
 
-        File homeDir = ServerConfigLocator.locate().getServerHomeDir();
+        File homeDir = new File(ServerConfigLocator.locate().getServerHomeLocation().toURI());
 
         dir = new File(homeDir, targetDir);
 

Modified: branches/Branch_5_x/varia/src/main/org/jboss/services/deployment/LibraryManager.java
===================================================================
--- branches/Branch_5_x/varia/src/main/org/jboss/services/deployment/LibraryManager.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/varia/src/main/org/jboss/services/deployment/LibraryManager.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -23,9 +23,10 @@
 
 import java.io.File;
 import java.io.IOException;
+import java.net.URISyntaxException;
 import java.net.URL;
 
-import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
 import org.jboss.logging.Logger;
 import org.jboss.system.server.ServerConfigLocator;
 import org.jboss.util.file.Files;
@@ -65,13 +66,20 @@
    private LibraryManager()
    {
       // discover if there is a local server library dir
-      ServerConfig config = ServerConfigLocator.locate();
-      URL serverLibURL = config.getServerLibraryURL();
+      JBossASServerConfig config = ServerConfigLocator.locate();
+      URL serverLibURL = config.getServerLibLocation();
       
       if (serverLibURL != null && serverLibURL.getProtocol().startsWith("file"))
       {
          this.serverLibDir = new File(serverLibURL.getFile());
-         this.serverTmpDir = config.getServerTempDir();
+         try
+         {
+            this.serverTmpDir = new File(config.getServerTempLocation().toURI());
+         }
+         catch (URISyntaxException urise)
+         {
+            throw new RuntimeException("Error in initialization", urise);
+         }
          log.debug("Using serverLibDir: " + this.serverLibDir);
          log.debug("Using serverTmpDir: " + this.serverTmpDir);
       }

Modified: branches/Branch_5_x/varia/src/main/org/jboss/varia/deployment/FoeDeployer.java
===================================================================
--- branches/Branch_5_x/varia/src/main/org/jboss/varia/deployment/FoeDeployer.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/varia/src/main/org/jboss/varia/deployment/FoeDeployer.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -27,40 +27,35 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
-
-import java.net.URL;
 import java.net.MalformedURLException;
-
+import java.net.URL;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Enumeration;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.ListIterator;
-import java.util.Enumeration;
-import java.util.HashMap;
 import java.util.Map;
-import java.util.jar.JarFile;
 import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
 
 import javax.management.MBeanServer;
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
 
-import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
 import org.jboss.deployment.DeploymentException;
 import org.jboss.deployment.DeploymentInfo;
 import org.jboss.deployment.MainDeployerMBean;
 import org.jboss.deployment.SubDeployer;
 import org.jboss.deployment.SubDeployerSupport;
-
+import org.jboss.mx.util.MBeanProxyExt;
 import org.jboss.system.ServiceControllerMBean;
 import org.jboss.system.server.ServerConfigLocator;
-
 import org.jboss.util.Counter;
 import org.jboss.util.file.Files;
 import org.jboss.util.file.JarUtils;
-import org.jboss.mx.util.MBeanProxyExt;
-
 import org.jboss.varia.deployment.convertor.Convertor;
 
 /**
@@ -360,10 +355,10 @@
          server
       );
 
-      ServerConfig config = ServerConfigLocator.locate();
+      JBossASServerConfig config = ServerConfigLocator.locate();
 
       // build the scratch directory
-      File tempDirectory = config.getServerTempDir();
+      File tempDirectory = new File(config.getServerTempLocation().toURI());
       scratchDirectory = new File(tempDirectory, "foe");
       if(!scratchDirectory.exists())
          scratchDirectory.mkdirs();

Modified: branches/Branch_5_x/varia/src/main/org/jboss/varia/property/SystemPropertiesService.java
===================================================================
--- branches/Branch_5_x/varia/src/main/org/jboss/varia/property/SystemPropertiesService.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/varia/src/main/org/jboss/varia/property/SystemPropertiesService.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -21,6 +21,7 @@
  */
 package org.jboss.varia.property;
 
+import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.MalformedURLException;
@@ -34,6 +35,7 @@
 import java.util.SortedSet;
 import java.util.StringTokenizer;
 import java.util.TreeSet;
+
 import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
@@ -394,7 +396,7 @@
       throws Exception
    {
       // get server's home for relative paths, need this for making urls
-      serverHome = ServerConfigLocator.locate().getServerHomeDir().getPath();
+      serverHome = new File(ServerConfigLocator.locate().getServerHomeLocation().toURI()).getPath();
 
       return super.preRegister(server, name);
    }

Modified: branches/Branch_5_x/varia/src/tests/org/jboss/test/services/binding/test/ServiceBindingTestBase.java
===================================================================
--- branches/Branch_5_x/varia/src/tests/org/jboss/test/services/binding/test/ServiceBindingTestBase.java	2009-05-24 00:44:03 UTC (rev 89344)
+++ branches/Branch_5_x/varia/src/tests/org/jboss/test/services/binding/test/ServiceBindingTestBase.java	2009-05-24 09:27:07 UTC (rev 89345)
@@ -38,6 +38,7 @@
 import junit.framework.Assert;
 import junit.framework.TestCase;
 
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
 import org.jboss.services.binding.ServiceBinding;
 import org.jboss.services.binding.ServiceBindingMetadata;
 import org.jboss.services.binding.impl.XSLTServiceBindingValueSourceConfig;
@@ -70,6 +71,8 @@
  
    private static final String SERVER_TEMP_DIR_PROPERTY = "jboss.server.temp.dir";
    
+   private static final String SYS_PROP_SERVER_TEMP_DIR = JBossASServerConfig.PROP_KEY_JBOSSAS_SERVER_TEMP_DIR;
+   
    protected ServiceBindingMetadata bindingMetadata;
    protected ServiceBinding binding;
    
@@ -95,10 +98,11 @@
       if (existingElementEditor == null)
          PropertyEditorManager.registerEditor(Element.class, ElementEditor.class);
       
-      serverTempDir = System.getProperty(SERVER_TEMP_DIR_PROPERTY);
+      serverTempDir = System.getProperty(SYS_PROP_SERVER_TEMP_DIR);
       if (serverTempDir == null)
-         System.setProperty(SERVER_TEMP_DIR_PROPERTY, System.getProperty("java.io.tmpdir"));
-      
+      {
+         System.setProperty(SYS_PROP_SERVER_TEMP_DIR, System.getProperty("java.io.tmpdir"));
+      }
       bindingMetadata = new ServiceBindingMetadata(SVC_NAME, BINDING_NAME, HOST, PORT, false, false);
       binding = new ServiceBinding(bindingMetadata, HOST, 0);
    }
@@ -109,7 +113,9 @@
       if (existingElementEditor == null)
          PropertyEditorManager.registerEditor(Element.class, null);
       if (serverTempDir == null)
-         System.clearProperty(SERVER_TEMP_DIR_PROPERTY);
+      {
+         System.clearProperty(SYS_PROP_SERVER_TEMP_DIR);
+      }
       
       super.tearDown();
    }
@@ -206,4 +212,4 @@
    
    
 
-}
\ No newline at end of file
+}




More information about the jboss-cvs-commits mailing list