Hmm, changes I made to the ProfileServiceBootstrap are in changing the type of server
used...what do you mean by "relies on the context injection of Bootstrap
implementations"?
Index:
/home/alrubinger/business/jboss/wc/jbossas/branches/Branch_5_x_BootstrapLegacyRemoval/system/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java
| ===================================================================
| ---
/home/alrubinger/business/jboss/wc/jbossas/branches/Branch_5_x_BootstrapLegacyRemoval/system/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java (.../home/alrubinger/business/jboss/wc/jbossas/branches/Branch_5_x_BootstrapLegacyRemoval/system/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java) (working
copy)
| +++
/home/alrubinger/business/jboss/wc/jbossas/branches/Branch_5_x_BootstrapLegacyRemoval/system/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java (.../https://svn.jboss.org/repos/jbossas/branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java) (revision
89258)
| @@ -25,6 +25,7 @@
| import java.lang.annotation.Annotation;
| import java.util.ArrayList;
| import java.util.Collection;
| +import java.util.Collections;
| import java.util.HashMap;
| import java.util.HashSet;
| import java.util.Iterator;
| @@ -35,12 +36,11 @@
|
| import org.jboss.beans.info.spi.BeanInfo;
| import org.jboss.beans.metadata.spi.BeanMetaData;
| -import org.jboss.bootstrap.spi.as.JBossASBootstrap;
| -import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
| -import org.jboss.bootstrap.spi.as.server.JBossASServer;
| -import org.jboss.bootstrap.spi.mc.config.MCServerConfig;
| -import org.jboss.bootstrap.spi.mc.server.MCServer;
| -import org.jboss.bootstrap.spi.server.Server;
| +import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
| +import org.jboss.bootstrap.spi.Bootstrap;
| +import org.jboss.bootstrap.spi.Server;
| +import org.jboss.bootstrap.spi.ServerConfig;
| +import org.jboss.bootstrap.spi.microcontainer.MCServer;
| import org.jboss.dependency.spi.ControllerContext;
| import org.jboss.dependency.spi.ControllerState;
| import org.jboss.deployers.client.spi.IncompleteDeploymentException;
| @@ -67,6 +67,7 @@
| import org.jboss.managed.api.ManagedProperty;
| import org.jboss.managed.api.MutableManagedObject;
| import org.jboss.managed.api.annotation.ManagementComponent;
| +import org.jboss.managed.api.annotation.ManagementConstants;
| import org.jboss.managed.api.annotation.ManagementObject;
| import org.jboss.managed.api.annotation.ViewUse;
| import org.jboss.managed.api.factory.ManagedObjectFactory;
| @@ -75,12 +76,16 @@
| import org.jboss.managed.plugins.ManagedObjectImpl;
| import org.jboss.managed.plugins.ManagedOperationImpl;
| import org.jboss.managed.plugins.ManagedPropertyImpl;
| +import org.jboss.managed.plugins.factory.AbstractManagedObjectFactory;
| import org.jboss.metatype.api.types.ArrayMetaType;
| +import org.jboss.metatype.api.types.CollectionMetaType;
| import org.jboss.metatype.api.types.MetaType;
| import org.jboss.metatype.api.types.SimpleMetaType;
| import org.jboss.metatype.api.values.ArrayValueSupport;
| +import org.jboss.metatype.api.values.CollectionValueSupport;
| import org.jboss.metatype.api.values.EnumValue;
| import org.jboss.metatype.api.values.EnumValueSupport;
| +import org.jboss.metatype.api.values.GenericValue;
| import org.jboss.profileservice.spi.MutableProfile;
| import org.jboss.profileservice.spi.NoSuchProfileException;
| import org.jboss.profileservice.spi.Profile;
| @@ -98,7 +103,7 @@
| * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
| * @version $Revision$
| */
| -public class ProfileServiceBootstrap implements JBossASBootstrap,
KernelRegistryPlugin
| +public class ProfileServiceBootstrap implements Bootstrap, KernelRegistryPlugin
| {
| /** The log */
| private static final Logger log =
Logger.getLogger(ProfileServiceBootstrap.class);
| @@ -226,7 +231,7 @@
| /**
| *
| */
| - public void start(JBossASServer server)
| + public void start(Server server)
| throws Exception
| {
| shutdown.set(false);
| @@ -246,7 +251,7 @@
|
| // Load the profiles
| if(this.profileKey == null)
| - this.profileKey = new
ProfileKey(server.getConfiguration().getServerName());
| + this.profileKey = new ProfileKey(server.getConfig().getServerName());
|
| Map<String, Object> metaData = server.getMetaData();
| ProfileMetaData pmd = (ProfileMetaData)
metaData.get(ProfileMetaData.class.getName());
| @@ -293,14 +298,14 @@
| }
| }
|
| - public void prepareShutdown(JBossASServer server)
| + public void prepareShutdown(Server server)
| {
| shutdown.set(true);
| if (mainDeployer != null)
| mainDeployer.prepareShutdown();
| }
|
| - public void shutdown(JBossASServer server)
| + public void shutdown(Server server)
| {
| // Disable hotdeployment scanning
| for(ProfileKey key : profileService.getActiveProfileKeys())
| @@ -557,7 +562,7 @@
| }
| // ServerConfig
| type = new ComponentType("MCBean", "ServerConfig");
| - MCServerConfig config = mcserver.getConfiguration();
| + ServerConfig config = mcserver.getConfig();
| ManagedObject mo = mof.initManagedObject(config, null);
| ManagedComponentImpl configComp = new ManagedComponentImpl(type,
firstDeployment, mo);
| firstDeployment.addComponent("ServerConfig", configComp);
S,
ALR
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232570#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...