[jboss-cvs] JBossAS SVN: r81187 - in projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap: microcontainer and 3 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Nov 17 18:56:22 EST 2008
Author: ALRubinger
Date: 2008-11-17 18:56:22 -0500 (Mon, 17 Nov 2008)
New Revision: 81187
Modified:
projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/AbstractServerImpl.java
projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/BaseServerConfig.java
projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/BootstrapMetaData.java
projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/SecurityActions.java
projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/microcontainer/ServerImpl.java
projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/spi/Bootstrap.java
projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/spi/Server.java
projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/spi/ServerConfig.java
projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/spi/util/ServerConfigUtil.java
projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/xml/BootstrapParser.java
Log:
[JBBOOT-2] Applied:
svn diff -r 80819:81177 https://svn.jboss.org/repos/jbossas/trunk/bootstrap/
...after manually correcting filenames and stripping SVN properties from the patch
Modified: projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/AbstractServerImpl.java
===================================================================
--- projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/AbstractServerImpl.java 2008-11-17 23:55:56 UTC (rev 81186)
+++ projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/AbstractServerImpl.java 2008-11-17 23:56:22 UTC (rev 81187)
@@ -1,8 +1,8 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
+ * 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
@@ -125,7 +125,7 @@
if (bootstrap == null)
throw new IllegalArgumentException("Null bootstrap");
- bootstraps.add(bootstrap);
+ bootstraps.remove(bootstrap);
}
/**
@@ -212,18 +212,25 @@
log.debug("Server loaded through: " + cl.getClass().getName());
// Log the basic configuration elements
+ log.info("Bootstrap URL: " + config.getBootstrapURL());
log.info("Home Dir: " + config.getHomeDir());
log.info("Home URL: " + config.getHomeURL());
log.info("Library URL: " + config.getLibraryURL());
log.info("Patch URL: " + config.getPatchURL());
+ log.info("Common Base URL: " + config.getCommonBaseURL());
+ log.info("Common Library URL: " + config.getCommonLibraryURL());
log.info("Server Name: " + config.getServerName());
+ log.info("Server Base Dir: " + config.getServerBaseDir());
+ log.info("Server Base URL: " + config.getServerBaseURL());
+ log.info("Server Config URL: " + config.getServerConfigURL());
log.info("Server Home Dir: " + config.getServerHomeDir());
log.info("Server Home URL: " + config.getServerHomeURL());
log.info("Server Data Dir: " + config.getServerDataDir());
+ log.info("Server Library URL: " + config.getServerLibraryURL());
+ log.info("Server Log Dir: " + config.getServerLogDir());
+ log.info("Server Native Dir: " + config.getServerNativeDir());
log.info("Server Temp Dir: " + config.getServerTempDir());
- log.info("Server Config URL: " + config.getServerConfigURL());
- log.info("Server Library URL: " + config.getServerLibraryURL());
- log.info("Shared Library URL: " + config.getSharedLibraryURL());
+ log.info("Server Temp Deploy Dir: " + config.getServerTempDeployDir());
log.info("Root Deployment Filename: " + config.getRootDeploymentFilename());
}
Modified: projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/BaseServerConfig.java
===================================================================
--- projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/BaseServerConfig.java 2008-11-17 23:55:56 UTC (rev 81186)
+++ projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/BaseServerConfig.java 2008-11-17 23:56:22 UTC (rev 81187)
@@ -1,671 +1,694 @@
-/* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt 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;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Properties;
-
-import org.jboss.bootstrap.spi.Server;
-import org.jboss.bootstrap.spi.ServerConfig;
-import org.jboss.util.NestedRuntimeException;
-import org.jboss.util.Null;
-import org.jboss.util.Primitives;
-import org.jboss.util.platform.Java;
-
-/**
- * A container for the basic configuration elements required to create
- * a Server instance.
- *
- * <p>MalformedURLException are rethrown as NestedRuntimeExceptions, so that
- * code that needs to access these values does not have to directly
- * worry about problems with lazy construction of final URL values.
- *
- * <p>Most values are determined durring first call to getter. All values
- * when determined will have equivilent system properties set.
- *
- * @author <a href="mailto:jason at planet57.com">Jason Dillon</a>
- * @author <a href="mailto:dimitris at jboss.org">Dimitris Andreadis</a>
- * @author Scott.Stark at jboss.org
- * @version <tt>$Revision: 41281 $</tt>
- */
-public class BaseServerConfig implements ServerConfig
-{
- /** The configuration properties to pull data from. */
- private Properties props;
-
- private URL bootstrapURL;
- private File homeDir;
- private URL homeURL;
- private URL libraryURL;
-
- /**
- * The base URL where patch files will be loaded from. This is
- * typed as an Object to allow its value to contain Null.VALUE
- * or a URL. If value is Null.VALUE then we have determined
- * that there is no user configuration for this value and it will
- * be passed back as null to the requesting client.
- */
- private Object patchURL;
-
- private String serverSpecificationVersion;
-
- private String serverName;
- private File serverBaseDir;
- private File serverHomeDir;
- private File serverLogDir;
- private File serverTempDir;
- private File serverDataDir;
- private URL serverBaseURL;
- private URL serverHomeURL;
- private URL serverLibraryURL;
- private URL serverConfigURL;
- private URL sharedLibraryURL;
-
- /** Exit on shutdown flag. */
- private Boolean exitOnShutdown;
- private Boolean blockingShutdown;
- private Boolean requireJBossURLStreamHandlerFactory;
- private Boolean platformMBeanServer;
-
- private Boolean installLifeThread;
-
- private String rootDeployableFilename;
-
- /**
- * Construct a new <tt>ServerConfigImpl</tt> instance.
- *
- * @param props Configuration properties.
- *
- * @throws Exception Missing or invalid configuration.
- */
- public BaseServerConfig(final Properties props) throws Exception
- {
- this.props = props;
-
- // Must have HOME_DIR
- homeDir = getFile(ServerConfig.HOME_DIR);
- if (homeDir == null)
- throw new Exception("Missing configuration value for: " + ServerConfig.HOME_DIR);
- System.setProperty(ServerConfig.HOME_DIR, homeDir.toString());
- // Setup the SERVER_HOME_DIR system property
- getServerHomeDir();
-
- Package thisPackage = getClass().getPackage();
- serverSpecificationVersion = thisPackage.getSpecificationVersion();
- }
-
- /** Breakout the initialization of URLs from the constructor as we need
- * the ServerConfig.HOME_DIR set for log setup, but we cannot create any
- * file URLs prior to the
- *
- * @throws MalformedURLException for a bad home url
- */
- public void initURLs()
- throws MalformedURLException
- {
- // If not set then default to homeDir
- homeURL = getURL(ServerConfig.HOME_URL);
- if (homeURL == null)
- homeURL = homeDir.toURL();
- System.setProperty(ServerConfig.HOME_URL, homeURL.toString());
- }
-
- /////////////////////////////////////////////////////////////////////////
- // Typed Access //
- /////////////////////////////////////////////////////////////////////////
-
- public URL getBootstrapURL()
- {
- if (bootstrapURL == null)
- {
- try
- {
- bootstrapURL = getURL(ServerConfig.BOOTSTRAP_URL);
- if (bootstrapURL != null)
- System.setProperty(ServerConfig.BOOTSTRAP_URL, bootstrapURL.toString());
- }
- catch (MalformedURLException e)
- {
- throw new NestedRuntimeException(e);
- }
- }
-
- return bootstrapURL;
- }
-
- public File getHomeDir()
- {
- return homeDir;
- }
-
- public URL getHomeURL()
- {
- return homeURL;
- }
-
- public URL getLibraryURL()
- {
- if (libraryURL == null)
- {
- try
- {
- libraryURL = getURL(ServerConfig.LIBRARY_URL);
- if (libraryURL == null)
- {
- libraryURL = new URL(homeURL, ServerConfig.LIBRARY_URL_SUFFIX);
- }
- System.setProperty(ServerConfig.LIBRARY_URL, libraryURL.toString());
- }
- catch (MalformedURLException e)
- {
- throw new NestedRuntimeException(e);
- }
- }
- return libraryURL;
- }
-
- public URL getPatchURL()
- {
- if (patchURL == null)
- {
- try
- {
- patchURL = getURL(ServerConfig.PATCH_URL);
- if (patchURL == null)
- {
- patchURL = Null.VALUE;
- }
- else
- {
- System.setProperty(ServerConfig.PATCH_URL, patchURL.toString());
- }
- }
- catch (MalformedURLException e)
- {
- throw new NestedRuntimeException(e);
- }
- }
-
- if (patchURL == Null.VALUE)
- return null;
-
- return (URL) patchURL;
- }
-
- public String getServerName()
- {
- if (serverName == null)
- {
- serverName = props.getProperty(ServerConfig.SERVER_NAME, ServerConfig.DEFAULT_SERVER_NAME);
- System.setProperty(ServerConfig.SERVER_NAME, serverName);
- }
- return serverName;
- }
-
- public File getServerBaseDir()
- {
- if (serverBaseDir == null)
- {
- serverBaseDir = getFile(ServerConfig.SERVER_BASE_DIR);
- if (serverBaseDir == null)
- {
- serverBaseDir = new File(homeDir, ServerConfig.SERVER_BASE_DIR_SUFFIX);
- System.setProperty(ServerConfig.SERVER_BASE_DIR, serverBaseDir.toString());
- }
- }
- return serverBaseDir;
- }
-
- public File getServerHomeDir()
- {
- if (serverHomeDir == null)
- {
- serverHomeDir = getFile(ServerConfig.SERVER_HOME_DIR);
- if (serverHomeDir == null)
- {
- serverHomeDir = new File(getServerBaseDir(), getServerName());
- System.setProperty(ServerConfig.SERVER_HOME_DIR, serverHomeDir.toString());
- }
- }
- return serverHomeDir;
- }
-
- /**
- * Get the directory where temporary files will be stored. The associated
- * ServerConfig.SERVER_LOG_DIR system property needs to be set before
- * the logging framework is used.
- *
- * @see ServerConfig#SERVER_LOG_DIR
- * @return the writable temp directory
- */
- public File getServerLogDir()
- {
- if (serverLogDir == null)
- {
- serverLogDir = getFile(ServerConfig.SERVER_LOG_DIR);
- if (serverLogDir == null)
- {
- serverLogDir = new File(getServerHomeDir(), ServerConfig.SERVER_LOG_DIR_SUFFIX);
- System.setProperty(ServerConfig.SERVER_LOG_DIR, serverLogDir.toString());
- }
- }
- return serverLogDir;
- }
-
- /**
- * Get the directory where temporary files will be stored.
- *
- * @return the writable temp directory
- */
- public File getServerTempDir()
- {
- if (serverTempDir == null)
- {
- serverTempDir = getFile(ServerConfig.SERVER_TEMP_DIR);
- if (serverTempDir == null)
- {
- serverTempDir = new File(getServerHomeDir(), ServerConfig.SERVER_TEMP_DIR_SUFFIX);
- System.setProperty(ServerConfig.SERVER_TEMP_DIR, serverTempDir.toString());
- }
- }
- return serverTempDir;
- }
-
- /**
- * Get the directory where local data will be stored.
- *
- * @return the data directory
- */
- public File getServerDataDir()
- {
- if (serverDataDir == null)
- {
- serverDataDir = getFile(ServerConfig.SERVER_DATA_DIR);
- if (serverDataDir == null)
- {
- serverDataDir = new File(getServerHomeDir(), ServerConfig.SERVER_DATA_DIR_SUFFIX);
- System.setProperty(ServerConfig.SERVER_DATA_DIR, serverDataDir.toString());
- }
- }
- return serverDataDir;
- }
-
- /**
- * Get the native dir for unpacking
- *
- * @return the directory
- */
- public File getServerNativeDir()
- {
- String fileName = System.getProperty(NATIVE_DIR_PROPERTY);
- if (fileName != null)
- return new File(fileName);
- return new File(getServerTempDir(), "native");
- }
-
- /**
- * Get the temporary deployment dir for unpacking
- *
- * @return the directory
- */
- public File getServerTempDeployDir()
- {
- return new File(getServerTempDir(), "deploy");
- }
-
- public URL getServerBaseURL()
- {
- if (serverBaseURL == null)
- {
- try
- {
- serverBaseURL = getURL(ServerConfig.SERVER_BASE_URL);
- if (serverBaseURL == null)
- {
- serverBaseURL = new URL(homeURL, ServerConfig.SERVER_BASE_URL_SUFFIX);
- }
- System.setProperty(ServerConfig.SERVER_BASE_URL, serverBaseURL.toString());
- }
- catch (MalformedURLException e)
- {
- throw new NestedRuntimeException(e);
- }
- }
- return serverBaseURL;
- }
-
- public URL getServerHomeURL()
- {
- if (serverHomeURL == null)
- {
- try
- {
- serverHomeURL = getURL(ServerConfig.SERVER_HOME_URL);
- if (serverHomeURL == null)
- {
- serverHomeURL = new URL(getServerBaseURL(), getServerName() + "/");
- }
- System.setProperty(ServerConfig.SERVER_HOME_URL, serverHomeURL.toString());
- }
- catch (MalformedURLException e)
- {
- throw new NestedRuntimeException(e);
- }
- }
- return serverHomeURL;
- }
-
- public URL getServerLibraryURL()
- {
- if (serverLibraryURL == null)
- {
- try
- {
- serverLibraryURL = getURL(ServerConfig.SERVER_LIBRARY_URL);
- if (serverLibraryURL == null)
- {
- serverLibraryURL = new URL(getServerHomeURL(), ServerConfig.LIBRARY_URL_SUFFIX);
- }
- System.setProperty(ServerConfig.SERVER_LIBRARY_URL, serverLibraryURL.toString());
- }
- catch (MalformedURLException e)
- {
- throw new NestedRuntimeException(e);
- }
- }
- return serverLibraryURL;
- }
-
- public URL getSharedLibraryURL()
- {
- if (sharedLibraryURL == null)
- {
- try
- {
- sharedLibraryURL = getURL(ServerConfig.SHARED_LIBRARY_URL);
- if (sharedLibraryURL == null)
- {
- sharedLibraryURL = new URL(getServerBaseURL(), ServerConfig.LIBRARY_URL_SUFFIX);
- }
- System.setProperty(ServerConfig.SHARED_LIBRARY_URL, sharedLibraryURL.toString());
- }
- catch (MalformedURLException e)
- {
- throw new NestedRuntimeException(e);
- }
- }
- return sharedLibraryURL;
- }
-
- public URL getServerConfigURL()
- {
- if (serverConfigURL == null)
- {
- try
- {
- serverConfigURL = getURL(ServerConfig.SERVER_CONFIG_URL);
- if (serverConfigURL == null)
- {
- serverConfigURL = new URL(getServerHomeURL(), ServerConfig.SERVER_CONFIG_URL_SUFFIX);
- }
- System.setProperty(ServerConfig.SERVER_CONFIG_URL, serverConfigURL.toString());
- }
- catch (MalformedURLException e)
- {
- throw new NestedRuntimeException(e);
- }
- }
- return serverConfigURL;
- }
-
- /**
- * Get the current value of the flag that indicates if we are
- * using the platform MBeanServer as the main jboss server.
- * Both the {@link ServerConfig#PLATFORM_MBEANSERVER}
- * property must be set, and the jvm must be jdk1.5+
- *
- * @return true if jboss runs on the jvm platfrom MBeanServer
- */
- public boolean getPlatformMBeanServer()
- {
- if (platformMBeanServer == null)
- {
- if (Java.isCompatible(Java.VERSION_1_5))
- {
- // get whatever the user has specified or the default
- String value = props.getProperty(ServerConfig.PLATFORM_MBEANSERVER,
- (new Boolean(ServerConfig.DEFAULT_PLATFORM_MBEANSERVER)).toString());
-
- // treat empty string as true
- value = "".equals(value) ? "true" : value;
-
- // true or false
- platformMBeanServer = new Boolean(value);
- }
- else
- {
- // negative :)
- platformMBeanServer = Boolean.FALSE;
- }
- }
- return platformMBeanServer.booleanValue();
- }
-
- /**
- * Enable or disable exiting the JVM when {@link Server#shutdown()} is called.
- * If enabled, then shutdown calls {@link Server#exit()}. If disabled, then
- * only the shutdown hook will be run.
- *
- * @param flag True to enable calling exit on shutdown.
- */
- public void setExitOnShutdown(final boolean flag)
- {
- exitOnShutdown = Primitives.valueOf(flag);
- }
-
- /**
- * Get the current value of the exit on shutdown flag.
- *
- * @return The current value of the exit on shutdown flag.
- */
- public boolean getExitOnShutdown()
- {
- if (exitOnShutdown == null)
- {
- String value = props.getProperty(ServerConfig.EXIT_ON_SHUTDOWN, null);
- if (value == null)
- {
- exitOnShutdown = Primitives.valueOf(ServerConfig.DEFAULT_EXIT_ON_SHUTDOWN);
- }
- else
- {
- exitOnShutdown = new Boolean(value);
- }
- }
- return exitOnShutdown.booleanValue();
- }
-
- public void setInstallLifeThread(final boolean flag)
- {
- installLifeThread = Primitives.valueOf(flag);
- }
-
- public boolean isInstallLifeThread()
- {
- if (installLifeThread == null)
- {
- String value = props.getProperty(ServerConfig.INSTALL_LIFE_THREAD, null);
- if (value == null)
- {
- installLifeThread = Primitives.valueOf(ServerConfig.DEFAULT_INSTALL_LIFE_THREAD);
- }
- else
- {
- installLifeThread = new Boolean(value);
- }
- }
- return installLifeThread.booleanValue();
- }
-
- /**
- * Enable or disable blocking when {@link Server#shutdown} is
- * called. If enabled, then shutdown will be called in the current
- * thread. If disabled, then the shutdown hook will be run
- * ansynchronously in a separate thread.
- *
- * @param flag True to enable blocking shutdown.
- */
- public void setBlockingShutdown(final boolean flag)
- {
- blockingShutdown = Primitives.valueOf(flag);
- }
-
- /**
- * Get the current value of the blocking shutdown flag.
- *
- * @return The current value of the blocking shutdown flag.
- */
- public boolean getBlockingShutdown()
- {
- if (blockingShutdown == null)
- {
- String value = props.getProperty(ServerConfig.BLOCKING_SHUTDOWN, null);
- if (value == null)
- {
- blockingShutdown = Primitives.valueOf(ServerConfig.DEFAULT_BLOCKING_SHUTDOWN);
- }
- else
- {
- blockingShutdown = new Boolean(value);
- }
- }
- return blockingShutdown.booleanValue();
- }
-
-
- /**
- * Set the RequireJBossURLStreamHandlerFactory flag. if false,
- * exceptions when setting the URLStreamHandlerFactory will be
- * logged and ignored.
- *
- * @param flag True to enable blocking shutdown.
- */
- public void setRequireJBossURLStreamHandlerFactory(final boolean flag)
- {
- requireJBossURLStreamHandlerFactory = Primitives.valueOf(flag);
- }
-
- /**
- * Get the current value of the requireJBossURLStreamHandlerFactory flag.
- *
- * @return The current value of the requireJBossURLStreamHandlerFactory flag.
- */
- public boolean getRequireJBossURLStreamHandlerFactory()
- {
- if (requireJBossURLStreamHandlerFactory == null)
- {
- String value = props.getProperty(ServerConfig.REQUIRE_JBOSS_URL_STREAM_HANDLER_FACTORY, null);
- if (value == null)
- {
- requireJBossURLStreamHandlerFactory = Primitives.valueOf(ServerConfig.DEFAULT_REQUIRE_JBOSS_URL_STREAM_HANDLER_FACTORY);
- }
- else
- {
- requireJBossURLStreamHandlerFactory = new Boolean(value);
- }
- }
- return requireJBossURLStreamHandlerFactory.booleanValue();
- }
-
- /**
- * Set the filename of the root deployable that will be used to finalize
- * the bootstrap process.
- *
- * @param filename The filename of the root deployable.
- */
- public void setRootDeploymentFilename(final String filename)
- {
- this.rootDeployableFilename = filename;
- }
-
- /**
- * Get the filename of the root deployable that will be used to finalize
- * the bootstrap process.
- *
- * @return The filename of the root deployable.
- */
- public String getRootDeploymentFilename()
- {
- if (rootDeployableFilename == null)
- {
- rootDeployableFilename = props.getProperty(ServerConfig.ROOT_DEPLOYMENT_FILENAME,
- ServerConfig.DEFAULT_ROOT_DEPLOYMENT_FILENAME);
- }
-
- return rootDeployableFilename;
- }
-
- /**
- * Get a URL from configuration.
- */
- private URL getURL(final String name) throws MalformedURLException
- {
- String value = props.getProperty(name, null);
- if (value != null)
- {
- if (!value.endsWith("/")) value += "/";
- return new URL(value);
- }
-
- return null;
- }
-
- /**
- * Get a File from configuration.
- * @return the CanonicalFile form for the given name.
- */
- private File getFile(final String name)
- {
- String value = props.getProperty(name, null);
- if (value != null)
- {
- try
- {
- File f = new File(value);
- return f.getCanonicalFile();
- }
- catch(IOException e)
- {
- return new File(value);
- }
- }
-
- return null;
- }
-
- public String getSpecificationVersion()
- {
- return serverSpecificationVersion;
- }
-}
+/*
+ * 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;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Properties;
+
+import org.jboss.bootstrap.spi.Server;
+import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.util.NestedRuntimeException;
+import org.jboss.util.Null;
+import org.jboss.util.Primitives;
+import org.jboss.util.platform.Java;
+
+/**
+ * A container for the basic configuration elements required to create
+ * a Server instance.
+ *
+ * <p>MalformedURLException are rethrown as NestedRuntimeExceptions, so that
+ * code that needs to access these values does not have to directly
+ * worry about problems with lazy construction of final URL values.
+ *
+ * <p>Most values are determined durring first call to getter. All values
+ * when determined will have equivilent system properties set.
+ *
+ * @author <a href="mailto:jason at planet57.com">Jason Dillon</a>
+ * @author <a href="mailto:dimitris at jboss.org">Dimitris Andreadis</a>
+ * @author Scott.Stark at jboss.org
+ * @version <tt>$Revision: 41281 $</tt>
+ */
+public class BaseServerConfig implements ServerConfig
+{
+ /** The configuration properties to pull data from. */
+ private Properties props;
+
+ private URL bootstrapURL;
+ private File homeDir;
+ private URL homeURL;
+ private URL libraryURL;
+
+ /**
+ * The base URL where patch files will be loaded from. This is
+ * typed as an Object to allow its value to contain Null.VALUE
+ * or a URL. If value is Null.VALUE then we have determined
+ * that there is no user configuration for this value and it will
+ * be passed back as null to the requesting client.
+ */
+ private Object patchURL;
+
+ private String serverSpecificationVersion;
+
+ private String serverName;
+ private File serverBaseDir;
+ private File serverHomeDir;
+ private File serverLogDir;
+ private File serverTempDir;
+ private File serverDataDir;
+ private URL serverBaseURL;
+ private URL serverHomeURL;
+ private URL serverLibraryURL;
+ private URL serverConfigURL;
+ private URL commonBaseURL;
+ private URL commonLibraryURL;
+
+ /** Exit on shutdown flag. */
+ private Boolean exitOnShutdown;
+ private Boolean blockingShutdown;
+ private Boolean requireJBossURLStreamHandlerFactory;
+ private Boolean platformMBeanServer;
+
+ private Boolean installLifeThread;
+
+ private String rootDeployableFilename;
+
+ /**
+ * Construct a new <tt>ServerConfigImpl</tt> instance.
+ *
+ * @param props Configuration properties.
+ *
+ * @throws Exception Missing or invalid configuration.
+ */
+ public BaseServerConfig(final Properties props) throws Exception
+ {
+ this.props = props;
+
+ // Must have HOME_DIR
+ homeDir = getFile(ServerConfig.HOME_DIR);
+ if (homeDir == null)
+ throw new Exception("Missing configuration value for: " + ServerConfig.HOME_DIR);
+ System.setProperty(ServerConfig.HOME_DIR, homeDir.toString());
+ // Setup the SERVER_HOME_DIR system property
+ getServerHomeDir();
+
+ Package thisPackage = getClass().getPackage();
+ serverSpecificationVersion = thisPackage.getSpecificationVersion();
+ }
+
+ /** Breakout the initialization of URLs from the constructor as we need
+ * the ServerConfig.HOME_DIR set for log setup, but we cannot create any
+ * file URLs prior to the
+ *
+ * @throws MalformedURLException for a bad home url
+ */
+ public void initURLs()
+ throws MalformedURLException
+ {
+ // If not set then default to homeDir
+ homeURL = getURL(ServerConfig.HOME_URL);
+ if (homeURL == null)
+ homeURL = homeDir.toURL();
+ System.setProperty(ServerConfig.HOME_URL, homeURL.toString());
+ }
+
+ /////////////////////////////////////////////////////////////////////////
+ // Typed Access //
+ /////////////////////////////////////////////////////////////////////////
+
+ public URL getBootstrapURL()
+ {
+ if (bootstrapURL == null)
+ {
+ try
+ {
+ bootstrapURL = getURL(ServerConfig.BOOTSTRAP_URL);
+ if (bootstrapURL != null)
+ System.setProperty(ServerConfig.BOOTSTRAP_URL, bootstrapURL.toString());
+ }
+ catch (MalformedURLException e)
+ {
+ throw new NestedRuntimeException(e);
+ }
+ }
+
+ return bootstrapURL;
+ }
+
+ public File getHomeDir()
+ {
+ return homeDir;
+ }
+
+ public URL getHomeURL()
+ {
+ return homeURL;
+ }
+
+ public URL getLibraryURL()
+ {
+ if (libraryURL == null)
+ {
+ try
+ {
+ libraryURL = getURL(ServerConfig.LIBRARY_URL);
+ if (libraryURL == null)
+ {
+ libraryURL = new URL(homeURL, ServerConfig.LIBRARY_URL_SUFFIX);
+ }
+ System.setProperty(ServerConfig.LIBRARY_URL, libraryURL.toString());
+ }
+ catch (MalformedURLException e)
+ {
+ throw new NestedRuntimeException(e);
+ }
+ }
+ return libraryURL;
+ }
+
+ public URL getPatchURL()
+ {
+ if (patchURL == null)
+ {
+ try
+ {
+ patchURL = getURL(ServerConfig.PATCH_URL);
+ if (patchURL == null)
+ {
+ patchURL = Null.VALUE;
+ }
+ else
+ {
+ System.setProperty(ServerConfig.PATCH_URL, patchURL.toString());
+ }
+ }
+ catch (MalformedURLException e)
+ {
+ throw new NestedRuntimeException(e);
+ }
+ }
+
+ if (patchURL == Null.VALUE)
+ return null;
+
+ return (URL) patchURL;
+ }
+
+ public String getServerName()
+ {
+ if (serverName == null)
+ {
+ serverName = props.getProperty(ServerConfig.SERVER_NAME, ServerConfig.DEFAULT_SERVER_NAME);
+ System.setProperty(ServerConfig.SERVER_NAME, serverName);
+ }
+ return serverName;
+ }
+
+ public File getServerBaseDir()
+ {
+ if (serverBaseDir == null)
+ {
+ serverBaseDir = getFile(ServerConfig.SERVER_BASE_DIR);
+ if (serverBaseDir == null)
+ {
+ serverBaseDir = new File(homeDir, ServerConfig.SERVER_BASE_DIR_SUFFIX);
+ System.setProperty(ServerConfig.SERVER_BASE_DIR, serverBaseDir.toString());
+ }
+ }
+ return serverBaseDir;
+ }
+
+ public File getServerHomeDir()
+ {
+ if (serverHomeDir == null)
+ {
+ serverHomeDir = getFile(ServerConfig.SERVER_HOME_DIR);
+ if (serverHomeDir == null)
+ {
+ serverHomeDir = new File(getServerBaseDir(), getServerName());
+ System.setProperty(ServerConfig.SERVER_HOME_DIR, serverHomeDir.toString());
+ }
+ }
+ return serverHomeDir;
+ }
+
+ /**
+ * Get the directory where temporary files will be stored. The associated
+ * ServerConfig.SERVER_LOG_DIR system property needs to be set before
+ * the logging framework is used.
+ *
+ * @see ServerConfig#SERVER_LOG_DIR
+ * @return the writable temp directory
+ */
+ public File getServerLogDir()
+ {
+ if (serverLogDir == null)
+ {
+ serverLogDir = getFile(ServerConfig.SERVER_LOG_DIR);
+ if (serverLogDir == null)
+ {
+ serverLogDir = new File(getServerHomeDir(), ServerConfig.SERVER_LOG_DIR_SUFFIX);
+ System.setProperty(ServerConfig.SERVER_LOG_DIR, serverLogDir.toString());
+ }
+ }
+ return serverLogDir;
+ }
+
+ /**
+ * Get the directory where temporary files will be stored.
+ *
+ * @return the writable temp directory
+ */
+ public File getServerTempDir()
+ {
+ if (serverTempDir == null)
+ {
+ serverTempDir = getFile(ServerConfig.SERVER_TEMP_DIR);
+ if (serverTempDir == null)
+ {
+ serverTempDir = new File(getServerHomeDir(), ServerConfig.SERVER_TEMP_DIR_SUFFIX);
+ System.setProperty(ServerConfig.SERVER_TEMP_DIR, serverTempDir.toString());
+ }
+ }
+ return serverTempDir;
+ }
+
+ /**
+ * Get the directory where local data will be stored.
+ *
+ * @return the data directory
+ */
+ public File getServerDataDir()
+ {
+ if (serverDataDir == null)
+ {
+ serverDataDir = getFile(ServerConfig.SERVER_DATA_DIR);
+ if (serverDataDir == null)
+ {
+ serverDataDir = new File(getServerHomeDir(), ServerConfig.SERVER_DATA_DIR_SUFFIX);
+ System.setProperty(ServerConfig.SERVER_DATA_DIR, serverDataDir.toString());
+ }
+ }
+ return serverDataDir;
+ }
+
+ /**
+ * Get the native dir for unpacking
+ *
+ * @return the directory
+ */
+ public File getServerNativeDir()
+ {
+ String fileName = System.getProperty(NATIVE_DIR_PROPERTY);
+ if (fileName != null)
+ return new File(fileName);
+ return new File(getServerTempDir(), "native");
+ }
+
+ /**
+ * Get the temporary deployment dir for unpacking
+ *
+ * @return the directory
+ */
+ public File getServerTempDeployDir()
+ {
+ return new File(getServerTempDir(), "deploy");
+ }
+
+ public URL getServerBaseURL()
+ {
+ if (serverBaseURL == null)
+ {
+ try
+ {
+ serverBaseURL = getURL(ServerConfig.SERVER_BASE_URL);
+ if (serverBaseURL == null)
+ {
+ serverBaseURL = new URL(homeURL, ServerConfig.SERVER_BASE_URL_SUFFIX);
+ }
+ System.setProperty(ServerConfig.SERVER_BASE_URL, serverBaseURL.toString());
+ }
+ catch (MalformedURLException e)
+ {
+ throw new NestedRuntimeException(e);
+ }
+ }
+ return serverBaseURL;
+ }
+
+ public URL getServerHomeURL()
+ {
+ if (serverHomeURL == null)
+ {
+ try
+ {
+ serverHomeURL = getURL(ServerConfig.SERVER_HOME_URL);
+ if (serverHomeURL == null)
+ {
+ serverHomeURL = new URL(getServerBaseURL(), getServerName() + "/");
+ }
+ System.setProperty(ServerConfig.SERVER_HOME_URL, serverHomeURL.toString());
+ }
+ catch (MalformedURLException e)
+ {
+ throw new NestedRuntimeException(e);
+ }
+ }
+ return serverHomeURL;
+ }
+
+ public URL getServerLibraryURL()
+ {
+ if (serverLibraryURL == null)
+ {
+ try
+ {
+ serverLibraryURL = getURL(ServerConfig.SERVER_LIBRARY_URL);
+ if (serverLibraryURL == null)
+ {
+ serverLibraryURL = new URL(getServerHomeURL(), ServerConfig.LIBRARY_URL_SUFFIX);
+ }
+ System.setProperty(ServerConfig.SERVER_LIBRARY_URL, serverLibraryURL.toString());
+ }
+ catch (MalformedURLException e)
+ {
+ throw new NestedRuntimeException(e);
+ }
+ }
+ return serverLibraryURL;
+ }
+
+ public URL getCommonBaseURL()
+ {
+ if (commonBaseURL == null)
+ {
+ try
+ {
+ commonBaseURL = getURL(ServerConfig.COMMON_BASE_URL);
+ if (commonBaseURL == null)
+ {
+ commonBaseURL = new URL(getHomeURL(), ServerConfig.COMMON_BASE_URL_SUFFIX);
+ }
+ System.setProperty(ServerConfig.COMMON_BASE_URL, commonBaseURL.toString());
+ }
+ catch (MalformedURLException e)
+ {
+ throw new NestedRuntimeException(e);
+ }
+ }
+ return commonBaseURL;
+ }
+
+ public URL getCommonLibraryURL()
+ {
+ if (commonLibraryURL == null)
+ {
+ try
+ {
+ commonLibraryURL = getURL(ServerConfig.COMMON_LIBRARY_URL);
+ if (commonLibraryURL == null)
+ {
+ commonLibraryURL = new URL(getCommonBaseURL(), ServerConfig.LIBRARY_URL_SUFFIX);
+ }
+ System.setProperty(ServerConfig.COMMON_LIBRARY_URL, commonLibraryURL.toString());
+ }
+ catch (MalformedURLException e)
+ {
+ throw new NestedRuntimeException(e);
+ }
+ }
+ return commonLibraryURL;
+ }
+
+ public URL getServerConfigURL()
+ {
+ if (serverConfigURL == null)
+ {
+ try
+ {
+ serverConfigURL = getURL(ServerConfig.SERVER_CONFIG_URL);
+ if (serverConfigURL == null)
+ {
+ serverConfigURL = new URL(getServerHomeURL(), ServerConfig.SERVER_CONFIG_URL_SUFFIX);
+ }
+ System.setProperty(ServerConfig.SERVER_CONFIG_URL, serverConfigURL.toString());
+ }
+ catch (MalformedURLException e)
+ {
+ throw new NestedRuntimeException(e);
+ }
+ }
+ return serverConfigURL;
+ }
+
+ /**
+ * Get the current value of the flag that indicates if we are
+ * using the platform MBeanServer as the main jboss server.
+ * Both the {@link ServerConfig#PLATFORM_MBEANSERVER}
+ * property must be set, and the jvm must be jdk1.5+
+ *
+ * @return true if jboss runs on the jvm platfrom MBeanServer
+ */
+ public boolean getPlatformMBeanServer()
+ {
+ if (platformMBeanServer == null)
+ {
+ if (Java.isCompatible(Java.VERSION_1_5))
+ {
+ // get whatever the user has specified or the default
+ String value = props.getProperty(ServerConfig.PLATFORM_MBEANSERVER,
+ (new Boolean(ServerConfig.DEFAULT_PLATFORM_MBEANSERVER)).toString());
+
+ // treat empty string as true
+ value = "".equals(value) ? "true" : value;
+
+ // true or false
+ platformMBeanServer = new Boolean(value);
+ }
+ else
+ {
+ // negative :)
+ platformMBeanServer = Boolean.FALSE;
+ }
+ }
+ return platformMBeanServer.booleanValue();
+ }
+
+ /**
+ * Enable or disable exiting the JVM when {@link Server#shutdown()} is called.
+ * If enabled, then shutdown calls {@link Server#exit()}. If disabled, then
+ * only the shutdown hook will be run.
+ *
+ * @param flag True to enable calling exit on shutdown.
+ */
+ public void setExitOnShutdown(final boolean flag)
+ {
+ exitOnShutdown = Primitives.valueOf(flag);
+ }
+
+ /**
+ * Get the current value of the exit on shutdown flag.
+ *
+ * @return The current value of the exit on shutdown flag.
+ */
+ public boolean getExitOnShutdown()
+ {
+ if (exitOnShutdown == null)
+ {
+ String value = props.getProperty(ServerConfig.EXIT_ON_SHUTDOWN, null);
+ if (value == null)
+ {
+ exitOnShutdown = Primitives.valueOf(ServerConfig.DEFAULT_EXIT_ON_SHUTDOWN);
+ }
+ else
+ {
+ exitOnShutdown = new Boolean(value);
+ }
+ }
+ return exitOnShutdown.booleanValue();
+ }
+
+ public void setInstallLifeThread(final boolean flag)
+ {
+ installLifeThread = Primitives.valueOf(flag);
+ }
+
+ public boolean isInstallLifeThread()
+ {
+ if (installLifeThread == null)
+ {
+ String value = props.getProperty(ServerConfig.INSTALL_LIFE_THREAD, null);
+ if (value == null)
+ {
+ installLifeThread = Primitives.valueOf(ServerConfig.DEFAULT_INSTALL_LIFE_THREAD);
+ }
+ else
+ {
+ installLifeThread = new Boolean(value);
+ }
+ }
+ return installLifeThread.booleanValue();
+ }
+
+ /**
+ * Enable or disable blocking when {@link Server#shutdown} is
+ * called. If enabled, then shutdown will be called in the current
+ * thread. If disabled, then the shutdown hook will be run
+ * ansynchronously in a separate thread.
+ *
+ * @param flag True to enable blocking shutdown.
+ */
+ public void setBlockingShutdown(final boolean flag)
+ {
+ blockingShutdown = Primitives.valueOf(flag);
+ }
+
+ /**
+ * Get the current value of the blocking shutdown flag.
+ *
+ * @return The current value of the blocking shutdown flag.
+ */
+ public boolean getBlockingShutdown()
+ {
+ if (blockingShutdown == null)
+ {
+ String value = props.getProperty(ServerConfig.BLOCKING_SHUTDOWN, null);
+ if (value == null)
+ {
+ blockingShutdown = Primitives.valueOf(ServerConfig.DEFAULT_BLOCKING_SHUTDOWN);
+ }
+ else
+ {
+ blockingShutdown = new Boolean(value);
+ }
+ }
+ return blockingShutdown.booleanValue();
+ }
+
+
+ /**
+ * Set the RequireJBossURLStreamHandlerFactory flag. if false,
+ * exceptions when setting the URLStreamHandlerFactory will be
+ * logged and ignored.
+ *
+ * @param flag True to enable blocking shutdown.
+ */
+ public void setRequireJBossURLStreamHandlerFactory(final boolean flag)
+ {
+ requireJBossURLStreamHandlerFactory = Primitives.valueOf(flag);
+ }
+
+ /**
+ * Get the current value of the requireJBossURLStreamHandlerFactory flag.
+ *
+ * @return The current value of the requireJBossURLStreamHandlerFactory flag.
+ */
+ public boolean getRequireJBossURLStreamHandlerFactory()
+ {
+ if (requireJBossURLStreamHandlerFactory == null)
+ {
+ String value = props.getProperty(ServerConfig.REQUIRE_JBOSS_URL_STREAM_HANDLER_FACTORY, null);
+ if (value == null)
+ {
+ requireJBossURLStreamHandlerFactory = Primitives.valueOf(ServerConfig.DEFAULT_REQUIRE_JBOSS_URL_STREAM_HANDLER_FACTORY);
+ }
+ else
+ {
+ requireJBossURLStreamHandlerFactory = new Boolean(value);
+ }
+ }
+ return requireJBossURLStreamHandlerFactory.booleanValue();
+ }
+
+ /**
+ * Set the filename of the root deployable that will be used to finalize
+ * the bootstrap process.
+ *
+ * @param filename The filename of the root deployable.
+ */
+ public void setRootDeploymentFilename(final String filename)
+ {
+ this.rootDeployableFilename = filename;
+ }
+
+ /**
+ * Get the filename of the root deployable that will be used to finalize
+ * the bootstrap process.
+ *
+ * @return The filename of the root deployable.
+ */
+ public String getRootDeploymentFilename()
+ {
+ if (rootDeployableFilename == null)
+ {
+ rootDeployableFilename = props.getProperty(ServerConfig.ROOT_DEPLOYMENT_FILENAME,
+ ServerConfig.DEFAULT_ROOT_DEPLOYMENT_FILENAME);
+ }
+
+ return rootDeployableFilename;
+ }
+
+ /**
+ * Get a URL from configuration.
+ */
+ private URL getURL(final String name) throws MalformedURLException
+ {
+ String value = props.getProperty(name, null);
+ if (value != null)
+ {
+ if (!value.endsWith("/")) value += "/";
+ return new URL(value);
+ }
+
+ return null;
+ }
+
+ /**
+ * Get a File from configuration.
+ * @return the CanonicalFile form for the given name.
+ */
+ private File getFile(final String name)
+ {
+ String value = props.getProperty(name, null);
+ if (value != null)
+ {
+ try
+ {
+ File f = new File(value);
+ return f.getCanonicalFile();
+ }
+ catch(IOException e)
+ {
+ return new File(value);
+ }
+ }
+
+ return null;
+ }
+
+ public String getSpecificationVersion()
+ {
+ return serverSpecificationVersion;
+ }
+}
Modified: projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/BootstrapMetaData.java
===================================================================
--- projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/BootstrapMetaData.java 2008-11-17 23:55:56 UTC (rev 81186)
+++ projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/BootstrapMetaData.java 2008-11-17 23:56:22 UTC (rev 81187)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2007, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt 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.
-*/
+ * 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;
import java.io.Serializable;
Modified: projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/SecurityActions.java
===================================================================
--- projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/SecurityActions.java 2008-11-17 23:55:56 UTC (rev 81186)
+++ projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/SecurityActions.java 2008-11-17 23:56:22 UTC (rev 81187)
@@ -1,8 +1,8 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
+ * 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
Modified: projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/microcontainer/ServerImpl.java
===================================================================
--- projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/microcontainer/ServerImpl.java 2008-11-17 23:55:56 UTC (rev 81186)
+++ projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/microcontainer/ServerImpl.java 2008-11-17 23:56:22 UTC (rev 81187)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt 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.
-*/
+ * 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.microcontainer;
import java.net.URL;
Modified: projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/spi/Bootstrap.java
===================================================================
--- projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/spi/Bootstrap.java 2008-11-17 23:55:56 UTC (rev 81186)
+++ projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/spi/Bootstrap.java 2008-11-17 23:56:22 UTC (rev 81187)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt 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.
-*/
+ * 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;
Modified: projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/spi/Server.java
===================================================================
--- projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/spi/Server.java 2008-11-17 23:55:56 UTC (rev 81186)
+++ projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/spi/Server.java 2008-11-17 23:56:22 UTC (rev 81187)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt 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.
-*/
+ * 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;
import java.util.Date;
Modified: projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/spi/ServerConfig.java
===================================================================
--- projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/spi/ServerConfig.java 2008-11-17 23:55:56 UTC (rev 81186)
+++ projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/spi/ServerConfig.java 2008-11-17 23:56:22 UTC (rev 81187)
@@ -1,8 +1,8 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
+ * 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
@@ -216,15 +216,24 @@
/**
* Constant that holds the name of the environment property
- * for specifying a library directory shared by the various
- * server configurations.
+ * for specifying the base URL for files and directories
+ * common to different server configurations
*
- * <p>Defaults to <tt><em>SERVER_BASE_URL</em>/lib/</tt>.
+ * <p>Defaults to <tt><em>HOME_URL</em>/common/</tt>
*/
- String SHARED_LIBRARY_URL = "jboss.shared.lib.url";
+ String COMMON_BASE_URL = "jboss.common.base.url";
/**
* Constant that holds the name of the environment property
+ * for specifying a library directory URL that points to libraries
+ * shared by the various server configurations.
+ *
+ * <p>Defaults to <tt><em>COMMON_BASE_URL</em>/lib/</tt>
+ */
+ String COMMON_LIBRARY_URL = "jboss.common.lib.url";
+
+ /**
+ * Constant that holds the name of the environment property
* for specifying the bind address for all jboss services
*
*/
@@ -279,12 +288,17 @@
/////////////////////////////////////////////////////////////////////////
/**
- * The suffix used when generating the default value for {@link #LIBRARY_URL}
- * and {@link #SERVER_LIBRARY_URL}.
+ * The suffix used when generating the default value for {@link #LIBRARY_URL},
+ * {@link #COMMON_LIBRARY_URL} and {@link #SERVER_LIBRARY_URL}.
*/
String LIBRARY_URL_SUFFIX = "lib/";
/**
+ * The suffix used when generating the default value for {@link #COMMON_BASE_URL}
+ */
+ String COMMON_BASE_URL_SUFFIX = "common/";
+
+ /**
* The suffix used when generating the default value for {@link #SERVER_CONFIG_URL}.
*/
String SERVER_CONFIG_URL_SUFFIX = "conf/";
@@ -451,13 +465,20 @@
URL getServerConfigURL();
/**
- * Get the shared library URL.
+ * Get the common base URL.
*
- * @return Shared library URL.
+ * @return Common base URL.
*/
- URL getSharedLibraryURL();
+ URL getCommonBaseURL();
/**
+ * Get the common library URL.
+ *
+ * @return Common library URL.
+ */
+ URL getCommonLibraryURL();
+
+ /**
* Get the current value of the flag that indicates if we are
* using the platform MBeanServer as the main jboss server.
* Both the {@link ServerConfig#PLATFORM_MBEANSERVER}
Modified: projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/spi/util/ServerConfigUtil.java
===================================================================
--- projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/spi/util/ServerConfigUtil.java 2008-11-17 23:55:56 UTC (rev 81186)
+++ projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/spi/util/ServerConfigUtil.java 2008-11-17 23:56:22 UTC (rev 81187)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt 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.
-*/
+ * 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.util;
import java.net.InetAddress;
Modified: projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/xml/BootstrapParser.java
===================================================================
--- projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/xml/BootstrapParser.java 2008-11-17 23:55:56 UTC (rev 81186)
+++ projects/bootstrap/trunk/src/main/java/org/jboss/bootstrap/xml/BootstrapParser.java 2008-11-17 23:56:22 UTC (rev 81187)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt 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.
-*/
+ * 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.xml;
import java.net.URL;
More information about the jboss-cvs-commits
mailing list