[jboss-cvs] JBossAS SVN: r82089 - in trunk: system/src/main/org/jboss/system/server/profileservice and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sat Dec 6 11:47:04 EST 2008
Author: alesj
Date: 2008-12-06 11:47:04 -0500 (Sat, 06 Dec 2008)
New Revision: 82089
Modified:
trunk/bootstrap/src/main/org/jboss/bootstrap/microcontainer/ServerImpl.java
trunk/system/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java
Log:
Simplify BMD usage.
Modified: trunk/bootstrap/src/main/org/jboss/bootstrap/microcontainer/ServerImpl.java
===================================================================
--- trunk/bootstrap/src/main/org/jboss/bootstrap/microcontainer/ServerImpl.java 2008-12-06 08:31:57 UTC (rev 82088)
+++ trunk/bootstrap/src/main/org/jboss/bootstrap/microcontainer/ServerImpl.java 2008-12-06 16:47:04 UTC (rev 82089)
@@ -22,21 +22,16 @@
package org.jboss.bootstrap.microcontainer;
import java.net.URL;
-import java.util.Collections;
import java.util.List;
import java.util.Map;
-import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
-import org.jboss.beans.metadata.plugins.InstallCallbackMetaData;
-import org.jboss.beans.metadata.plugins.UninstallCallbackMetaData;
-import org.jboss.beans.metadata.spi.CallbackMetaData;
+import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
import org.jboss.bootstrap.AbstractServerImpl;
import org.jboss.bootstrap.BootstrapMetaData;
import org.jboss.bootstrap.spi.microcontainer.MCServer;
import org.jboss.bootstrap.xml.BootstrapParser;
import org.jboss.kernel.Kernel;
import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap;
-// TODO: JBMICROCONT-383 import org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer;
import org.jboss.kernel.plugins.event.AbstractEvent;
import org.jboss.kernel.spi.dependency.KernelController;
import org.jboss.kernel.spi.deployment.KernelDeployment;
@@ -52,6 +47,7 @@
* ServerImpl.
*
* @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
* @version $Revision: 1.1 $
*/
@ManagementObject(
@@ -109,14 +105,10 @@
// Register the server implementation
KernelController controller = kernel.getController();
- AbstractBeanMetaData metaData = new AbstractBeanMetaData("JBossServer", getClass().getName());
- InstallCallbackMetaData install = new InstallCallbackMetaData();
- install.setMethodName("addBootstrap");
- metaData.setInstallCallbacks(Collections.singletonList((CallbackMetaData) install));
- UninstallCallbackMetaData uninstall = new UninstallCallbackMetaData();
- uninstall.setMethodName("removeBootstrap");
- metaData.setUninstallCallbacks(Collections.singletonList((CallbackMetaData) uninstall));
- controller.install(metaData, this);
+ BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder("JBossServer", getClass().getName());
+ builder.addMethodInstallCallback("addBootstrap");
+ builder.addMethodUninstallCallback("removeBootstrap");
+ controller.install(builder.getBeanMetaData(), this);
// Determine the url for the bootstrap
URL configURL = getConfig().getServerConfigURL();
Modified: trunk/system/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java 2008-12-06 08:31:57 UTC (rev 82088)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java 2008-12-06 16:47:04 UTC (rev 82089)
@@ -45,6 +45,7 @@
import org.jboss.deployers.spi.management.KnownComponentTypes;
import org.jboss.deployers.structure.spi.DeploymentContext;
import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.deployers.structure.spi.main.MainDeployerStructure;
import org.jboss.deployers.vfs.deployer.kernel.KernelDeploymentDeployer.KernelDeploymentVisitor;
import org.jboss.deployers.vfs.spi.client.VFSDeployment;
import org.jboss.kernel.Kernel;
@@ -52,12 +53,11 @@
import org.jboss.kernel.spi.deployment.KernelDeployment;
import org.jboss.logging.Logger;
import org.jboss.managed.api.ComponentType;
-import org.jboss.managed.api.Fields;
import org.jboss.managed.api.ManagedDeployment;
+import org.jboss.managed.api.ManagedDeployment.DeploymentPhase;
import org.jboss.managed.api.ManagedObject;
import org.jboss.managed.api.ManagedProperty;
import org.jboss.managed.api.MutableManagedObject;
-import org.jboss.managed.api.ManagedDeployment.DeploymentPhase;
import org.jboss.managed.api.annotation.ManagementComponent;
import org.jboss.managed.api.annotation.ViewUse;
import org.jboss.managed.api.factory.ManagedObjectFactory;
@@ -277,7 +277,7 @@
Thread thread = Thread.currentThread();
ClassLoader old = thread.getContextClassLoader();
// FIXME remove this hack
- MainDeployerImpl hack = (MainDeployerImpl) deployer;
+ MainDeployerStructure hack = (MainDeployerStructure) deployer;
ClassLoader cl = null;
if (first != null)
{
More information about the jboss-cvs-commits
mailing list