[jboss-cvs] system2/src/main/org/jboss/system/server/profileservice ...
Scott Stark
scott.stark at jboss.com
Fri Jul 14 12:42:47 EDT 2006
User: starksm
Date: 06/07/14 12:42:47
Modified: src/main/org/jboss/system/server/profileservice
ProfileServiceBootstrap.java
Log:
Update the bootstrap to lookup {profileName}/deployer-beans.xml rather than just deployer-beans.xml so the bootstrap is a function of the profile.
Revision Changes Path
1.3 +13 -6 system2/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ProfileServiceBootstrap.java
===================================================================
RCS file: /cvsroot/jboss/system2/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- ProfileServiceBootstrap.java 9 Jul 2006 23:48:22 -0000 1.2
+++ ProfileServiceBootstrap.java 14 Jul 2006 16:42:47 -0000 1.3
@@ -36,8 +36,8 @@
/**
* An extension of the kernel basic bootstrap that boots the mc from
- * deployer-beans.xml descriptors using the BasicXMLDeployer, and loads
- * additional deployments using the ProfileService.
+ * {profileName}/deployer-beans.xml descriptors using the BasicXMLDeployer, and
+ * loads additional deployments using the ProfileService.
*
* @author Scott.Stark at jboss.org
* @version $Revision$
@@ -45,7 +45,7 @@
public class ProfileServiceBootstrap extends BasicBootstrap
{
private static String DEPLOYERS_XML_NAME = "deployer-beans.xml";
- /** */
+ /** The name of the profile that is being booted */
protected String profileName;
/** The kernel deployer used to load the server deployers */
protected BasicXMLDeployer kernelDeployer;
@@ -101,13 +101,18 @@
kernelDeployer = new BasicXMLDeployer(getKernel());
ClassLoader cl = Thread.currentThread().getContextClassLoader();
- Enumeration<URL> descriptors = cl.getResources(DEPLOYERS_XML_NAME);
+ String bootstrapResName = profileName + "/" + DEPLOYERS_XML_NAME;
+ log.debug("Scanning for bootstrap resources: "+bootstrapResName);
+ Enumeration<URL> descriptors = cl.getResources(bootstrapResName);
while( descriptors.hasMoreElements() )
{
URL url = descriptors.nextElement();
deploy(url);
}
- descriptors = cl.getResources("META-INF/" + DEPLOYERS_XML_NAME);
+
+ String metaInfBootstrapResName = "META-INF/" + bootstrapResName;
+ log.debug("Scanning for bootstrap resources: "+metaInfBootstrapResName);
+ descriptors = cl.getResources(metaInfBootstrapResName);
while( descriptors.hasMoreElements() )
{
URL url = descriptors.nextElement();
@@ -164,6 +169,7 @@
*/
protected void deploy(URL url) throws Throwable
{
+ log.debug("Deploying bootstrap config: "+url);
kernelDeployer.deploy(url);
}
@@ -176,6 +182,7 @@
{
try
{
+ log.debug("Undeploying bootstrap config: "+url);
kernelDeployer.undeploy(url);
}
catch (Throwable t)
More information about the jboss-cvs-commits
mailing list