[Jboss-cvs] JBossAS SVN: r55040 - trunk/system/src/main/org/jboss/system/server/profileservice
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Aug 2 14:46:12 EDT 2006
Author: scott.stark at jboss.org
Date: 2006-08-02 14:46:11 -0400 (Wed, 02 Aug 2006)
New Revision: 55040
Modified:
trunk/system/src/main/org/jboss/system/server/profileservice/ServerImpl.java
Log:
Set the ProfileServiceBootstrap deployerBeansPrefix to the jboss.server.deployerBeansPrefix property if it exists, or set the bootstrapURL to the ServerConfig.getServerConfigURL() + ProfileServiceBootstrap.DEPLOYERS_XML_NAME);
Modified: trunk/system/src/main/org/jboss/system/server/profileservice/ServerImpl.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/ServerImpl.java 2006-08-02 18:43:17 UTC (rev 55039)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/ServerImpl.java 2006-08-02 18:46:11 UTC (rev 55040)
@@ -62,6 +62,8 @@
/** The kernel bootstrap */
private ProfileServiceBootstrap bootstrap;
+ /** A resource prefix */
+ private String deployerBeansPrefix;
/** The basic configuration for the server. */
private ServerConfigImpl config;
@@ -88,12 +90,13 @@
/**
* Initialize the Server instance.
*
- * @param props The configuration properties for the server.
+ * @param props - The configuration properties for the server.
*
* @throws IllegalStateException Already initialized.
* @throws Exception Failed to initialize.
*/
- public void init(final Properties props) throws IllegalStateException, Exception
+ public void init(final Properties props)
+ throws IllegalStateException, Exception
{
if (props == null)
throw new IllegalArgumentException("props is null");
@@ -122,6 +125,7 @@
{
// Create a new config object from the give properties
this.config = new ServerConfigImpl(props);
+ this.deployerBeansPrefix = props.getProperty("jboss.server.deployerBeansPrefix");
// Set the VM temp directory to the server tmp dir
boolean overrideTmpDir = Boolean.getBoolean("jboss.server.temp.dir.overrideJavaTmpDir");
@@ -131,8 +135,8 @@
System.setProperty("java.io.tmpdir", serverTmpDir.getCanonicalPath());
}
- // masqurade as Server.class (cause Impl is not really important)
- log = Logger.getLogger(Server.class);
+ // Initialize out log
+ log = Logger.getLogger(getClass());
// Setup URL handlers - do this before initializing the ServerConfig
initURLHandlers();
@@ -223,7 +227,6 @@
//we'll fail if we ever try to do this again
log.warn("Caught Throwable Error, this probably means " +
"we've already set the URLStreamHAndlerFactory before");
- //Sys.out because we don't have logging yet
}
// Include the default JBoss protocol handler package
@@ -319,10 +322,22 @@
// remeber when we we started
startDate = new Date();
- log.info("Starting MicroContainer");
bootstrap = new ProfileServiceBootstrap(config.getServerName());
+ if( deployerBeansPrefix != null )
+ {
+ bootstrap.setDeployerBeansPrefix(deployerBeansPrefix);
+ log.info("Starting MicroContainer, deployerBeansPrefix="+deployerBeansPrefix);
+ }
+ else
+ {
+ URL configURL = config.getServerConfigURL();
+ URL bootstrapURL = new URL(configURL, ProfileServiceBootstrap.DEPLOYERS_XML_NAME);
+ log.info("Starting MicroContainer, bootstrapURL="+bootstrapURL);
+ bootstrap.setBootstrapURL(bootstrapURL);
+ }
+
bootstrap.run();
-
+
// Install the shutdown hook
shutdownHook = new ShutdownHook(bootstrap);
shutdownHook.setDaemon(true);
More information about the jboss-cvs-commits
mailing list