[jboss-cvs] JBossAS SVN: r91844 - in projects/bootstrap/trunk: api/src/main/java/org/jboss/bootstrap/api/server and 41 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Jul 30 16:42:54 EDT 2009
Author: ALRubinger
Date: 2009-07-30 16:42:52 -0400 (Thu, 30 Jul 2009)
New Revision: 91844
Added:
projects/bootstrap/trunk/api-as/src/main/java/org/
projects/bootstrap/trunk/api-as/src/main/java/org/jboss/
projects/bootstrap/trunk/api-as/src/main/java/org/jboss/bootstrap/
projects/bootstrap/trunk/api-as/src/main/java/org/jboss/bootstrap/api/
projects/bootstrap/trunk/api-as/src/main/java/org/jboss/bootstrap/api/as/
projects/bootstrap/trunk/api-as/src/main/java/org/jboss/bootstrap/api/as/config/
projects/bootstrap/trunk/api-as/src/main/java/org/jboss/bootstrap/api/as/config/JBossASBasedServerConfig.java
projects/bootstrap/trunk/api-as/src/main/java/org/jboss/bootstrap/api/as/config/JBossASServerConfig.java
projects/bootstrap/trunk/api-as/src/main/java/org/jboss/bootstrap/api/as/config/JBossASServerConfigFactory.java
projects/bootstrap/trunk/api-as/src/main/java/org/jboss/bootstrap/api/as/config/SecurityActions.java
projects/bootstrap/trunk/api-as/src/main/java/org/jboss/bootstrap/api/as/server/
projects/bootstrap/trunk/api-mc/
projects/bootstrap/trunk/api-mc/.classpath
projects/bootstrap/trunk/api-mc/.project
projects/bootstrap/trunk/api-mc/.settings/
projects/bootstrap/trunk/api-mc/.settings/org.eclipse.jdt.core.prefs
projects/bootstrap/trunk/api-mc/.settings/org.maven.ide.eclipse.prefs
projects/bootstrap/trunk/api-mc/pom.xml
projects/bootstrap/trunk/api-mc/src/
projects/bootstrap/trunk/api-mc/src/main/
projects/bootstrap/trunk/api-mc/src/main/java/
projects/bootstrap/trunk/api-mc/src/main/java/org/
projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/
projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/
projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/
projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/
projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/config/
projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/config/MCBasedServerConfig.java
projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/config/MCServerConfig.java
projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/config/MCServerConfigFactory.java
projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/config/SecurityActions.java
projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/server/
projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/server/MCBasedServer.java
projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/server/MCServer.java
projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/server/MCServerFactory.java
projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/server/SecurityActions.java
projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/server/MCBasedServerProvider.java
projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/server/MCServerProvider.java
Removed:
projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/api/as/server/
projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/config/JBossASBasedServerConfig.java
projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/config/JBossASServerConfig.java
projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/config/JBossASServerConfigFactory.java
projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/config/SecurityActions.java
projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/config/
projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/server/MCBasedServer.java
projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/server/MCServer.java
projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/server/MCServerFactory.java
projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/server/SecurityActions.java
Modified:
projects/bootstrap/trunk/api-as/src/main/java/org/jboss/bootstrap/api/as/server/JBossASBasedServer.java
projects/bootstrap/trunk/api-as/src/main/java/org/jboss/bootstrap/api/as/server/JBossASServer.java
projects/bootstrap/trunk/api-as/src/main/java/org/jboss/bootstrap/api/as/server/JBossASServerFactory.java
projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/server/Server.java
projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/config/BasicJBossASServerConfig.java
projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/config/JBossASBasedConfigurationValidator.java
projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/config/JBossASConfigurationInitializerImpl.java
projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/config/JBossASServerConfigLegacy.java
projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/lifecycle/AbstractKernelEventLifecycleEventHandler.java
projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/lifecycle/KernelStartEventLifecycleEventHandler.java
projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/lifecycle/KernelStopEventLifecycleEventHandler.java
projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/lifecycle/VfsInitializingLifecycleEventHandler.java
projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/server/AbstractJBossASServerBase.java
projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/server/JBossASServerImpl.java
projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/server/JBossASServerInitializer.java
projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/config/JBossASConfigurationInitializationTestCase.java
projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/config/JBossASConfigurationPropertyOverrideTestCase.java
projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/config/JBossASConfigurationValidationTestCase.java
projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/config/PropertyValueResolutionTestCase.java
projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/server/JBossASServerInitializationTestCase.java
projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/server/JBossASServerOperationsTestCase.java
projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/server/KernelEventsTestCase.java
projects/bootstrap/trunk/impl-base/src/main/java/org/jboss/bootstrap/impl/base/server/AbstractServer.java
projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/unit/JmxNotificationsTestCase.java
projects/bootstrap/trunk/impl-mc/pom.xml
projects/bootstrap/trunk/impl-mc/src/main/java/org/jboss/bootstrap/impl/mc/config/BasicMCServerConfig.java
projects/bootstrap/trunk/impl-mc/src/main/java/org/jboss/bootstrap/impl/mc/config/MCConfigurationInitializer.java
projects/bootstrap/trunk/impl-mc/src/main/java/org/jboss/bootstrap/impl/mc/config/MCConfigurationValidator.java
projects/bootstrap/trunk/impl-mc/src/main/java/org/jboss/bootstrap/impl/mc/server/AbstractMCServerBase.java
projects/bootstrap/trunk/impl-mc/src/main/java/org/jboss/bootstrap/impl/mc/server/MCServerImpl.java
projects/bootstrap/trunk/impl-mc/src/main/java/org/jboss/bootstrap/impl/mc/server/MCServerInitializer.java
projects/bootstrap/trunk/impl-mc/src/test/java/org/jboss/bootstrap/impl/mc/jboot45/unit/DefaultConfigUnitTestCase.java
projects/bootstrap/trunk/impl-mc/src/test/java/org/jboss/bootstrap/impl/mc/server/unit/MCServerUnitTestCase.java
projects/bootstrap/trunk/pom.xml
projects/bootstrap/trunk/spi-as/pom.xml
projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/JBossASBootstrap.java
projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/config/JBossASBasedConfigurationInitializer.java
projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/config/JBossASConfigurationInitializer.java
projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/JBossASBasedServerProvider.java
projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/JBossASServerProvider.java
projects/bootstrap/trunk/spi-mc/pom.xml
projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/server/ServerProvider.java
Log:
[JBBOOT-102] Introduce "api-mc" and "api-as" to hold the client view only, keep SPIs for the provider end
Modified: projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/server/Server.java
===================================================================
--- projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/server/Server.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/server/Server.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -41,20 +41,6 @@
public interface Server<K extends Server<K, T>, T extends ServerConfig<T>>
{
//-------------------------------------------------------------------------------------||
- // Constants --------------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * The JMX notification event type sent on end of server startup
- */
- public final String START_NOTIFICATION_TYPE = "org.jboss.system.server.started";
-
- /**
- * The JMX notification event type sent on begin of the server shutdown
- */
- public final String STOP_NOTIFICATION_TYPE = "org.jboss.system.server.stopped";
-
- //-------------------------------------------------------------------------------------||
// Contracts --------------------------------------------------------------------------||
//-------------------------------------------------------------------------------------||
Copied: projects/bootstrap/trunk/api-as/src/main/java/org/jboss/bootstrap/api/as/config/JBossASBasedServerConfig.java (from rev 91833, projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/config/JBossASBasedServerConfig.java)
===================================================================
--- projects/bootstrap/trunk/api-as/src/main/java/org/jboss/bootstrap/api/as/config/JBossASBasedServerConfig.java (rev 0)
+++ projects/bootstrap/trunk/api-as/src/main/java/org/jboss/bootstrap/api/as/config/JBossASBasedServerConfig.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -0,0 +1,628 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bootstrap.api.as.config;
+
+import java.net.URL;
+
+import org.jboss.bootstrap.api.config.ServerConfig;
+
+/**
+ * JBossASBasedServerConfig
+ *
+ * Contract for the configuration of AS-based Servers,
+ * may be extended for a direct AS ServerConfig
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface JBossASBasedServerConfig<T extends JBossASBasedServerConfig<T>> extends ServerConfig<T>
+{
+ //-------------------------------------------------------------------------------||
+ // Constants --------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------||
+
+ /**
+ * Constant that holds the name of the system or
+ * configuration property
+ */
+ String PROP_KEY_JBOSSAS_BIND_ADDRESS = "jboss.bind.address";
+
+ /**
+ * Constant that holds the name of the system or configuration
+ * property which specifies the name of the server which will be used to
+ * calculate the servers home directory and url.
+ */
+ String PROP_KEY_JBOSSAS_SERVER_NAME = "jboss.server.name";
+
+ /**
+ * Constant that holds the name of the environment
+ * variable which specifies the root of the AS
+ * installation
+ */
+ String ENV_VAR_JBOSSAS_HOME = "JBOSS_HOME";
+
+ /**
+ * Constant that holds the name of the system or configuration
+ * property which specifies the root of the AS
+ * installation
+ */
+ String PROP_KEY_JBOSSAS_HOME = "jboss.home";
+
+ /**
+ * Constant that holds the name of the system property
+ * which specifies the home directory for JBossAS.
+ */
+ String PROP_KEY_JBOSSAS_HOME_DIR = "jboss.home.dir";
+
+ /**
+ * Constant that holds the name of the system property
+ * which specifies the home URL for JBossAS.
+ */
+ String PROP_KEY_JBOSSAS_HOME_URL = "jboss.home.url";
+
+ /**
+ * Constant that holds the name of the system property
+ * for specifying the URL where JBoss will read library files
+ * from.
+ */
+ String PROP_KEY_JBOSSAS_BOOT_LIBRARY_URL = "jboss.lib.url";
+
+ /**
+ * Constant that holds the name of the system property
+ * for specifying the base directory for calculating server
+ * home directories.
+ */
+ String PROP_KEY_JBOSSAS_SERVER_BASE_DIR = "jboss.server.base.dir";
+
+ /**
+ * Constant that holds the name of the system property
+ * for specifying the base URL for calculating server
+ * home URLs.
+ */
+ String PROP_KEY_JBOSSAS_SERVER_BASE_URL = "jboss.server.base.url";
+
+ /**
+ * Constant that holds the name of the system property
+ * for specifying the server home directory for JBoss.
+ */
+ String PROP_KEY_JBOSSAS_SERVER_HOME_DIR = "jboss.server.home.dir";
+
+ /**
+ * Constant that holds the name of the system property
+ * for specifying the server home URL for JBoss.
+ */
+ String PROP_KEY_JBOSSAS_SERVER_HOME_URL = "jboss.server.home.url";
+
+ /**
+ * Constant that holds the name of the system property
+ * for specifying the base URL for files and directories
+ * common to different server configurations
+ */
+ String PROP_KEY_JBOSSAS_COMMON_BASE_URL = "jboss.common.base.url";
+
+ /**
+ * Constant that holds the name of the system property
+ * for specifying a library directory URL that points to libraries
+ * shared by the various server configurations.
+ */
+ String PROP_KEY_JBOSSAS_COMMON_LIBRARY_URL = "jboss.common.lib.url";
+
+ /**
+ * Constant that holds the name of the system property
+ * for specifying the server log directory for JBoss.
+ */
+ String PROP_KEY_JBOSSAS_SERVER_LOG_DIR = "jboss.server.log.dir";
+
+ /**
+ * Constant that holds the name of the system property
+ * for specifying the server configuration URL.
+ */
+ String PROP_KEY_JBOSSAS_SERVER_CONF_URL = "jboss.server.config.url";
+
+ /**
+ * Constant that holds the name of the system property
+ * for specifying the URL where JBoss will read server specific
+ * library files from.
+ */
+ String PROP_KEY_JBOSSAS_SERVER_LIBRARY_URL = "jboss.server.lib.url";
+
+ /**
+ * Constant that holds the name of the system property
+ * for specifying the directory which JBoss will use for
+ * persistent data file storage.
+ */
+ String PROP_KEY_JBOSSAS_SERVER_DATA_DIR = "jboss.server.data.dir";
+
+ /**
+ * Constant that holds the name of the system property
+ * for specifying the directory which JBoss will use for
+ * temporary file storage.
+ */
+ String PROP_KEY_JBOSSAS_SERVER_TEMP_DIR = "jboss.server.temp.dir";
+
+ /**
+ * Constant that holds the name of the system property
+ * for specifying the partition name for this instance in clustering
+ */
+ String PROP_KEY_JBOSSAS_PARTITION_NAME = "jboss.partition.name";
+
+ /**
+ * Constant that holds the name of the system property
+ * for specifying the UDP Group for this instance in clustering
+ */
+ String PROP_KEY_JBOSSAS_PARTITION_UDP_GROUP = "jboss.partition.udpGroup";
+
+ /**
+ * Constant that holds the name of the system property
+ * for specifying the UDP Port for this instance in clustering
+ */
+ String PROP_KEY_JBOSSAS_PARTITION_UDP_PORT = "jboss.jgroups.udp.mcast_port";
+
+ /**
+ * Constant that holds the name of the system property
+ * designating whether to load native libraries
+ */
+ String PROP_KEY_JBOSSAS_NATIVE_LOAD = "jboss.native.load";
+
+ /**
+ * Constant that holds the location of native libraries
+ */
+ String PROP_KEY_JBOSSAS_NATIVE_DIR = "jboss.native.dir";
+
+ /**
+ * Constant that holds the name of the system property for specifying
+ * whether or not to use as the main jboss server the MBeanServer returned
+ * from ManagementFactory.getPlatformMBeanServer(), when running under jdk1.5+
+ *
+ * <p>If not set then jboss will instantiate its own MBeanServer
+ */
+ String PROP_KEY_JBOSSAS_PLATFORM_MBEANSERVER = "jboss.platform.mbeanserver";
+
+ //-------------------------------------------------------------------------------||
+ // Contracts --------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------||
+
+ /**
+ * Obtains the bind address to be used for the Server.
+ *
+ * @return
+ */
+ String getBindAddress();
+
+ /**
+ * Sets the bind address for the server
+ *
+ * @param bindAddress
+ * @return
+ */
+ T bindAddress(String bindAddress);
+
+ /**
+ * Obtains the name of the server configuration.
+ *
+ * @return
+ */
+ String getServerName();
+
+ /**
+ * Sets the name of the server configuration
+ *
+ * @param serverName
+ * @return
+ */
+ T serverName(String serverName);
+
+ /**
+ * Obtains the $JBOSS_HOME, the path to the
+ * root location of the JBossAS
+ * installation.
+ *
+ * @return
+ */
+ URL getJBossHome();
+
+ /**
+ * Sets $JBOSS_HOME, the path to the root location
+ * of the JBossAS installation.
+ *
+ * @param jbossHome The location to $JBOSS_HOME
+ * @return This configuration
+ * @throws IllegalArgumentException If the specified argument
+ * is non-null and cannot be constructed into a URL
+ */
+ T jbossHome(String jbossHome) throws IllegalArgumentException;
+
+ /**
+ * Sets $JBOSS_HOME, the path to the root location
+ * of the JBossAS installation.
+ *
+ * @param jbossHome The location to $JBOSS_HOME
+ * @return This configuration
+ */
+ T jbossHome(URL jbossHome);
+
+ /**
+ * Obtains the location of the JBossAS
+ * Boot Libraries
+ *
+ * @return
+ */
+ URL getBootLibraryLocation();
+
+ /**
+ * Sets the location of the JBossAS
+ * Boot Libraries
+ *
+ * @param bootLibraryLocation
+ * @return
+ */
+ T bootLibraryLocation(URL bootLibraryLocation);
+
+ /**
+ * Sets the location of the JBossAS
+ * Boot Libraries
+ *
+ * @param bootLibraryLocation
+ * @return
+ * @throws IllegalArgumentException If the specified argument
+ * is non-null and cannot be constructed into a URL
+ */
+ T bootLibraryLocation(String bootLibraryLocation) throws IllegalArgumentException;
+
+ /**
+ * Obtains the location of the server base, from
+ * which server homes (by default) decend
+ *
+ * @return
+ */
+ URL getServerBaseLocation();
+
+ /**
+ * Sets the location of the server
+ * base, from which server homes (by default)
+ * decend
+ *
+ * @param serverBaseLocation
+ * @return
+ */
+ T serverBaseLocation(URL serverBaseLocation);
+
+ /**
+ * Sets the location of the server
+ * base, from which server homes (by default)
+ * decend
+ *
+ * @param serverBaseLocation
+ * @return
+ * @throws IllegalArgumentException If the specified argument
+ * is non-null and cannot be constructed into a URL
+ */
+ T serverBaseLocation(String serverBaseLocation) throws IllegalArgumentException;
+
+ /**
+ * Obtains the location of the server home
+ *
+ * @return
+ */
+ URL getServerHomeLocation();
+
+ /**
+ * Sets the location of the server home
+ *
+ * @param serverBaseLocation
+ * @return
+ */
+ T serverHomeLocation(URL serverHomeLocation);
+
+ /**
+ * Sets the location of the server home
+ *
+ * @param serverHomeLocation
+ * @return
+ * @throws IllegalArgumentException If the specified argument
+ * is non-null and cannot be constructed into a URL
+ */
+ T serverHomeLocation(String serverHomeLocation) throws IllegalArgumentException;
+
+ /**
+ * Obtains the location of the common base
+ *
+ * @return
+ */
+ URL getCommonBaseLocation();
+
+ /**
+ * Sets the location of the common base
+ *
+ * @param serverBaseLocation
+ * @return
+ */
+ T commonBaseLocation(URL commonBaseLocation);
+
+ /**
+ * Sets the location of the common base
+ *
+ * @param commonBaseLocation
+ * @return
+ * @throws IllegalArgumentException If the specified argument
+ * is non-null and cannot be constructed into a URL
+ */
+ T commonBaseLocation(String commonBaseLocation) throws IllegalArgumentException;
+
+ /**
+ * Obtains the location of the common lib
+ *
+ * @return
+ */
+ URL getCommonLibLocation();
+
+ /**
+ * Sets the location of the common lib
+ *
+ * @param commonLibLocation
+ * @return
+ */
+ T commonLibLocation(URL commonLibLocation);
+
+ /**
+ * Sets the location of the common lib
+ *
+ * @param commonLibLocation
+ * @return
+ * @throws IllegalArgumentException If the specified argument
+ * is non-null and cannot be constructed into a URL
+ */
+ T commonLibLocation(String commonLibLocation) throws IllegalArgumentException;
+
+ /**
+ * Obtains the location in which the server logs reside
+ *
+ * @return
+ */
+ URL getServerLogLocation();
+
+ /**
+ * Sets the location in which the server logs reside
+ *
+ * @param serverLogLocation
+ * @return
+ */
+ T serverLogLocation(URL serverLogLocation);
+
+ /**
+ * Sets the location in which the server logs reside
+ *
+ * @param serverLogLocation
+ * @return
+ * @throws IllegalArgumentException If the specified argument
+ * is non-null and cannot be constructed into a URL
+ */
+ T serverLogLocation(String serverLogLocation) throws IllegalArgumentException;
+
+ /**
+ * Obtains the location in which the server configuration resides
+ *
+ * @return
+ */
+ URL getServerConfLocation();
+
+ /**
+ * Sets the location in which the server configuration resides
+ *
+ * @param serverConfLocation
+ * @return
+ */
+ T serverConfLocation(URL serverConfLocation);
+
+ /**
+ * Sets the location in which the server configuration resides
+ *
+ * @param serverConfLocation
+ * @return
+ * @throws IllegalArgumentException If the specified argument
+ * is non-null and cannot be constructed into a URL
+ */
+ T serverConfLocation(String serverConfLocation) throws IllegalArgumentException;
+
+ /**
+ * Obtains the location in which the server libraries reside
+ *
+ * @return
+ */
+ URL getServerLibLocation();
+
+ /**
+ * Sets the location in which the server libraries reside
+ *
+ * @param serverLibLocation
+ * @return
+ */
+ T serverLibLocation(URL serverLibLocation);
+
+ /**
+ * Sets the location in which the server libraries reside
+ *
+ * @param serverLibLocation
+ * @return
+ * @throws IllegalArgumentException If the specified argument
+ * is non-null and cannot be constructed into a URL
+ */
+ T serverLibLocation(String serverLibLocation) throws IllegalArgumentException;
+
+ /**
+ * Obtains the location in which the server persistent data resides
+ *
+ * @return
+ */
+ URL getServerDataLocation();
+
+ /**
+ * Sets the location in which the server persistent data resides
+ *
+ * @param serverDataLocation
+ * @return
+ */
+ T serverDataLocation(URL serverDataLocation);
+
+ /**
+ * Sets the location in which the server persistent data resides
+ *
+ * @param serverDataLocation
+ * @return
+ * @throws IllegalArgumentException If the specified argument
+ * is non-null and cannot be constructed into a URL
+ */
+ T serverDataLocation(String serverDataLocation) throws IllegalArgumentException;
+
+ /**
+ * Obtains the location in which the server temp data resides
+ *
+ * @return
+ */
+ URL getServerTempLocation();
+
+ /**
+ * Sets the location in which the server temp data resides
+ *
+ * @param serverTempLocation
+ * @return
+ */
+ T serverTempLocation(URL serverTempLocation);
+
+ /**
+ * Sets the location in which the server temp data resides
+ *
+ * @param serverTempLocation
+ * @return
+ * @throws IllegalArgumentException If the specified argument
+ * is non-null and cannot be constructed into a URL
+ */
+ T serverTempLocation(String serverTempLocation) throws IllegalArgumentException;
+
+ /**
+ * Obtains the partition name for this instance in clustering
+ *
+ * @return
+ */
+ String getPartitionName();
+
+ /**
+ * Sets the partition name for this instance in clustering
+ *
+ * @param partitionName
+ * @return
+ */
+ T partitionName(String partitionName);
+
+ /**
+ * Obtains the UDP Group for this instance in clustering
+ *
+ * @return
+ */
+ String getUdpGroup();
+
+ /**
+ * Sets the UDP Group for this instance in clustering
+ *
+ * @param udpGroup
+ * @return
+ */
+ T udpGroup(String udpGroup);
+
+ /**
+ * Obtains the JGroups UDP Multicast port for use
+ * in clustering
+ *
+ * @return
+ */
+ Integer getUdpPort();
+
+ /**
+ * Sets the JGroups UDP Multicast port for use
+ * in clustering
+ *
+ * @param udpPort The port, or null to use the default
+ * @return
+ */
+ T udpPort(Integer udpPort);
+
+ /**
+ * Determines whether or not to load the native libraries
+ *
+ * @return
+ */
+ Boolean isLoadNative();
+
+ /**
+ * Sets whether or not to load the native libraries
+ *
+ * @param loadNative true or false, or null to use the default
+ * @return
+ */
+ T loadNative(Boolean loadNative);
+
+ /**
+ * Obtains the location of the JBossAS
+ * Native Libraries
+ *
+ * @return
+ */
+ URL getNativeLibraryLocation();
+
+ /**
+ * Sets the location of the JBossAS
+ * Native Libraries
+ *
+ * @param nativeLibraryLocation
+ * @return
+ */
+ T nativeLibraryLocation(URL nativeLibraryLocation);
+
+ /**
+ * Sets the location of the JBossAS
+ * Native Libraries
+ *
+ * @param nativeLibraryLocation
+ * @return
+ * @throws IllegalArgumentException If the specified argument
+ * is non-null and cannot be constructed into a URL
+ */
+ T nativeLibraryLocation(String nativeLibraryLocation) throws IllegalArgumentException;
+
+ /**
+ * Determines whether or not to use as the main jboss server the MBeanServer returned
+ * from ManagementFactory.getPlatformMBeanServer(), when running under jdk1.5+
+ *
+ * @return
+ */
+ Boolean isUsePlatformMBeanServer();
+
+ /**
+ * Sets whether or not to use as the main jboss server the MBeanServer returned
+ * from ManagementFactory.getPlatformMBeanServer(), when running under jdk1.5+
+ *
+ * @param usePlatformMBeanServer
+ * @return
+ */
+ T usePlatformMBeanServer(Boolean usePlatformMBeanServer);
+
+}
Copied: projects/bootstrap/trunk/api-as/src/main/java/org/jboss/bootstrap/api/as/config/JBossASServerConfig.java (from rev 91833, projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/config/JBossASServerConfig.java)
===================================================================
--- projects/bootstrap/trunk/api-as/src/main/java/org/jboss/bootstrap/api/as/config/JBossASServerConfig.java (rev 0)
+++ projects/bootstrap/trunk/api-as/src/main/java/org/jboss/bootstrap/api/as/config/JBossASServerConfig.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -0,0 +1,36 @@
+/*
+ * 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.bootstrap.api.as.config;
+
+/**
+ * JBossASServerConfig
+ *
+ * User configuration for the JBoss Application Server.
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface JBossASServerConfig extends JBossASBasedServerConfig<JBossASServerConfig>
+{
+
+}
Property changes on: projects/bootstrap/trunk/api-as/src/main/java/org/jboss/bootstrap/api/as/config/JBossASServerConfig.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: projects/bootstrap/trunk/api-as/src/main/java/org/jboss/bootstrap/api/as/config/JBossASServerConfigFactory.java (from rev 91833, projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/config/JBossASServerConfigFactory.java)
===================================================================
--- projects/bootstrap/trunk/api-as/src/main/java/org/jboss/bootstrap/api/as/config/JBossASServerConfigFactory.java (rev 0)
+++ projects/bootstrap/trunk/api-as/src/main/java/org/jboss/bootstrap/api/as/config/JBossASServerConfigFactory.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -0,0 +1,109 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.bootstrap.api.as.config;
+
+import org.jboss.bootstrap.api.config.ServerConfig;
+import org.jboss.bootstrap.api.factory.ServerConfigFactory;
+
+/**
+ * JBossASServerConfigFactory
+ *
+ * Factory of {@link JBossASServerConfig} implementations
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class JBossASServerConfigFactory
+{
+
+ //-------------------------------------------------------------------------------------||
+ // Class Members ----------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * The FQN of the default implementation class to create
+ */
+ public static final String DEFAULT_AS_SERVER_CONFIG_IMPL_CLASS_NAME = "org.jboss.bootstrap.impl.as.config.BasicJBossASServerConfig";
+
+ //-------------------------------------------------------------------------------------||
+ // Constructor ------------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Constructor, should not be called
+ */
+ private JBossASServerConfigFactory()
+ {
+ // No external access
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Factory Methods --------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Creates a JBossASServerConfig from the default implementation class name
+ * {@link JBossASServerConfigFactory#DEFAULT_AS_SERVER_CONFIG_IMPL_CLASS_NAME}, using the
+ * Thread Context ClassLoader. The returned config will additionally be created using
+ * the TCCL.
+ *
+ * @return The newly-created config
+ */
+ public static JBossASServerConfig createServerConfig()
+ {
+ return createServerConfig(SecurityActions.getTccl());
+ }
+
+ /**
+ * Creates a JBossASServerConfig from the default implementation class name
+ * {@link JBossASServerConfigFactory#DEFAULT_AS_SERVER_CONFIG_IMPL_CLASS_NAME}, using the
+ * specified ClassLoader. The returned config will additionally be created using
+ * the ClassLoader denoted.
+ *
+ * @throws IllegalArgumentException If the ClassLoader is null
+ * @return The newly-created config
+ */
+ public static JBossASServerConfig createServerConfig(final ClassLoader cl) throws IllegalArgumentException
+ {
+ // Precondition check
+ if (cl == null)
+ {
+ throw new IllegalArgumentException(ClassLoader.class.getSimpleName() + " is required.");
+ }
+
+ // Get the config
+ ServerConfig<?> config = null;
+ try
+ {
+ config = ServerConfigFactory.createServerConfig(DEFAULT_AS_SERVER_CONFIG_IMPL_CLASS_NAME, cl);
+ }
+ catch (Exception e)
+ {
+ // An exception here is likely our fault, so throw a RuntimeException
+ throw new RuntimeException("Error in creating the configuration", e);
+ }
+
+ // Cast
+ return JBossASServerConfig.class.cast(config);
+ }
+}
Copied: projects/bootstrap/trunk/api-as/src/main/java/org/jboss/bootstrap/api/as/config/SecurityActions.java (from rev 91833, projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/config/SecurityActions.java)
===================================================================
--- projects/bootstrap/trunk/api-as/src/main/java/org/jboss/bootstrap/api/as/config/SecurityActions.java (rev 0)
+++ projects/bootstrap/trunk/api-as/src/main/java/org/jboss/bootstrap/api/as/config/SecurityActions.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.bootstrap.api.as.config;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+/**
+ * SecurityActions
+ *
+ * Utility class for security actions, so as to provide
+ * some centralization without leaking privileged actions
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+class SecurityActions
+{
+
+ //-------------------------------------------------------------------------------------||
+ // Constructor ------------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * In place to prevent instanciation
+ */
+ private SecurityActions()
+ {
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Utility Methods --------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Obtains the Thread Context ClassLoader
+ *
+ * @return
+ */
+ static ClassLoader getTccl()
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
+ {
+
+ public ClassLoader run()
+ {
+ // Return the TCCL
+ return Thread.currentThread().getContextClassLoader();
+ }
+
+ });
+ }
+}
Copied: projects/bootstrap/trunk/api-as/src/main/java/org/jboss/bootstrap/api/as/server (from rev 91840, projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/api/as/server)
Modified: projects/bootstrap/trunk/api-as/src/main/java/org/jboss/bootstrap/api/as/server/JBossASBasedServer.java
===================================================================
--- projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/api/as/server/JBossASBasedServer.java 2009-07-30 18:56:05 UTC (rev 91840)
+++ projects/bootstrap/trunk/api-as/src/main/java/org/jboss/bootstrap/api/as/server/JBossASBasedServer.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -21,8 +21,8 @@
*/
package org.jboss.bootstrap.api.as.server;
-import org.jboss.bootstrap.spi.as.config.JBossASBasedServerConfig;
-import org.jboss.bootstrap.spi.server.Server;
+import org.jboss.bootstrap.api.as.config.JBossASBasedServerConfig;
+import org.jboss.bootstrap.api.server.Server;
/**
* JBossASBasedServer
Modified: projects/bootstrap/trunk/api-as/src/main/java/org/jboss/bootstrap/api/as/server/JBossASServer.java
===================================================================
--- projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/api/as/server/JBossASServer.java 2009-07-30 18:56:05 UTC (rev 91840)
+++ projects/bootstrap/trunk/api-as/src/main/java/org/jboss/bootstrap/api/as/server/JBossASServer.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -22,7 +22,7 @@
package org.jboss.bootstrap.api.as.server;
-import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
+import org.jboss.bootstrap.api.as.config.JBossASServerConfig;
/**
* JBossASServer
Modified: projects/bootstrap/trunk/api-as/src/main/java/org/jboss/bootstrap/api/as/server/JBossASServerFactory.java
===================================================================
--- projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/api/as/server/JBossASServerFactory.java 2009-07-30 18:56:05 UTC (rev 91840)
+++ projects/bootstrap/trunk/api-as/src/main/java/org/jboss/bootstrap/api/as/server/JBossASServerFactory.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -22,10 +22,10 @@
package org.jboss.bootstrap.api.as.server;
-import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
-import org.jboss.bootstrap.spi.as.config.JBossASServerConfigFactory;
-import org.jboss.bootstrap.spi.factory.ServerFactory;
-import org.jboss.bootstrap.spi.server.Server;
+import org.jboss.bootstrap.api.as.config.JBossASServerConfig;
+import org.jboss.bootstrap.api.as.config.JBossASServerConfigFactory;
+import org.jboss.bootstrap.api.factory.ServerFactory;
+import org.jboss.bootstrap.api.server.Server;
/**
* JBossASServerFactory
Property changes on: projects/bootstrap/trunk/api-mc
___________________________________________________________________
Name: svn:ignore
+ target
eclipse-target
bin
Added: projects/bootstrap/trunk/api-mc/.classpath
===================================================================
--- projects/bootstrap/trunk/api-mc/.classpath (rev 0)
+++ projects/bootstrap/trunk/api-mc/.classpath 2009-07-30 20:42:52 UTC (rev 91844)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
Added: projects/bootstrap/trunk/api-mc/.project
===================================================================
--- projects/bootstrap/trunk/api-mc/.project (rev 0)
+++ projects/bootstrap/trunk/api-mc/.project 2009-07-30 20:42:52 UTC (rev 91844)
@@ -0,0 +1,17 @@
+<projectDescription>
+ <name>jboss-bootstrap-api-mc</name>
+ <comment>Application Provider Interface to MC-based Implementations of JBoss Bootstrap</comment>
+ <projects/>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
\ No newline at end of file
Added: projects/bootstrap/trunk/api-mc/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/bootstrap/trunk/api-mc/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ projects/bootstrap/trunk/api-mc/.settings/org.eclipse.jdt.core.prefs 2009-07-30 20:42:52 UTC (rev 91844)
@@ -0,0 +1,5 @@
+#Thu Jul 30 14:21:02 GMT-05:00 2009
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
Added: projects/bootstrap/trunk/api-mc/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- projects/bootstrap/trunk/api-mc/.settings/org.maven.ide.eclipse.prefs (rev 0)
+++ projects/bootstrap/trunk/api-mc/.settings/org.maven.ide.eclipse.prefs 2009-07-30 20:42:52 UTC (rev 91844)
@@ -0,0 +1,9 @@
+#Thu Jul 30 14:21:56 GMT-05:00 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
Added: projects/bootstrap/trunk/api-mc/pom.xml
===================================================================
--- projects/bootstrap/trunk/api-mc/pom.xml (rev 0)
+++ projects/bootstrap/trunk/api-mc/pom.xml 2009-07-30 20:42:52 UTC (rev 91844)
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+ <!--
+ vi:ts=2:sw=2:expandtab:
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <!-- Parent -->
+ <parent>
+ <groupId>org.jboss.bootstrap</groupId>
+ <artifactId>jboss-bootstrap-build</artifactId>
+ <version>2.0.0-alpha-1</version>
+ <relativePath>../build/pom.xml</relativePath>
+ </parent>
+
+ <!-- Model Version -->
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Artifact Configuration -->
+ <artifactId>jboss-bootstrap-api-mc</artifactId>
+ <name>JBoss Bootstrap API for MC</name>
+ <version>2.0.0-SNAPSHOT</version>
+ <description>Application Provider Interface to MC-based Implementations of JBoss Bootstrap</description>
+
+
+ <!-- Properties -->
+ <properties>
+
+ <version.org.jboss.bootstrap_jboss.bootstrap.api>2.0.0-SNAPSHOT</version.org.jboss.bootstrap_jboss.bootstrap.api>
+
+ </properties>
+
+ <!-- Build -->
+ <build>
+
+ </build>
+
+ <!-- Dependencies -->
+ <dependencies>
+
+ <dependency>
+ <groupId>org.jboss.bootstrap</groupId>
+ <artifactId>jboss-bootstrap-api</artifactId>
+ <version>${version.org.jboss.bootstrap_jboss.bootstrap.api}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-kernel</artifactId>
+ </dependency>
+
+ </dependencies>
+</project>
Copied: projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/config/MCBasedServerConfig.java (from rev 91833, projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/config/MCBasedServerConfig.java)
===================================================================
--- projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/config/MCBasedServerConfig.java (rev 0)
+++ projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/config/MCBasedServerConfig.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.bootstrap.api.mc.config;
+
+import org.jboss.bootstrap.api.config.ServerConfig;
+
+/**
+ * MCBasedServerConfig
+ *
+ * Contract for MC-based Servers, may be extended for a direct
+ * MC ServerConfig
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface MCBasedServerConfig<T extends MCBasedServerConfig<T>> extends ServerConfig<T>
+{
+
+}
Copied: projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/config/MCServerConfig.java (from rev 91833, projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/config/MCServerConfig.java)
===================================================================
--- projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/config/MCServerConfig.java (rev 0)
+++ projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/config/MCServerConfig.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.bootstrap.api.mc.config;
+
+/**
+ * MCServerConfig
+ *
+ * Contract of Microcontainer implementations of the ServerConfig
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface MCServerConfig extends MCBasedServerConfig<MCServerConfig>
+{
+
+}
Copied: projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/config/MCServerConfigFactory.java (from rev 91833, projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/config/MCServerConfigFactory.java)
===================================================================
--- projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/config/MCServerConfigFactory.java (rev 0)
+++ projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/config/MCServerConfigFactory.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -0,0 +1,106 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.bootstrap.api.mc.config;
+
+import org.jboss.bootstrap.api.config.ServerConfig;
+import org.jboss.bootstrap.api.factory.ServerConfigFactory;
+
+/**
+ * MCServerConfigFactory
+ *
+ * Factory of {@link MCServerConfig} implementations
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class MCServerConfigFactory
+{
+
+ //-------------------------------------------------------------------------------------||
+ // Class Members ----------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * The FQN of the default implementation class to create
+ */
+ public static final String DEFAULT_MC_SERVER_CONFIG_IMPL_CLASS_NAME = "org.jboss.bootstrap.impl.mc.config.BasicMCServerConfig";
+
+ //-------------------------------------------------------------------------------------||
+ // Constructor ------------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ private MCServerConfigFactory()
+ {
+ // No external access
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Factory Methods --------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Creates an MCServerConfig from the default implementation class name
+ * {@link MCServerConfigFactory#DEFAULT_MC_SERVER_CONFIG_IMPL_CLASS_NAME}, using the
+ * Thread Context ClassLoader. The returned config will additionally be created using
+ * the TCCL.
+ *
+ * @return The newly-created config
+ */
+ public static MCServerConfig createServerConfig()
+ {
+ return createServerConfig(SecurityActions.getTccl());
+ }
+
+ /**
+ * Creates an MCServerConfig from the default implementation class name
+ * {@link MCServerConfigFactory#DEFAULT_MC_SERVER_CONFIG_IMPL_CLASS_NAME}, using the
+ * specified ClassLoader. The returned config will additionally be created using
+ * the ClassLoader denoted.
+ *
+ * @throws IllegalArgumentException If the ClassLoader is null
+ * @return The newly-created config
+ */
+ public static MCServerConfig createServerConfig(final ClassLoader cl) throws IllegalArgumentException
+ {
+ // Precondition check
+ if (cl == null)
+ {
+ throw new IllegalArgumentException(ClassLoader.class.getSimpleName() + " is required.");
+ }
+
+ // Get the config
+ ServerConfig<?> config = null;
+ try
+ {
+ config = ServerConfigFactory.createServerConfig(DEFAULT_MC_SERVER_CONFIG_IMPL_CLASS_NAME, cl);
+ }
+ catch (Exception e)
+ {
+ // An exception here is likely our fault, so throw a RuntimeException
+ throw new RuntimeException("Error in creating the configuration", e);
+ }
+
+ // Cast
+ return MCServerConfig.class.cast(config);
+ }
+}
Copied: projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/config/SecurityActions.java (from rev 91833, projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/config/SecurityActions.java)
===================================================================
--- projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/config/SecurityActions.java (rev 0)
+++ projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/config/SecurityActions.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.bootstrap.api.mc.config;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+/**
+ * SecurityActions
+ *
+ * Utility class for security actions, so as to provide
+ * some centralization without leaking privileged actions
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+class SecurityActions
+{
+
+ //-------------------------------------------------------------------------------------||
+ // Constructor ------------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * In place to prevent instanciation
+ */
+ private SecurityActions()
+ {
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Utility Methods --------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Obtains the Thread Context ClassLoader
+ *
+ * @return
+ */
+ static ClassLoader getTccl()
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
+ {
+
+ public ClassLoader run()
+ {
+ // Return the TCCL
+ return Thread.currentThread().getContextClassLoader();
+ }
+
+ });
+ }
+}
Copied: projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/server/MCBasedServer.java (from rev 91840, projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/server/MCBasedServer.java)
===================================================================
--- projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/server/MCBasedServer.java (rev 0)
+++ projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/server/MCBasedServer.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.bootstrap.api.mc.server;
+
+import org.jboss.bootstrap.api.config.ServerConfig;
+import org.jboss.bootstrap.api.server.Server;
+import org.jboss.kernel.Kernel;
+
+/**
+ * MCBasedServer
+ *
+ * Client view of MC-based Servers, may be extended for a direct
+ * MC Server
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface MCBasedServer<K extends Server<K, T>, T extends ServerConfig<T>> extends Server<K, T>
+{
+ //-------------------------------------------------------------------------------------||
+ // Contracts --------------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Obtains the underlying Kernel
+ *
+ * @return
+ */
+ Kernel getKernel();
+}
Copied: projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/server/MCServer.java (from rev 91833, projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/server/MCServer.java)
===================================================================
--- projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/server/MCServer.java (rev 0)
+++ projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/server/MCServer.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.bootstrap.api.mc.server;
+
+import org.jboss.bootstrap.api.mc.config.MCServerConfig;
+
+/**
+ * MCServer
+ *
+ * Client view of Microcontainer implementations of the Server
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface MCServer extends MCBasedServer<MCServer, MCServerConfig>
+{
+
+}
Copied: projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/server/MCServerFactory.java (from rev 91833, projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/server/MCServerFactory.java)
===================================================================
--- projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/server/MCServerFactory.java (rev 0)
+++ projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/server/MCServerFactory.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -0,0 +1,215 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.bootstrap.api.mc.server;
+
+import org.jboss.bootstrap.api.factory.ServerFactory;
+import org.jboss.bootstrap.api.mc.config.MCServerConfig;
+import org.jboss.bootstrap.api.mc.config.MCServerConfigFactory;
+import org.jboss.bootstrap.api.server.Server;
+
+/**
+ * MCServerFactory
+ *
+ * Factory of {@link MCServer} implementations
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class MCServerFactory
+{
+
+ //-------------------------------------------------------------------------------------||
+ // Class Members ----------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * The FQN of the default server implementation class to create
+ */
+ public static final String DEFAULT_MC_SERVER_IMPL_CLASS_NAME = "org.jboss.bootstrap.impl.mc.server.MCServerImpl";
+
+ //-------------------------------------------------------------------------------------||
+ // Constructor ------------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ private MCServerFactory()
+ {
+ // No external access
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Factory Methods --------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Creates an MCServer from the default implementation class name
+ * {@link MCServerFactory#DEFAULT_MC_SERVER_IMPL_CLASS_NAME}, using the
+ * Thread Context ClassLoader. The returned server will additionally be created using
+ * the TCCL.
+ *
+ * @return The newly-created Server
+ */
+ public static MCServer createServer()
+ {
+ return createServer(SecurityActions.getTccl());
+ }
+
+ /**
+ * Creates an MCServer from the default implementation class name
+ * {@link MCServerFactory#DEFAULT_MC_SERVER_IMPL_CLASS_NAME}, using the
+ * Thread Context ClassLoader. The returned server will additionally be created using
+ * the TCCL. As a convenience, the server will contain a default configuration.
+ *
+ * @return The newly-created Server populated with a default configuration
+ */
+ public static MCServer createServerWithDefaultConfiguration()
+ {
+ return createServerWithDefaultConfiguration(SecurityActions.getTccl());
+ }
+
+ /**
+ * Creates an MCServer from the default implementation class name
+ * {@link MCServerFactory#DEFAULT_MC_SERVER_IMPL_CLASS_NAME}, using the
+ * specified ClassLoader. The returned server will additionally be created using
+ * the ClassLoader denoted.
+ *
+ * @throws IllegalArgumentException If the ClassLoader is null
+ * @return The newly-created Server
+ */
+ public static MCServer createServer(final ClassLoader cl) throws IllegalArgumentException
+ {
+ try
+ {
+ return createServer(DEFAULT_MC_SERVER_IMPL_CLASS_NAME, cl);
+ }
+ catch (Exception e)
+ {
+ // An exception here is likely our fault, so throw a RuntimeException
+ throw new RuntimeException("Error in creating the Server", e);
+ }
+ }
+
+ /**
+ * Creates an MCServer from the default implementation class name
+ * {@link MCServerFactory#DEFAULT_MC_SERVER_IMPL_CLASS_NAME}, using the
+ * specified ClassLoader. The returned server will additionally be created using
+ * the ClassLoader denoted. As a convenience, the server will contain a
+ * default configuration.
+ *
+ * @throws IllegalArgumentException If the ClassLoader is null
+ * @return The newly-created Server populated with a default configuration
+ */
+ public static MCServer createServerWithDefaultConfiguration(final ClassLoader cl) throws IllegalArgumentException
+ {
+ try
+ {
+ return createServerWithDefaultConfiguration(DEFAULT_MC_SERVER_IMPL_CLASS_NAME, cl);
+ }
+ catch (Exception e)
+ {
+ // An exception here is likely our fault, so throw a RuntimeException
+ throw new RuntimeException("Error in creating the Server", e);
+ }
+ }
+
+ /**
+ * Creates an MCServer from the specified implementation class name
+ * using the specified ClassLoader. The returned server will additionally
+ * be created using the ClassLoader denoted.
+ *
+ * @throws IllegalArgumentException If the ClassLoader or server implementation class is null
+ * @throws Exception If there was an error in creating the Server
+ * @return The newly-created Server
+ */
+ public static MCServer createServer(final String implClassName, final ClassLoader cl)
+ throws IllegalArgumentException, Exception
+ {
+ // Precondition check
+ if (cl == null)
+ {
+ throw new IllegalArgumentException(ClassLoader.class.getSimpleName() + " is required.");
+ }
+ if (implClassName == null || implClassName.length() == 0)
+ {
+ throw new IllegalArgumentException("Implementation class name must be specified");
+ }
+
+ // Get the server
+ final Server<?, ?> server = ServerFactory.createServer(implClassName, cl);
+
+ // Cast
+ MCServer mcServer = null;
+ try
+ {
+ mcServer = MCServer.class.cast(server);
+ }
+ catch (ClassCastException cce)
+ {
+ // Catch, explain giving some context, throw new
+ throw new ClassCastException("Specified server implementation class, " + implClassName
+ + " must be assignable to " + MCServer.class.getName());
+ }
+
+ // Set a default config
+ final MCServerConfig config = MCServerConfigFactory.createServerConfig(cl);
+ mcServer.setConfiguration(config);
+
+ // Return
+ return mcServer;
+ }
+
+ /**
+ * Creates an MCServer from the specified implementation class name
+ * using the specified ClassLoader. The returned server will additionally
+ * be created using the ClassLoader denoted. As a convenience, the server
+ * will contain a default configuration.
+ *
+ * @throws IllegalArgumentException If the ClassLoader or server implementation class is null
+ * @throws Exception If there was an error in creating the Server
+ * @return The newly-created Server populated with a default configuration
+ */
+ public static MCServer createServerWithDefaultConfiguration(final String implClassName, final ClassLoader cl)
+ throws IllegalArgumentException, Exception
+ {
+ // Make the server, applying a default config
+ return applyDefaultConfiguration(createServer(implClassName, cl), cl);
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Internal Helper Methods ------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Sets a new, default configuration upon the specified server
+ *
+ * @param server The server upon which we'll set a new config
+ * @param cl The ClassLoader used to create the new config
+ * @return The same server instance passed in, with a set config
+ */
+ private static MCServer applyDefaultConfiguration(final MCServer server, final ClassLoader cl)
+ {
+ // Set a default config
+ final MCServerConfig config = MCServerConfigFactory.createServerConfig(cl);
+ server.setConfiguration(config);
+ return server;
+ }
+}
Copied: projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/server/SecurityActions.java (from rev 91833, projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/server/SecurityActions.java)
===================================================================
--- projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/server/SecurityActions.java (rev 0)
+++ projects/bootstrap/trunk/api-mc/src/main/java/org/jboss/bootstrap/api/mc/server/SecurityActions.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.bootstrap.api.mc.server;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+/**
+ * SecurityActions
+ *
+ * Utility class for security actions, so as to provide
+ * some centralization without leaking privileged actions
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+class SecurityActions
+{
+
+ //-------------------------------------------------------------------------------------||
+ // Constructor ------------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * In place to prevent instanciation
+ */
+ private SecurityActions()
+ {
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Utility Methods --------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Obtains the Thread Context ClassLoader
+ *
+ * @return
+ */
+ static ClassLoader getTccl()
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
+ {
+
+ public ClassLoader run()
+ {
+ // Return the TCCL
+ return Thread.currentThread().getContextClassLoader();
+ }
+
+ });
+ }
+}
Modified: projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/config/BasicJBossASServerConfig.java
===================================================================
--- projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/config/BasicJBossASServerConfig.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/config/BasicJBossASServerConfig.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -29,8 +29,8 @@
import java.net.URISyntaxException;
import java.net.URL;
+import org.jboss.bootstrap.api.as.config.JBossASServerConfig;
import org.jboss.bootstrap.impl.base.config.AbstractBasicServerConfig;
-import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
import org.jboss.logging.Logger;
import org.jboss.managed.api.annotation.ManagementComponent;
import org.jboss.managed.api.annotation.ManagementObject;
Modified: projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/config/JBossASBasedConfigurationValidator.java
===================================================================
--- projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/config/JBossASBasedConfigurationValidator.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/config/JBossASBasedConfigurationValidator.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -26,10 +26,10 @@
import java.net.URL;
import java.net.URLConnection;
+import org.jboss.bootstrap.api.as.config.JBossASBasedServerConfig;
+import org.jboss.bootstrap.api.config.InvalidConfigurationException;
import org.jboss.bootstrap.impl.base.config.AbstractBasicConfigurationValidator;
-import org.jboss.bootstrap.spi.as.config.JBossASBasedServerConfig;
import org.jboss.bootstrap.spi.config.ConfigurationValidator;
-import org.jboss.bootstrap.spi.config.InvalidConfigurationException;
import org.jboss.logging.Logger;
/**
Modified: projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/config/JBossASConfigurationInitializerImpl.java
===================================================================
--- projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/config/JBossASConfigurationInitializerImpl.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/config/JBossASConfigurationInitializerImpl.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -26,11 +26,11 @@
import java.net.URL;
import java.util.Map;
+import org.jboss.bootstrap.api.as.config.JBossASBasedServerConfig;
+import org.jboss.bootstrap.api.as.config.JBossASServerConfig;
+import org.jboss.bootstrap.api.config.InvalidConfigurationException;
import org.jboss.bootstrap.impl.base.config.AbstractBasicConfigurationInitializer;
import org.jboss.bootstrap.spi.as.config.JBossASBasedConfigurationInitializer;
-import org.jboss.bootstrap.spi.as.config.JBossASBasedServerConfig;
-import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
-import org.jboss.bootstrap.spi.config.InvalidConfigurationException;
import org.jboss.logging.Logger;
/**
Modified: projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/config/JBossASServerConfigLegacy.java
===================================================================
--- projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/config/JBossASServerConfigLegacy.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/config/JBossASServerConfigLegacy.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -22,8 +22,8 @@
package org.jboss.bootstrap.impl.as.config;
-import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
-import org.jboss.bootstrap.spi.mc.config.MCBasedServerConfig;
+import org.jboss.bootstrap.api.as.config.JBossASServerConfig;
+import org.jboss.bootstrap.api.mc.config.MCBasedServerConfig;
/**
* JBossASServerConfig
Modified: projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/lifecycle/AbstractKernelEventLifecycleEventHandler.java
===================================================================
--- projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/lifecycle/AbstractKernelEventLifecycleEventHandler.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/lifecycle/AbstractKernelEventLifecycleEventHandler.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -22,9 +22,9 @@
package org.jboss.bootstrap.impl.as.lifecycle;
-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.api.lifecycle.LifecycleEventException;
+import org.jboss.bootstrap.api.lifecycle.LifecycleEventHandler;
+import org.jboss.bootstrap.api.lifecycle.LifecycleState;
import org.jboss.kernel.Kernel;
import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap;
import org.jboss.kernel.plugins.event.AbstractEvent;
Modified: projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/lifecycle/KernelStartEventLifecycleEventHandler.java
===================================================================
--- projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/lifecycle/KernelStartEventLifecycleEventHandler.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/lifecycle/KernelStartEventLifecycleEventHandler.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -22,7 +22,7 @@
package org.jboss.bootstrap.impl.as.lifecycle;
-import org.jboss.bootstrap.spi.server.Server;
+import org.jboss.bootstrap.spi.server.ServerProvider;
import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap;
/**
@@ -55,7 +55,7 @@
@Override
protected String getNotificationType()
{
- return Server.START_NOTIFICATION_TYPE;
+ return ServerProvider.START_NOTIFICATION_TYPE;
}
}
Modified: projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/lifecycle/KernelStopEventLifecycleEventHandler.java
===================================================================
--- projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/lifecycle/KernelStopEventLifecycleEventHandler.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/lifecycle/KernelStopEventLifecycleEventHandler.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -22,7 +22,7 @@
package org.jboss.bootstrap.impl.as.lifecycle;
-import org.jboss.bootstrap.spi.server.Server;
+import org.jboss.bootstrap.spi.server.ServerProvider;
import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap;
/**
@@ -55,7 +55,7 @@
@Override
protected String getNotificationType()
{
- return Server.STOP_NOTIFICATION_TYPE;
+ return ServerProvider.STOP_NOTIFICATION_TYPE;
}
}
Modified: projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/lifecycle/VfsInitializingLifecycleEventHandler.java
===================================================================
--- projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/lifecycle/VfsInitializingLifecycleEventHandler.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/lifecycle/VfsInitializingLifecycleEventHandler.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -24,9 +24,9 @@
import java.net.URL;
-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.api.lifecycle.LifecycleEventException;
+import org.jboss.bootstrap.api.lifecycle.LifecycleEventHandler;
+import org.jboss.bootstrap.api.lifecycle.LifecycleState;
import org.jboss.logging.Logger;
import org.jboss.net.protocol.URLStreamHandlerFactory;
import org.jboss.virtual.VFS;
Modified: projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/server/AbstractJBossASServerBase.java
===================================================================
--- projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/server/AbstractJBossASServerBase.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/server/AbstractJBossASServerBase.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -28,20 +28,20 @@
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
+import org.jboss.bootstrap.api.as.config.JBossASBasedServerConfig;
+import org.jboss.bootstrap.api.as.config.JBossASServerConfig;
import org.jboss.bootstrap.api.as.server.JBossASBasedServer;
+import org.jboss.bootstrap.api.config.InvalidConfigurationException;
+import org.jboss.bootstrap.api.lifecycle.LifecycleEventException;
+import org.jboss.bootstrap.api.lifecycle.LifecycleEventHandler;
+import org.jboss.bootstrap.api.lifecycle.LifecycleState;
import org.jboss.bootstrap.impl.as.config.JBossASBasedConfigurationValidator;
import org.jboss.bootstrap.impl.as.config.JBossASConfigurationInitializerImpl;
import org.jboss.bootstrap.impl.as.lifecycle.KernelStartEventLifecycleEventHandler;
import org.jboss.bootstrap.impl.as.lifecycle.KernelStopEventLifecycleEventHandler;
import org.jboss.bootstrap.impl.as.lifecycle.VfsInitializingLifecycleEventHandler;
import org.jboss.bootstrap.impl.mc.server.AbstractMCServerBase;
-import org.jboss.bootstrap.spi.as.config.JBossASBasedServerConfig;
-import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
import org.jboss.bootstrap.spi.as.server.JBossASBasedServerProvider;
-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.kernel.plugins.bootstrap.basic.BasicBootstrap;
import org.jboss.logging.Logger;
import org.jboss.managed.api.annotation.ManagementComponent;
Modified: projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/server/JBossASServerImpl.java
===================================================================
--- projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/server/JBossASServerImpl.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/server/JBossASServerImpl.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -21,9 +21,9 @@
*/
package org.jboss.bootstrap.impl.as.server;
+import org.jboss.bootstrap.api.as.config.JBossASServerConfig;
import org.jboss.bootstrap.api.as.server.JBossASServer;
import org.jboss.bootstrap.impl.as.config.BasicJBossASServerConfig;
-import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
import org.jboss.bootstrap.spi.as.server.JBossASServerProvider;
/**
Modified: projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/server/JBossASServerInitializer.java
===================================================================
--- projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/server/JBossASServerInitializer.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/server/JBossASServerInitializer.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -27,10 +27,10 @@
import java.net.URISyntaxException;
import java.net.URL;
+import org.jboss.bootstrap.api.as.config.JBossASBasedServerConfig;
+import org.jboss.bootstrap.api.as.config.JBossASServerConfig;
import org.jboss.bootstrap.api.as.server.JBossASBasedServer;
import org.jboss.bootstrap.impl.base.server.AbstractBasicServerInitializer;
-import org.jboss.bootstrap.spi.as.config.JBossASBasedServerConfig;
-import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
import org.jboss.bootstrap.spi.server.ServerInitializer;
import org.jboss.logging.Logger;
Modified: projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/config/JBossASConfigurationInitializationTestCase.java
===================================================================
--- projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/config/JBossASConfigurationInitializationTestCase.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/config/JBossASConfigurationInitializationTestCase.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -26,10 +26,10 @@
import junit.framework.TestCase;
+import org.jboss.bootstrap.api.as.config.JBossASServerConfig;
import org.jboss.bootstrap.impl.as.common.TestUtils;
import org.jboss.bootstrap.impl.base.config.AbstractBasicConfigurationInitializer;
import org.jboss.bootstrap.spi.as.config.JBossASBasedConfigurationInitializer;
-import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
import org.jboss.logging.Logger;
import org.junit.After;
import org.junit.Before;
Modified: projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/config/JBossASConfigurationPropertyOverrideTestCase.java
===================================================================
--- projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/config/JBossASConfigurationPropertyOverrideTestCase.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/config/JBossASConfigurationPropertyOverrideTestCase.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -27,8 +27,8 @@
import junit.framework.TestCase;
+import org.jboss.bootstrap.api.as.config.JBossASServerConfig;
import org.jboss.bootstrap.spi.as.config.JBossASBasedConfigurationInitializer;
-import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
import org.jboss.logging.Logger;
import org.junit.After;
import org.junit.Before;
Modified: projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/config/JBossASConfigurationValidationTestCase.java
===================================================================
--- projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/config/JBossASConfigurationValidationTestCase.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/config/JBossASConfigurationValidationTestCase.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -28,10 +28,10 @@
import junit.framework.TestCase;
+import org.jboss.bootstrap.api.as.config.JBossASServerConfig;
+import org.jboss.bootstrap.api.config.InvalidConfigurationException;
import org.jboss.bootstrap.spi.as.config.JBossASBasedConfigurationInitializer;
-import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
import org.jboss.bootstrap.spi.config.ConfigurationValidator;
-import org.jboss.bootstrap.spi.config.InvalidConfigurationException;
import org.jboss.logging.Logger;
import org.junit.After;
import org.junit.Before;
Modified: projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/config/PropertyValueResolutionTestCase.java
===================================================================
--- projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/config/PropertyValueResolutionTestCase.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/config/PropertyValueResolutionTestCase.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -28,7 +28,7 @@
import junit.framework.TestCase;
-import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
+import org.jboss.bootstrap.api.as.config.JBossASServerConfig;
import org.jboss.logging.Logger;
import org.junit.BeforeClass;
import org.junit.Test;
Modified: projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/server/JBossASServerInitializationTestCase.java
===================================================================
--- projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/server/JBossASServerInitializationTestCase.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/server/JBossASServerInitializationTestCase.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -28,9 +28,9 @@
import junit.framework.TestCase;
+import org.jboss.bootstrap.api.as.config.JBossASServerConfig;
import org.jboss.bootstrap.api.as.server.JBossASServer;
import org.jboss.bootstrap.impl.as.common.TestUtils;
-import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
import org.jboss.logging.Logger;
import org.junit.After;
import org.junit.Before;
Modified: projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/server/JBossASServerOperationsTestCase.java
===================================================================
--- projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/server/JBossASServerOperationsTestCase.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/server/JBossASServerOperationsTestCase.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -26,9 +26,9 @@
import junit.framework.TestCase;
+import org.jboss.bootstrap.api.as.config.JBossASServerConfig;
import org.jboss.bootstrap.api.as.server.JBossASServer;
import org.jboss.bootstrap.impl.as.common.TestUtils;
-import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
import org.jboss.bootstrap.spi.as.server.JBossASServerProvider;
import org.jboss.logging.Logger;
import org.junit.After;
Modified: projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/server/KernelEventsTestCase.java
===================================================================
--- projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/server/KernelEventsTestCase.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/server/KernelEventsTestCase.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -26,7 +26,7 @@
import org.jboss.bootstrap.api.as.server.JBossASServer;
import org.jboss.bootstrap.spi.as.server.JBossASServerProvider;
-import org.jboss.bootstrap.spi.server.Server;
+import org.jboss.bootstrap.spi.server.ServerProvider;
import org.jboss.kernel.Kernel;
import org.jboss.kernel.spi.event.KernelEvent;
import org.jboss.kernel.spi.event.KernelEventListener;
@@ -230,12 +230,12 @@
final String type = event.getType();
// Take appropriate action
- if (Server.START_NOTIFICATION_TYPE.equals(type))
+ if (ServerProvider.START_NOTIFICATION_TYPE.equals(type))
{
// Set received
gotStartEvent = true;
}
- else if (Server.STOP_NOTIFICATION_TYPE.equals(type))
+ else if (ServerProvider.STOP_NOTIFICATION_TYPE.equals(type))
{
// Set received
gotStopEvent = true;
Modified: projects/bootstrap/trunk/impl-base/src/main/java/org/jboss/bootstrap/impl/base/server/AbstractServer.java
===================================================================
--- projects/bootstrap/trunk/impl-base/src/main/java/org/jboss/bootstrap/impl/base/server/AbstractServer.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/impl-base/src/main/java/org/jboss/bootstrap/impl/base/server/AbstractServer.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -45,6 +45,7 @@
import org.jboss.bootstrap.spi.config.ConfigurationInitializer;
import org.jboss.bootstrap.spi.config.ConfigurationValidator;
import org.jboss.bootstrap.spi.server.ServerInitializer;
+import org.jboss.bootstrap.spi.server.ServerProvider;
import org.jboss.logging.Logger;
import org.jboss.util.StopWatch;
@@ -58,7 +59,7 @@
*/
public abstract class AbstractServer<K extends Server<K, T>, T extends ServerConfig<T>>
extends
- NotificationBroadcasterSupport implements Server<K, T>, NotificationBroadcaster
+ NotificationBroadcasterSupport implements ServerProvider<K, T>, NotificationBroadcaster
{
//-------------------------------------------------------------------------------------||
Modified: projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/unit/JmxNotificationsTestCase.java
===================================================================
--- projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/unit/JmxNotificationsTestCase.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/unit/JmxNotificationsTestCase.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -31,8 +31,8 @@
import junit.framework.TestCase;
-import org.jboss.bootstrap.api.server.Server;
import org.jboss.bootstrap.impl.base.server.TestNoOpServer;
+import org.jboss.bootstrap.spi.server.ServerProvider;
import org.jboss.logging.Logger;
import org.junit.After;
import org.junit.Before;
@@ -172,12 +172,12 @@
final String type = notification.getType();
// Take appropriate action
- if (Server.START_NOTIFICATION_TYPE.equals(type))
+ if (ServerProvider.START_NOTIFICATION_TYPE.equals(type))
{
// Set received
gotStartNotification = true;
}
- else if (Server.STOP_NOTIFICATION_TYPE.equals(type))
+ else if (ServerProvider.STOP_NOTIFICATION_TYPE.equals(type))
{
// Set received
gotStopNotification = true;
Modified: projects/bootstrap/trunk/impl-mc/pom.xml
===================================================================
--- projects/bootstrap/trunk/impl-mc/pom.xml 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/impl-mc/pom.xml 2009-07-30 20:42:52 UTC (rev 91844)
@@ -25,7 +25,7 @@
<!-- Properties -->
<properties>
- <version.org.jboss.bootstrap_jboss.bootstrap.impl.base>2.0.0-alpha-3</version.org.jboss.bootstrap_jboss.bootstrap.impl.base>
+ <version.org.jboss.bootstrap_jboss.bootstrap.impl.base>2.0.0-SNAPSHOT</version.org.jboss.bootstrap_jboss.bootstrap.impl.base>
<version.org.jboss.bootstrap_jboss.bootstrap.spi.mc>2.0.0-SNAPSHOT</version.org.jboss.bootstrap_jboss.bootstrap.spi.mc>
<version.org.jboss.man_jboss.managed>2.1.0.SP1</version.org.jboss.man_jboss.managed>
Modified: projects/bootstrap/trunk/impl-mc/src/main/java/org/jboss/bootstrap/impl/mc/config/BasicMCServerConfig.java
===================================================================
--- projects/bootstrap/trunk/impl-mc/src/main/java/org/jboss/bootstrap/impl/mc/config/BasicMCServerConfig.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/impl-mc/src/main/java/org/jboss/bootstrap/impl/mc/config/BasicMCServerConfig.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -24,8 +24,8 @@
import java.util.Map;
+import org.jboss.bootstrap.api.mc.config.MCServerConfig;
import org.jboss.bootstrap.impl.base.config.AbstractBasicServerConfig;
-import org.jboss.bootstrap.spi.mc.config.MCServerConfig;
import org.jboss.logging.Logger;
/**
Modified: projects/bootstrap/trunk/impl-mc/src/main/java/org/jboss/bootstrap/impl/mc/config/MCConfigurationInitializer.java
===================================================================
--- projects/bootstrap/trunk/impl-mc/src/main/java/org/jboss/bootstrap/impl/mc/config/MCConfigurationInitializer.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/impl-mc/src/main/java/org/jboss/bootstrap/impl/mc/config/MCConfigurationInitializer.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -22,9 +22,9 @@
package org.jboss.bootstrap.impl.mc.config;
+import org.jboss.bootstrap.api.mc.config.MCServerConfig;
import org.jboss.bootstrap.impl.base.config.AbstractBasicConfigurationInitializer;
import org.jboss.bootstrap.spi.config.ConfigurationInitializer;
-import org.jboss.bootstrap.spi.mc.config.MCServerConfig;
/**
* MCConfigurationInitializer
Modified: projects/bootstrap/trunk/impl-mc/src/main/java/org/jboss/bootstrap/impl/mc/config/MCConfigurationValidator.java
===================================================================
--- projects/bootstrap/trunk/impl-mc/src/main/java/org/jboss/bootstrap/impl/mc/config/MCConfigurationValidator.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/impl-mc/src/main/java/org/jboss/bootstrap/impl/mc/config/MCConfigurationValidator.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -22,9 +22,9 @@
package org.jboss.bootstrap.impl.mc.config;
+import org.jboss.bootstrap.api.mc.config.MCServerConfig;
import org.jboss.bootstrap.impl.base.config.AbstractBasicConfigurationValidator;
import org.jboss.bootstrap.spi.config.ConfigurationValidator;
-import org.jboss.bootstrap.spi.mc.config.MCServerConfig;
/**
* MCConfigurationValidator
Modified: projects/bootstrap/trunk/impl-mc/src/main/java/org/jboss/bootstrap/impl/mc/server/AbstractMCServerBase.java
===================================================================
--- projects/bootstrap/trunk/impl-mc/src/main/java/org/jboss/bootstrap/impl/mc/server/AbstractMCServerBase.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/impl-mc/src/main/java/org/jboss/bootstrap/impl/mc/server/AbstractMCServerBase.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -28,15 +28,15 @@
import java.util.Map;
import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
+import org.jboss.bootstrap.api.config.InvalidConfigurationException;
+import org.jboss.bootstrap.api.config.ServerConfig;
+import org.jboss.bootstrap.api.lifecycle.LifecycleEventException;
+import org.jboss.bootstrap.api.server.Server;
import org.jboss.bootstrap.impl.base.server.AbstractServer;
import org.jboss.bootstrap.impl.base.xml.BootstrapParser;
import org.jboss.bootstrap.impl.mc.deployer.TempBasicXMLDeployer;
-import org.jboss.bootstrap.spi.config.InvalidConfigurationException;
-import org.jboss.bootstrap.spi.config.ServerConfig;
-import org.jboss.bootstrap.spi.lifecycle.LifecycleEventException;
-import org.jboss.bootstrap.spi.mc.server.MCBasedServer;
+import org.jboss.bootstrap.spi.mc.server.MCBasedServerProvider;
import org.jboss.bootstrap.spi.metadata.BootstrapMetaData;
-import org.jboss.bootstrap.spi.server.Server;
import org.jboss.kernel.Kernel;
import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap;
import org.jboss.kernel.spi.dependency.KernelController;
@@ -57,7 +57,7 @@
*/
public abstract class AbstractMCServerBase<K extends Server<K, T>, T extends ServerConfig<T>>
extends
- AbstractServer<K, T> implements MCBasedServer<K, T>
+ AbstractServer<K, T> implements MCBasedServerProvider<K, T>
{
//-------------------------------------------------------------------------------------||
Modified: projects/bootstrap/trunk/impl-mc/src/main/java/org/jboss/bootstrap/impl/mc/server/MCServerImpl.java
===================================================================
--- projects/bootstrap/trunk/impl-mc/src/main/java/org/jboss/bootstrap/impl/mc/server/MCServerImpl.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/impl-mc/src/main/java/org/jboss/bootstrap/impl/mc/server/MCServerImpl.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -22,11 +22,12 @@
package org.jboss.bootstrap.impl.mc.server;
+import org.jboss.bootstrap.api.mc.config.MCServerConfig;
+import org.jboss.bootstrap.api.mc.server.MCServer;
import org.jboss.bootstrap.impl.mc.config.BasicMCServerConfig;
import org.jboss.bootstrap.impl.mc.config.MCConfigurationInitializer;
import org.jboss.bootstrap.impl.mc.config.MCConfigurationValidator;
-import org.jboss.bootstrap.spi.mc.config.MCServerConfig;
-import org.jboss.bootstrap.spi.mc.server.MCServer;
+import org.jboss.bootstrap.spi.mc.server.MCServerProvider;
import org.jboss.logging.Logger;
/**
@@ -38,7 +39,7 @@
* @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
* @version $Revision: $
*/
-public class MCServerImpl extends AbstractMCServerBase<MCServer, MCServerConfig> implements MCServer
+public class MCServerImpl extends AbstractMCServerBase<MCServer, MCServerConfig> implements MCServerProvider
{
//-------------------------------------------------------------------------------------||
// Class Members ----------------------------------------------------------------------||
Modified: projects/bootstrap/trunk/impl-mc/src/main/java/org/jboss/bootstrap/impl/mc/server/MCServerInitializer.java
===================================================================
--- projects/bootstrap/trunk/impl-mc/src/main/java/org/jboss/bootstrap/impl/mc/server/MCServerInitializer.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/impl-mc/src/main/java/org/jboss/bootstrap/impl/mc/server/MCServerInitializer.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -22,9 +22,9 @@
package org.jboss.bootstrap.impl.mc.server;
+import org.jboss.bootstrap.api.mc.config.MCServerConfig;
+import org.jboss.bootstrap.api.mc.server.MCServer;
import org.jboss.bootstrap.impl.base.server.AbstractBasicServerInitializer;
-import org.jboss.bootstrap.spi.mc.config.MCServerConfig;
-import org.jboss.bootstrap.spi.mc.server.MCServer;
import org.jboss.bootstrap.spi.server.ServerInitializer;
/**
Modified: projects/bootstrap/trunk/impl-mc/src/test/java/org/jboss/bootstrap/impl/mc/jboot45/unit/DefaultConfigUnitTestCase.java
===================================================================
--- projects/bootstrap/trunk/impl-mc/src/test/java/org/jboss/bootstrap/impl/mc/jboot45/unit/DefaultConfigUnitTestCase.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/impl-mc/src/test/java/org/jboss/bootstrap/impl/mc/jboot45/unit/DefaultConfigUnitTestCase.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -24,10 +24,10 @@
import junit.framework.TestCase;
+import org.jboss.bootstrap.api.mc.config.MCServerConfig;
+import org.jboss.bootstrap.api.mc.server.MCServer;
import org.jboss.bootstrap.impl.mc.config.BasicMCServerConfig;
import org.jboss.bootstrap.impl.mc.server.MCServerImpl;
-import org.jboss.bootstrap.spi.mc.config.MCServerConfig;
-import org.jboss.bootstrap.spi.mc.server.MCServer;
import org.jboss.logging.Logger;
import org.junit.Test;
Modified: projects/bootstrap/trunk/impl-mc/src/test/java/org/jboss/bootstrap/impl/mc/server/unit/MCServerUnitTestCase.java
===================================================================
--- projects/bootstrap/trunk/impl-mc/src/test/java/org/jboss/bootstrap/impl/mc/server/unit/MCServerUnitTestCase.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/impl-mc/src/test/java/org/jboss/bootstrap/impl/mc/server/unit/MCServerUnitTestCase.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -29,12 +29,13 @@
import org.jboss.beans.metadata.spi.BeanMetaData;
import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
+import org.jboss.bootstrap.api.lifecycle.LifecycleState;
+import org.jboss.bootstrap.api.mc.config.MCServerConfig;
+import org.jboss.bootstrap.api.mc.server.MCServer;
import org.jboss.bootstrap.impl.mc.config.BasicMCServerConfig;
import org.jboss.bootstrap.impl.mc.server.MCServerImpl;
import org.jboss.bootstrap.impl.mc.server.Pojo;
-import org.jboss.bootstrap.spi.lifecycle.LifecycleState;
-import org.jboss.bootstrap.spi.mc.config.MCServerConfig;
-import org.jboss.bootstrap.spi.mc.server.MCServer;
+import org.jboss.bootstrap.spi.mc.server.MCServerProvider;
import org.jboss.dependency.spi.ControllerContext;
import org.jboss.dependency.spi.ControllerState;
import org.jboss.kernel.spi.dependency.KernelController;
@@ -161,8 +162,11 @@
// Start
server.start();
+ // Get the internals/SPI view
+ final MCServerProvider provider = (MCServerProvider) server;
+
// Get the Deployment
- final Map<String, KernelDeployment> deployments = server.getDeployments();
+ final Map<String, KernelDeployment> deployments = provider.getDeployments();
// Ensure the deployment is there
TestCase.assertEquals("Wrong number of expected kernel deployments", 1, deployments.size());
Modified: projects/bootstrap/trunk/pom.xml
===================================================================
--- projects/bootstrap/trunk/pom.xml 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/pom.xml 2009-07-30 20:42:52 UTC (rev 91844)
@@ -34,6 +34,7 @@
<module>build</module>
<module>api</module>
<module>api-as</module>
+ <module>api-mc</module>
<module>impl-as</module>
<module>impl-base</module>
<module>impl-mc</module>
Modified: projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/server/ServerProvider.java
===================================================================
--- projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/server/ServerProvider.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/server/ServerProvider.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -38,9 +38,23 @@
* @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
* @version $Revision: $
*/
-public interface ServerProvider<K extends ServerProvider<K, T>, T extends ServerConfig<T>> extends Server<K, T>
+public interface ServerProvider<K extends Server<K, T>, T extends ServerConfig<T>> extends Server<K, T>
{
//-------------------------------------------------------------------------------------||
+ // Constants --------------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * The JMX notification event type sent on end of server startup
+ */
+ public final String START_NOTIFICATION_TYPE = "org.jboss.system.server.started";
+
+ /**
+ * The JMX notification event type sent on begin of the server shutdown
+ */
+ public final String STOP_NOTIFICATION_TYPE = "org.jboss.system.server.stopped";
+
+ //-------------------------------------------------------------------------------------||
// Contracts --------------------------------------------------------------------------||
//-------------------------------------------------------------------------------------||
Modified: projects/bootstrap/trunk/spi-as/pom.xml
===================================================================
--- projects/bootstrap/trunk/spi-as/pom.xml 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/spi-as/pom.xml 2009-07-30 20:42:52 UTC (rev 91844)
@@ -26,6 +26,7 @@
<properties>
<version.org.jboss.bootstrap_jboss.bootstrap.spi.mc>2.0.0-SNAPSHOT</version.org.jboss.bootstrap_jboss.bootstrap.spi.mc>
+ <version.org.jboss.bootstrap_jboss.bootstrap.api.as>2.0.0-SNAPSHOT</version.org.jboss.bootstrap_jboss.bootstrap.api.as>
</properties>
@@ -42,6 +43,12 @@
<artifactId>jboss-bootstrap-spi-mc</artifactId>
<version>${version.org.jboss.bootstrap_jboss.bootstrap.spi.mc}</version>
</dependency>
+
+ <dependency>
+ <groupId>org.jboss.bootstrap</groupId>
+ <artifactId>jboss-bootstrap-api-as</artifactId>
+ <version>${version.org.jboss.bootstrap_jboss.bootstrap.api.as}</version>
+ </dependency>
</dependencies>
</project>
Modified: projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/JBossASBootstrap.java
===================================================================
--- projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/JBossASBootstrap.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/JBossASBootstrap.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -22,9 +22,9 @@
package org.jboss.bootstrap.spi.as;
+import org.jboss.bootstrap.api.as.config.JBossASBasedServerConfig;
import org.jboss.bootstrap.api.as.server.JBossASBasedServer;
import org.jboss.bootstrap.spi.Bootstrap;
-import org.jboss.bootstrap.spi.as.config.JBossASBasedServerConfig;
/**
* JBossASBootstrap
Modified: projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/config/JBossASBasedConfigurationInitializer.java
===================================================================
--- projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/config/JBossASBasedConfigurationInitializer.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/config/JBossASBasedConfigurationInitializer.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -22,6 +22,7 @@
package org.jboss.bootstrap.spi.as.config;
+import org.jboss.bootstrap.api.as.config.JBossASBasedServerConfig;
import org.jboss.bootstrap.spi.config.ConfigurationInitializer;
import org.jboss.bootstrap.spi.server.ServerInitializer;
Deleted: projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/config/JBossASBasedServerConfig.java
===================================================================
--- projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/config/JBossASBasedServerConfig.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/config/JBossASBasedServerConfig.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -1,628 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.bootstrap.spi.as.config;
-
-import java.net.URL;
-
-import org.jboss.bootstrap.spi.mc.config.MCBasedServerConfig;
-
-/**
- * JBossASBasedServerConfig
- *
- * Contract for the configuration of AS-based Servers,
- * may be extended for a direct AS ServerConfig
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public interface JBossASBasedServerConfig<T extends JBossASBasedServerConfig<T>> extends MCBasedServerConfig<T>
-{
- //-------------------------------------------------------------------------------||
- // Constants --------------------------------------------------------------------||
- //-------------------------------------------------------------------------------||
-
- /**
- * Constant that holds the name of the system or
- * configuration property
- */
- String PROP_KEY_JBOSSAS_BIND_ADDRESS = "jboss.bind.address";
-
- /**
- * Constant that holds the name of the system or configuration
- * property which specifies the name of the server which will be used to
- * calculate the servers home directory and url.
- */
- String PROP_KEY_JBOSSAS_SERVER_NAME = "jboss.server.name";
-
- /**
- * Constant that holds the name of the environment
- * variable which specifies the root of the AS
- * installation
- */
- String ENV_VAR_JBOSSAS_HOME = "JBOSS_HOME";
-
- /**
- * Constant that holds the name of the system or configuration
- * property which specifies the root of the AS
- * installation
- */
- String PROP_KEY_JBOSSAS_HOME = "jboss.home";
-
- /**
- * Constant that holds the name of the system property
- * which specifies the home directory for JBossAS.
- */
- String PROP_KEY_JBOSSAS_HOME_DIR = "jboss.home.dir";
-
- /**
- * Constant that holds the name of the system property
- * which specifies the home URL for JBossAS.
- */
- String PROP_KEY_JBOSSAS_HOME_URL = "jboss.home.url";
-
- /**
- * Constant that holds the name of the system property
- * for specifying the URL where JBoss will read library files
- * from.
- */
- String PROP_KEY_JBOSSAS_BOOT_LIBRARY_URL = "jboss.lib.url";
-
- /**
- * Constant that holds the name of the system property
- * for specifying the base directory for calculating server
- * home directories.
- */
- String PROP_KEY_JBOSSAS_SERVER_BASE_DIR = "jboss.server.base.dir";
-
- /**
- * Constant that holds the name of the system property
- * for specifying the base URL for calculating server
- * home URLs.
- */
- String PROP_KEY_JBOSSAS_SERVER_BASE_URL = "jboss.server.base.url";
-
- /**
- * Constant that holds the name of the system property
- * for specifying the server home directory for JBoss.
- */
- String PROP_KEY_JBOSSAS_SERVER_HOME_DIR = "jboss.server.home.dir";
-
- /**
- * Constant that holds the name of the system property
- * for specifying the server home URL for JBoss.
- */
- String PROP_KEY_JBOSSAS_SERVER_HOME_URL = "jboss.server.home.url";
-
- /**
- * Constant that holds the name of the system property
- * for specifying the base URL for files and directories
- * common to different server configurations
- */
- String PROP_KEY_JBOSSAS_COMMON_BASE_URL = "jboss.common.base.url";
-
- /**
- * Constant that holds the name of the system property
- * for specifying a library directory URL that points to libraries
- * shared by the various server configurations.
- */
- String PROP_KEY_JBOSSAS_COMMON_LIBRARY_URL = "jboss.common.lib.url";
-
- /**
- * Constant that holds the name of the system property
- * for specifying the server log directory for JBoss.
- */
- String PROP_KEY_JBOSSAS_SERVER_LOG_DIR = "jboss.server.log.dir";
-
- /**
- * Constant that holds the name of the system property
- * for specifying the server configuration URL.
- */
- String PROP_KEY_JBOSSAS_SERVER_CONF_URL = "jboss.server.config.url";
-
- /**
- * Constant that holds the name of the system property
- * for specifying the URL where JBoss will read server specific
- * library files from.
- */
- String PROP_KEY_JBOSSAS_SERVER_LIBRARY_URL = "jboss.server.lib.url";
-
- /**
- * Constant that holds the name of the system property
- * for specifying the directory which JBoss will use for
- * persistent data file storage.
- */
- String PROP_KEY_JBOSSAS_SERVER_DATA_DIR = "jboss.server.data.dir";
-
- /**
- * Constant that holds the name of the system property
- * for specifying the directory which JBoss will use for
- * temporary file storage.
- */
- String PROP_KEY_JBOSSAS_SERVER_TEMP_DIR = "jboss.server.temp.dir";
-
- /**
- * Constant that holds the name of the system property
- * for specifying the partition name for this instance in clustering
- */
- String PROP_KEY_JBOSSAS_PARTITION_NAME = "jboss.partition.name";
-
- /**
- * Constant that holds the name of the system property
- * for specifying the UDP Group for this instance in clustering
- */
- String PROP_KEY_JBOSSAS_PARTITION_UDP_GROUP = "jboss.partition.udpGroup";
-
- /**
- * Constant that holds the name of the system property
- * for specifying the UDP Port for this instance in clustering
- */
- String PROP_KEY_JBOSSAS_PARTITION_UDP_PORT = "jboss.jgroups.udp.mcast_port";
-
- /**
- * Constant that holds the name of the system property
- * designating whether to load native libraries
- */
- String PROP_KEY_JBOSSAS_NATIVE_LOAD = "jboss.native.load";
-
- /**
- * Constant that holds the location of native libraries
- */
- String PROP_KEY_JBOSSAS_NATIVE_DIR = "jboss.native.dir";
-
- /**
- * Constant that holds the name of the system property for specifying
- * whether or not to use as the main jboss server the MBeanServer returned
- * from ManagementFactory.getPlatformMBeanServer(), when running under jdk1.5+
- *
- * <p>If not set then jboss will instantiate its own MBeanServer
- */
- String PROP_KEY_JBOSSAS_PLATFORM_MBEANSERVER = "jboss.platform.mbeanserver";
-
- //-------------------------------------------------------------------------------||
- // Contracts --------------------------------------------------------------------||
- //-------------------------------------------------------------------------------||
-
- /**
- * Obtains the bind address to be used for the Server.
- *
- * @return
- */
- String getBindAddress();
-
- /**
- * Sets the bind address for the server
- *
- * @param bindAddress
- * @return
- */
- T bindAddress(String bindAddress);
-
- /**
- * Obtains the name of the server configuration.
- *
- * @return
- */
- String getServerName();
-
- /**
- * Sets the name of the server configuration
- *
- * @param serverName
- * @return
- */
- T serverName(String serverName);
-
- /**
- * Obtains the $JBOSS_HOME, the path to the
- * root location of the JBossAS
- * installation.
- *
- * @return
- */
- URL getJBossHome();
-
- /**
- * Sets $JBOSS_HOME, the path to the root location
- * of the JBossAS installation.
- *
- * @param jbossHome The location to $JBOSS_HOME
- * @return This configuration
- * @throws IllegalArgumentException If the specified argument
- * is non-null and cannot be constructed into a URL
- */
- T jbossHome(String jbossHome) throws IllegalArgumentException;
-
- /**
- * Sets $JBOSS_HOME, the path to the root location
- * of the JBossAS installation.
- *
- * @param jbossHome The location to $JBOSS_HOME
- * @return This configuration
- */
- T jbossHome(URL jbossHome);
-
- /**
- * Obtains the location of the JBossAS
- * Boot Libraries
- *
- * @return
- */
- URL getBootLibraryLocation();
-
- /**
- * Sets the location of the JBossAS
- * Boot Libraries
- *
- * @param bootLibraryLocation
- * @return
- */
- T bootLibraryLocation(URL bootLibraryLocation);
-
- /**
- * Sets the location of the JBossAS
- * Boot Libraries
- *
- * @param bootLibraryLocation
- * @return
- * @throws IllegalArgumentException If the specified argument
- * is non-null and cannot be constructed into a URL
- */
- T bootLibraryLocation(String bootLibraryLocation) throws IllegalArgumentException;
-
- /**
- * Obtains the location of the server base, from
- * which server homes (by default) decend
- *
- * @return
- */
- URL getServerBaseLocation();
-
- /**
- * Sets the location of the server
- * base, from which server homes (by default)
- * decend
- *
- * @param serverBaseLocation
- * @return
- */
- T serverBaseLocation(URL serverBaseLocation);
-
- /**
- * Sets the location of the server
- * base, from which server homes (by default)
- * decend
- *
- * @param serverBaseLocation
- * @return
- * @throws IllegalArgumentException If the specified argument
- * is non-null and cannot be constructed into a URL
- */
- T serverBaseLocation(String serverBaseLocation) throws IllegalArgumentException;
-
- /**
- * Obtains the location of the server home
- *
- * @return
- */
- URL getServerHomeLocation();
-
- /**
- * Sets the location of the server home
- *
- * @param serverBaseLocation
- * @return
- */
- T serverHomeLocation(URL serverHomeLocation);
-
- /**
- * Sets the location of the server home
- *
- * @param serverHomeLocation
- * @return
- * @throws IllegalArgumentException If the specified argument
- * is non-null and cannot be constructed into a URL
- */
- T serverHomeLocation(String serverHomeLocation) throws IllegalArgumentException;
-
- /**
- * Obtains the location of the common base
- *
- * @return
- */
- URL getCommonBaseLocation();
-
- /**
- * Sets the location of the common base
- *
- * @param serverBaseLocation
- * @return
- */
- T commonBaseLocation(URL commonBaseLocation);
-
- /**
- * Sets the location of the common base
- *
- * @param commonBaseLocation
- * @return
- * @throws IllegalArgumentException If the specified argument
- * is non-null and cannot be constructed into a URL
- */
- T commonBaseLocation(String commonBaseLocation) throws IllegalArgumentException;
-
- /**
- * Obtains the location of the common lib
- *
- * @return
- */
- URL getCommonLibLocation();
-
- /**
- * Sets the location of the common lib
- *
- * @param commonLibLocation
- * @return
- */
- T commonLibLocation(URL commonLibLocation);
-
- /**
- * Sets the location of the common lib
- *
- * @param commonLibLocation
- * @return
- * @throws IllegalArgumentException If the specified argument
- * is non-null and cannot be constructed into a URL
- */
- T commonLibLocation(String commonLibLocation) throws IllegalArgumentException;
-
- /**
- * Obtains the location in which the server logs reside
- *
- * @return
- */
- URL getServerLogLocation();
-
- /**
- * Sets the location in which the server logs reside
- *
- * @param serverLogLocation
- * @return
- */
- T serverLogLocation(URL serverLogLocation);
-
- /**
- * Sets the location in which the server logs reside
- *
- * @param serverLogLocation
- * @return
- * @throws IllegalArgumentException If the specified argument
- * is non-null and cannot be constructed into a URL
- */
- T serverLogLocation(String serverLogLocation) throws IllegalArgumentException;
-
- /**
- * Obtains the location in which the server configuration resides
- *
- * @return
- */
- URL getServerConfLocation();
-
- /**
- * Sets the location in which the server configuration resides
- *
- * @param serverConfLocation
- * @return
- */
- T serverConfLocation(URL serverConfLocation);
-
- /**
- * Sets the location in which the server configuration resides
- *
- * @param serverConfLocation
- * @return
- * @throws IllegalArgumentException If the specified argument
- * is non-null and cannot be constructed into a URL
- */
- T serverConfLocation(String serverConfLocation) throws IllegalArgumentException;
-
- /**
- * Obtains the location in which the server libraries reside
- *
- * @return
- */
- URL getServerLibLocation();
-
- /**
- * Sets the location in which the server libraries reside
- *
- * @param serverLibLocation
- * @return
- */
- T serverLibLocation(URL serverLibLocation);
-
- /**
- * Sets the location in which the server libraries reside
- *
- * @param serverLibLocation
- * @return
- * @throws IllegalArgumentException If the specified argument
- * is non-null and cannot be constructed into a URL
- */
- T serverLibLocation(String serverLibLocation) throws IllegalArgumentException;
-
- /**
- * Obtains the location in which the server persistent data resides
- *
- * @return
- */
- URL getServerDataLocation();
-
- /**
- * Sets the location in which the server persistent data resides
- *
- * @param serverDataLocation
- * @return
- */
- T serverDataLocation(URL serverDataLocation);
-
- /**
- * Sets the location in which the server persistent data resides
- *
- * @param serverDataLocation
- * @return
- * @throws IllegalArgumentException If the specified argument
- * is non-null and cannot be constructed into a URL
- */
- T serverDataLocation(String serverDataLocation) throws IllegalArgumentException;
-
- /**
- * Obtains the location in which the server temp data resides
- *
- * @return
- */
- URL getServerTempLocation();
-
- /**
- * Sets the location in which the server temp data resides
- *
- * @param serverTempLocation
- * @return
- */
- T serverTempLocation(URL serverTempLocation);
-
- /**
- * Sets the location in which the server temp data resides
- *
- * @param serverTempLocation
- * @return
- * @throws IllegalArgumentException If the specified argument
- * is non-null and cannot be constructed into a URL
- */
- T serverTempLocation(String serverTempLocation) throws IllegalArgumentException;
-
- /**
- * Obtains the partition name for this instance in clustering
- *
- * @return
- */
- String getPartitionName();
-
- /**
- * Sets the partition name for this instance in clustering
- *
- * @param partitionName
- * @return
- */
- T partitionName(String partitionName);
-
- /**
- * Obtains the UDP Group for this instance in clustering
- *
- * @return
- */
- String getUdpGroup();
-
- /**
- * Sets the UDP Group for this instance in clustering
- *
- * @param udpGroup
- * @return
- */
- T udpGroup(String udpGroup);
-
- /**
- * Obtains the JGroups UDP Multicast port for use
- * in clustering
- *
- * @return
- */
- Integer getUdpPort();
-
- /**
- * Sets the JGroups UDP Multicast port for use
- * in clustering
- *
- * @param udpPort The port, or null to use the default
- * @return
- */
- T udpPort(Integer udpPort);
-
- /**
- * Determines whether or not to load the native libraries
- *
- * @return
- */
- Boolean isLoadNative();
-
- /**
- * Sets whether or not to load the native libraries
- *
- * @param loadNative true or false, or null to use the default
- * @return
- */
- T loadNative(Boolean loadNative);
-
- /**
- * Obtains the location of the JBossAS
- * Native Libraries
- *
- * @return
- */
- URL getNativeLibraryLocation();
-
- /**
- * Sets the location of the JBossAS
- * Native Libraries
- *
- * @param nativeLibraryLocation
- * @return
- */
- T nativeLibraryLocation(URL nativeLibraryLocation);
-
- /**
- * Sets the location of the JBossAS
- * Native Libraries
- *
- * @param nativeLibraryLocation
- * @return
- * @throws IllegalArgumentException If the specified argument
- * is non-null and cannot be constructed into a URL
- */
- T nativeLibraryLocation(String nativeLibraryLocation) throws IllegalArgumentException;
-
- /**
- * Determines whether or not to use as the main jboss server the MBeanServer returned
- * from ManagementFactory.getPlatformMBeanServer(), when running under jdk1.5+
- *
- * @return
- */
- Boolean isUsePlatformMBeanServer();
-
- /**
- * Sets whether or not to use as the main jboss server the MBeanServer returned
- * from ManagementFactory.getPlatformMBeanServer(), when running under jdk1.5+
- *
- * @param usePlatformMBeanServer
- * @return
- */
- T usePlatformMBeanServer(Boolean usePlatformMBeanServer);
-
-}
Modified: projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/config/JBossASConfigurationInitializer.java
===================================================================
--- projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/config/JBossASConfigurationInitializer.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/config/JBossASConfigurationInitializer.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -21,6 +21,8 @@
*/
package org.jboss.bootstrap.spi.as.config;
+import org.jboss.bootstrap.api.as.config.JBossASServerConfig;
+
/**
* JBossASSConfigurationInitializer
*
Deleted: projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/config/JBossASServerConfig.java
===================================================================
--- projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/config/JBossASServerConfig.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/config/JBossASServerConfig.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -1,36 +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.bootstrap.spi.as.config;
-
-/**
- * JBossASServerConfig
- *
- * User configuration for the JBoss Application Server.
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public interface JBossASServerConfig extends JBossASBasedServerConfig<JBossASServerConfig>
-{
-
-}
Deleted: projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/config/JBossASServerConfigFactory.java
===================================================================
--- projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/config/JBossASServerConfigFactory.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/config/JBossASServerConfigFactory.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -1,109 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.bootstrap.spi.as.config;
-
-import org.jboss.bootstrap.spi.config.ServerConfig;
-import org.jboss.bootstrap.spi.factory.ServerConfigFactory;
-
-/**
- * JBossASServerConfigFactory
- *
- * Factory of {@link JBossASServerConfig} implementations
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public class JBossASServerConfigFactory
-{
-
- //-------------------------------------------------------------------------------------||
- // Class Members ----------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * The FQN of the default implementation class to create
- */
- public static final String DEFAULT_AS_SERVER_CONFIG_IMPL_CLASS_NAME = "org.jboss.bootstrap.impl.as.config.BasicJBossASServerConfig";
-
- //-------------------------------------------------------------------------------------||
- // Constructor ------------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Constructor, should not be called
- */
- private JBossASServerConfigFactory()
- {
- // No external access
- }
-
- //-------------------------------------------------------------------------------------||
- // Factory Methods --------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Creates a JBossASServerConfig from the default implementation class name
- * {@link JBossASServerConfigFactory#DEFAULT_AS_SERVER_CONFIG_IMPL_CLASS_NAME}, using the
- * Thread Context ClassLoader. The returned config will additionally be created using
- * the TCCL.
- *
- * @return The newly-created config
- */
- public static JBossASServerConfig createServerConfig()
- {
- return createServerConfig(SecurityActions.getTccl());
- }
-
- /**
- * Creates a JBossASServerConfig from the default implementation class name
- * {@link JBossASServerConfigFactory#DEFAULT_AS_SERVER_CONFIG_IMPL_CLASS_NAME}, using the
- * specified ClassLoader. The returned config will additionally be created using
- * the ClassLoader denoted.
- *
- * @throws IllegalArgumentException If the ClassLoader is null
- * @return The newly-created config
- */
- public static JBossASServerConfig createServerConfig(final ClassLoader cl) throws IllegalArgumentException
- {
- // Precondition check
- if (cl == null)
- {
- throw new IllegalArgumentException(ClassLoader.class.getSimpleName() + " is required.");
- }
-
- // Get the config
- ServerConfig<?> config = null;
- try
- {
- config = ServerConfigFactory.createServerConfig(DEFAULT_AS_SERVER_CONFIG_IMPL_CLASS_NAME, cl);
- }
- catch (Exception e)
- {
- // An exception here is likely our fault, so throw a RuntimeException
- throw new RuntimeException("Error in creating the configuration", e);
- }
-
- // Cast
- return JBossASServerConfig.class.cast(config);
- }
-}
Deleted: projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/config/SecurityActions.java
===================================================================
--- projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/config/SecurityActions.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/config/SecurityActions.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -1,73 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.bootstrap.spi.as.config;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-
-/**
- * SecurityActions
- *
- * Utility class for security actions, so as to provide
- * some centralization without leaking privileged actions
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-class SecurityActions
-{
-
- //-------------------------------------------------------------------------------------||
- // Constructor ------------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * In place to prevent instanciation
- */
- private SecurityActions()
- {
- }
-
- //-------------------------------------------------------------------------------------||
- // Utility Methods --------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Obtains the Thread Context ClassLoader
- *
- * @return
- */
- static ClassLoader getTccl()
- {
- return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
- {
-
- public ClassLoader run()
- {
- // Return the TCCL
- return Thread.currentThread().getContextClassLoader();
- }
-
- });
- }
-}
Modified: projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/JBossASBasedServerProvider.java
===================================================================
--- projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/JBossASBasedServerProvider.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/JBossASBasedServerProvider.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -24,10 +24,10 @@
import java.util.Date;
import java.util.Map;
+import org.jboss.bootstrap.api.as.config.JBossASBasedServerConfig;
import org.jboss.bootstrap.api.as.server.JBossASBasedServer;
-import org.jboss.bootstrap.spi.as.config.JBossASBasedServerConfig;
-import org.jboss.bootstrap.spi.mc.server.MCBasedServer;
-import org.jboss.bootstrap.spi.server.Server;
+import org.jboss.bootstrap.api.mc.server.MCBasedServer;
+import org.jboss.bootstrap.api.server.Server;
/**
* JBossASBasedServerProvider
Modified: projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/JBossASServerProvider.java
===================================================================
--- projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/JBossASServerProvider.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/JBossASServerProvider.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -22,8 +22,8 @@
package org.jboss.bootstrap.spi.as.server;
+import org.jboss.bootstrap.api.as.config.JBossASServerConfig;
import org.jboss.bootstrap.api.as.server.JBossASServer;
-import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
/**
* JBossASServer
Modified: projects/bootstrap/trunk/spi-mc/pom.xml
===================================================================
--- projects/bootstrap/trunk/spi-mc/pom.xml 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/spi-mc/pom.xml 2009-07-30 20:42:52 UTC (rev 91844)
@@ -25,7 +25,8 @@
<!-- Properties -->
<properties>
- <version.org.jboss.bootstrap_jboss.bootstrap.spi>2.0.0-alpha-1</version.org.jboss.bootstrap_jboss.bootstrap.spi>
+ <version.org.jboss.bootstrap_jboss.bootstrap.spi>2.0.0-SNAPSHOT</version.org.jboss.bootstrap_jboss.bootstrap.spi>
+ <version.org.jboss.bootstrap_jboss.bootstrap.api.mc>2.0.0-SNAPSHOT</version.org.jboss.bootstrap_jboss.bootstrap.api.mc>
</properties>
@@ -42,6 +43,12 @@
<artifactId>jboss-bootstrap-spi</artifactId>
<version>${version.org.jboss.bootstrap_jboss.bootstrap.spi}</version>
</dependency>
+
+ <dependency>
+ <groupId>org.jboss.bootstrap</groupId>
+ <artifactId>jboss-bootstrap-api-mc</artifactId>
+ <version>${version.org.jboss.bootstrap_jboss.bootstrap.api.mc}</version>
+ </dependency>
<dependency>
<groupId>org.jboss.microcontainer</groupId>
Deleted: projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/server/MCBasedServer.java
===================================================================
--- projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/server/MCBasedServer.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/server/MCBasedServer.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -1,60 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.bootstrap.spi.mc.server;
-
-import java.util.Map;
-
-import org.jboss.bootstrap.spi.config.ServerConfig;
-import org.jboss.bootstrap.spi.server.Server;
-import org.jboss.kernel.Kernel;
-import org.jboss.kernel.spi.deployment.KernelDeployment;
-
-/**
- * MCBasedServer
- *
- * Contract for MC-based Servers, may be extended for a direct
- * MC Server
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public interface MCBasedServer<K extends Server<K, T>, T extends ServerConfig<T>> extends Server<K, T>
-{
- //-------------------------------------------------------------------------------------||
- // Contracts --------------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Obtains the underlying Kernel
- *
- * @return
- */
- Kernel getKernel();
-
- /**
- * Obtains the deployments currently deployed on this server
- *
- * @return
- */
- Map<String, KernelDeployment> getDeployments();
-}
Added: projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/server/MCBasedServerProvider.java
===================================================================
--- projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/server/MCBasedServerProvider.java (rev 0)
+++ projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/server/MCBasedServerProvider.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.bootstrap.spi.mc.server;
+
+import java.util.Map;
+
+import org.jboss.bootstrap.api.config.ServerConfig;
+import org.jboss.bootstrap.api.mc.server.MCBasedServer;
+import org.jboss.bootstrap.api.server.Server;
+import org.jboss.bootstrap.spi.server.ServerProvider;
+import org.jboss.kernel.spi.deployment.KernelDeployment;
+
+/**
+ * MCBasedServer
+ *
+ * Contract for implementations of MC-based Servers,
+ * may be extended for a direct MC Server
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface MCBasedServerProvider<K extends Server<K, T>, T extends ServerConfig<T>>
+ extends
+ MCBasedServer<K, T>,
+ ServerProvider<K, T>
+{
+ //-------------------------------------------------------------------------------------||
+ // Contracts --------------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Obtains the deployments currently deployed on this server
+ *
+ * @return
+ */
+ Map<String, KernelDeployment> getDeployments();
+}
Deleted: projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/server/MCServer.java
===================================================================
--- projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/server/MCServer.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/server/MCServer.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -1,38 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.bootstrap.spi.mc.server;
-
-import org.jboss.bootstrap.spi.mc.config.MCServerConfig;
-
-/**
- * MCServer
- *
- * Contract of Microcontainer implementations of the Server
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public interface MCServer extends MCBasedServer<MCServer, MCServerConfig>
-{
-
-}
Deleted: projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/server/MCServerFactory.java
===================================================================
--- projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/server/MCServerFactory.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/server/MCServerFactory.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -1,215 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.bootstrap.spi.mc.server;
-
-import org.jboss.bootstrap.spi.factory.ServerFactory;
-import org.jboss.bootstrap.spi.mc.config.MCServerConfig;
-import org.jboss.bootstrap.spi.mc.config.MCServerConfigFactory;
-import org.jboss.bootstrap.spi.server.Server;
-
-/**
- * MCServerFactory
- *
- * Factory of {@link MCServer} implementations
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public class MCServerFactory
-{
-
- //-------------------------------------------------------------------------------------||
- // Class Members ----------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * The FQN of the default server implementation class to create
- */
- public static final String DEFAULT_MC_SERVER_IMPL_CLASS_NAME = "org.jboss.bootstrap.impl.mc.server.MCServerImpl";
-
- //-------------------------------------------------------------------------------------||
- // Constructor ------------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- private MCServerFactory()
- {
- // No external access
- }
-
- //-------------------------------------------------------------------------------------||
- // Factory Methods --------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Creates an MCServer from the default implementation class name
- * {@link MCServerFactory#DEFAULT_MC_SERVER_IMPL_CLASS_NAME}, using the
- * Thread Context ClassLoader. The returned server will additionally be created using
- * the TCCL.
- *
- * @return The newly-created Server
- */
- public static MCServer createServer()
- {
- return createServer(SecurityActions.getTccl());
- }
-
- /**
- * Creates an MCServer from the default implementation class name
- * {@link MCServerFactory#DEFAULT_MC_SERVER_IMPL_CLASS_NAME}, using the
- * Thread Context ClassLoader. The returned server will additionally be created using
- * the TCCL. As a convenience, the server will contain a default configuration.
- *
- * @return The newly-created Server populated with a default configuration
- */
- public static MCServer createServerWithDefaultConfiguration()
- {
- return createServerWithDefaultConfiguration(SecurityActions.getTccl());
- }
-
- /**
- * Creates an MCServer from the default implementation class name
- * {@link MCServerFactory#DEFAULT_MC_SERVER_IMPL_CLASS_NAME}, using the
- * specified ClassLoader. The returned server will additionally be created using
- * the ClassLoader denoted.
- *
- * @throws IllegalArgumentException If the ClassLoader is null
- * @return The newly-created Server
- */
- public static MCServer createServer(final ClassLoader cl) throws IllegalArgumentException
- {
- try
- {
- return createServer(DEFAULT_MC_SERVER_IMPL_CLASS_NAME, cl);
- }
- catch (Exception e)
- {
- // An exception here is likely our fault, so throw a RuntimeException
- throw new RuntimeException("Error in creating the Server", e);
- }
- }
-
- /**
- * Creates an MCServer from the default implementation class name
- * {@link MCServerFactory#DEFAULT_MC_SERVER_IMPL_CLASS_NAME}, using the
- * specified ClassLoader. The returned server will additionally be created using
- * the ClassLoader denoted. As a convenience, the server will contain a
- * default configuration.
- *
- * @throws IllegalArgumentException If the ClassLoader is null
- * @return The newly-created Server populated with a default configuration
- */
- public static MCServer createServerWithDefaultConfiguration(final ClassLoader cl) throws IllegalArgumentException
- {
- try
- {
- return createServerWithDefaultConfiguration(DEFAULT_MC_SERVER_IMPL_CLASS_NAME, cl);
- }
- catch (Exception e)
- {
- // An exception here is likely our fault, so throw a RuntimeException
- throw new RuntimeException("Error in creating the Server", e);
- }
- }
-
- /**
- * Creates an MCServer from the specified implementation class name
- * using the specified ClassLoader. The returned server will additionally
- * be created using the ClassLoader denoted.
- *
- * @throws IllegalArgumentException If the ClassLoader or server implementation class is null
- * @throws Exception If there was an error in creating the Server
- * @return The newly-created Server
- */
- public static MCServer createServer(final String implClassName, final ClassLoader cl)
- throws IllegalArgumentException, Exception
- {
- // Precondition check
- if (cl == null)
- {
- throw new IllegalArgumentException(ClassLoader.class.getSimpleName() + " is required.");
- }
- if (implClassName == null || implClassName.length() == 0)
- {
- throw new IllegalArgumentException("Implementation class name must be specified");
- }
-
- // Get the server
- final Server<?, ?> server = ServerFactory.createServer(implClassName, cl);
-
- // Cast
- MCServer mcServer = null;
- try
- {
- mcServer = MCServer.class.cast(server);
- }
- catch (ClassCastException cce)
- {
- // Catch, explain giving some context, throw new
- throw new ClassCastException("Specified server implementation class, " + implClassName
- + " must be assignable to " + MCServer.class.getName());
- }
-
- // Set a default config
- final MCServerConfig config = MCServerConfigFactory.createServerConfig(cl);
- mcServer.setConfiguration(config);
-
- // Return
- return mcServer;
- }
-
- /**
- * Creates an MCServer from the specified implementation class name
- * using the specified ClassLoader. The returned server will additionally
- * be created using the ClassLoader denoted. As a convenience, the server
- * will contain a default configuration.
- *
- * @throws IllegalArgumentException If the ClassLoader or server implementation class is null
- * @throws Exception If there was an error in creating the Server
- * @return The newly-created Server populated with a default configuration
- */
- public static MCServer createServerWithDefaultConfiguration(final String implClassName, final ClassLoader cl)
- throws IllegalArgumentException, Exception
- {
- // Make the server, applying a default config
- return applyDefaultConfiguration(createServer(implClassName, cl), cl);
- }
-
- //-------------------------------------------------------------------------------------||
- // Internal Helper Methods ------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Sets a new, default configuration upon the specified server
- *
- * @param server The server upon which we'll set a new config
- * @param cl The ClassLoader used to create the new config
- * @return The same server instance passed in, with a set config
- */
- private static MCServer applyDefaultConfiguration(final MCServer server, final ClassLoader cl)
- {
- // Set a default config
- final MCServerConfig config = MCServerConfigFactory.createServerConfig(cl);
- server.setConfiguration(config);
- return server;
- }
-}
Added: projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/server/MCServerProvider.java
===================================================================
--- projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/server/MCServerProvider.java (rev 0)
+++ projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/server/MCServerProvider.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.bootstrap.spi.mc.server;
+
+import org.jboss.bootstrap.api.mc.config.MCServerConfig;
+import org.jboss.bootstrap.api.mc.server.MCServer;
+
+/**
+ * MCServerProvider
+ *
+ * Contract of Microcontainer implementations of the Server
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface MCServerProvider extends MCBasedServerProvider<MCServer, MCServerConfig>, MCServer
+{
+
+}
Deleted: projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/server/SecurityActions.java
===================================================================
--- projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/server/SecurityActions.java 2009-07-30 20:40:21 UTC (rev 91843)
+++ projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/server/SecurityActions.java 2009-07-30 20:42:52 UTC (rev 91844)
@@ -1,73 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.bootstrap.spi.mc.server;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-
-/**
- * SecurityActions
- *
- * Utility class for security actions, so as to provide
- * some centralization without leaking privileged actions
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-class SecurityActions
-{
-
- //-------------------------------------------------------------------------------------||
- // Constructor ------------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * In place to prevent instanciation
- */
- private SecurityActions()
- {
- }
-
- //-------------------------------------------------------------------------------------||
- // Utility Methods --------------------------------------------------------------------||
- //-------------------------------------------------------------------------------------||
-
- /**
- * Obtains the Thread Context ClassLoader
- *
- * @return
- */
- static ClassLoader getTccl()
- {
- return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
- {
-
- public ClassLoader run()
- {
- // Return the TCCL
- return Thread.currentThread().getContextClassLoader();
- }
-
- });
- }
-}
More information about the jboss-cvs-commits
mailing list