[jboss-cvs] JBossAS SVN: r99286 - in projects/profileservice/trunk: core/src/main/java/org/jboss/profileservice/deployers and 9 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Jan 12 10:24:51 EST 2010


Author: emuckenhuber
Date: 2010-01-12 10:24:50 -0500 (Tue, 12 Jan 2010)
New Revision: 99286

Added:
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/deployers/MainDeployerPlugin.java
   projects/profileservice/trunk/core/src/test/resources/system/static/bootstrap/deployers.xml
Modified:
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/dependency/ProfileDeployAction.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/dependency/ProfileServiceController.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/bootstrap/BootstrapDeployerPlugin.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/plugin/ClassPathAdapterProfile.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/repository/virtual/AbstractVirtualDeploymentRepository.java
   projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/repository/virtual/VirtualDeploymentProfile.java
   projects/profileservice/trunk/core/src/test/java/org/jboss/test/profileservice/test/BasicProfileServiceUnitTestCase.java
   projects/profileservice/trunk/core/src/test/java/org/jboss/test/profileservice/virtual/support/TestVirtualDeploymentRepository.java
   projects/profileservice/trunk/core/src/test/resources/system/static/bootstrap/profile.xml
   projects/profileservice/trunk/persistence/pom.xml
   projects/profileservice/trunk/persistence/src/main/java/org/jboss/profileservice/persistence/AttachmentPropertyPopulator.java
   projects/profileservice/trunk/persistence/src/main/java/org/jboss/profileservice/persistence/ManagedObjectRecreationHelper.java
   projects/profileservice/trunk/sandbox/pom.xml
Log:
update maven dependencies 

Modified: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/dependency/ProfileDeployAction.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/dependency/ProfileDeployAction.java	2010-01-12 15:21:06 UTC (rev 99285)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/dependency/ProfileDeployAction.java	2010-01-12 15:24:50 UTC (rev 99286)
@@ -88,7 +88,7 @@
             throw new IllegalStateException("null deployer for profile " + profile.getKey());
          
          // Undeploy
-         undeployer(profile, deployer);
+         undeploy(profile, deployer);
       }
    }
    
@@ -115,9 +115,9 @@
       }
    }
    
-   protected void undeployer(Profile profile, ProfileDeployerPlugin deployer)
+   protected void undeploy(Profile profile, ProfileDeployerPlugin deployer)
    {
-      Collection<? extends ProfileDeployment> deployments = profile.getDeployments();
+      Collection<ProfileDeployment> deployments = profile.getDeployments();
       if (deployments != null && !deployments.isEmpty())
       {
          // remove deployments

Modified: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/dependency/ProfileServiceController.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/dependency/ProfileServiceController.java	2010-01-12 15:21:06 UTC (rev 99285)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/dependency/ProfileServiceController.java	2010-01-12 15:24:50 UTC (rev 99286)
@@ -39,7 +39,7 @@
 {
    
    /** The deploy state. */
-   public static final ControllerState DEPLOY_STATE = new ControllerState("Deploy"); 
+   public static final ControllerState DEPLOY_STATE = ControllerState.newState("Deploy"); 
    
    public ProfileServiceController(Kernel kernel) throws Exception
    {

Added: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/deployers/MainDeployerPlugin.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/deployers/MainDeployerPlugin.java	                        (rev 0)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/deployers/MainDeployerPlugin.java	2010-01-12 15:24:50 UTC (rev 99286)
@@ -0,0 +1,113 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat 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.profileservice.deployers;
+
+import org.jboss.deployers.client.spi.Deployment;
+import org.jboss.deployers.client.spi.main.MainDeployer;
+import org.jboss.managed.api.ManagedDeployment;
+import org.jboss.profileservice.ProfileDeployerPlugin;
+import org.jboss.profileservice.spi.ProfileDeployment;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class MainDeployerPlugin implements ProfileDeployerPlugin
+{
+   
+   /** The deployment builder. */
+   private final VDFDeploymentBuilder deploymentBuilder = VDFDeploymentBuilder.getInstance();
+   
+   /** The main deployer. */
+   private final MainDeployer deployer;
+   
+   public MainDeployerPlugin(MainDeployer deployer)
+   {
+      if(deployer == null)
+      {
+         throw new IllegalArgumentException("null deployer");
+      }
+      this.deployer = deployer;
+   }
+   
+   @Override
+   public void addDeployment(ProfileDeployment deployment) throws Exception
+   {
+      if(deployment == null)
+      {
+         throw new IllegalArgumentException("null profile deployment");
+      }
+      Deployment d = createDeployment(deployment);
+      deployer.addDeployment(d);
+   }
+
+   @Override
+   public void checkComplete(String... names) throws Exception
+   {
+      deployer.checkComplete(names);
+   }
+
+   @Override
+   public void checkComplete() throws Exception
+   {
+      deployer.checkComplete();
+   }
+
+   @Override
+   public ManagedDeployment getManagedDeployment(ProfileDeployment deployment) throws Exception
+   {
+      if(deployment == null)
+      {
+         throw new IllegalArgumentException("null profile deployment");
+      }
+      return deployer.getManagedDeployment(deployment.getName());
+   }
+
+   @Override
+   public boolean isSupportRedeployment()
+   {
+      return true;
+   }
+
+   @Override
+   public void process()
+   {
+      this.deployer.process();
+   }
+
+   @Override
+   public void removeDeployment(ProfileDeployment deployment) throws Exception
+   {
+      if(deployment == null)
+      {
+         throw new IllegalArgumentException("null profile deployment");
+      }
+      this.deployer.removeDeployment(deployment.getName());
+   }
+
+   Deployment createDeployment(ProfileDeployment deployment)
+   {
+      return deploymentBuilder.createDeployment(deployment);
+   }
+   
+}
+

Modified: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/bootstrap/BootstrapDeployerPlugin.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/bootstrap/BootstrapDeployerPlugin.java	2010-01-12 15:21:06 UTC (rev 99285)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/bootstrap/BootstrapDeployerPlugin.java	2010-01-12 15:24:50 UTC (rev 99286)
@@ -76,7 +76,22 @@
    {
       if(names != null && names.length > 0)
       {
-         // 
+         for(String name : names)
+         {
+            KernelDeployment deployment = this.deployments.get(name);
+            try
+            {
+               deployer.validate(deployment);
+            }
+            catch(Exception e)
+            {
+               throw e;
+            }
+            catch(Throwable t)
+            {
+               throw new RuntimeException("failed to deploy " + deployment, t);
+            }
+         }
       }
    }
 

Modified: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/plugin/ClassPathAdapterProfile.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/plugin/ClassPathAdapterProfile.java	2010-01-12 15:21:06 UTC (rev 99285)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/profile/plugin/ClassPathAdapterProfile.java	2010-01-12 15:24:50 UTC (rev 99286)
@@ -37,6 +37,7 @@
 import org.jboss.logging.Logger;
 import org.jboss.profileservice.profile.metadata.plugin.ClassPathProfileMetaData.ClassPathItem;
 import org.jboss.profileservice.repository.BasicProfileDeployment;
+import org.jboss.profileservice.repository.ProfileDeploymentFactory;
 import org.jboss.profileservice.spi.NoSuchDeploymentException;
 import org.jboss.profileservice.spi.Profile;
 import org.jboss.profileservice.spi.ProfileDeployment;
@@ -89,7 +90,7 @@
       VFSClassLoaderFactory10 clMetaData = new VFSClassLoaderFactory10();
       clMetaData.setRoots(roots);
       // Create deployment
-      classPathDeployment = new BasicProfileDeployment(deploymentName);
+      classPathDeployment = ProfileDeploymentFactory.getInstance().createDeployment(deploymentName);
       classPathDeployment.addAttachment(ClassLoadingMetaData.class.getName(), clMetaData);
    }
    

Modified: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/repository/virtual/AbstractVirtualDeploymentRepository.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/repository/virtual/AbstractVirtualDeploymentRepository.java	2010-01-12 15:21:06 UTC (rev 99285)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/repository/virtual/AbstractVirtualDeploymentRepository.java	2010-01-12 15:24:50 UTC (rev 99286)
@@ -23,7 +23,7 @@
 
 import java.io.IOException;
 
-import org.jboss.profileservice.repository.BasicProfileDeployment;
+import org.jboss.profileservice.repository.ProfileDeploymentFactory;
 import org.jboss.profileservice.spi.ProfileDeployment;
 import org.jboss.profileservice.spi.repository.ArtifactId;
 import org.jboss.profileservice.spi.repository.ArtifactRepository;
@@ -41,6 +41,9 @@
 public abstract class AbstractVirtualDeploymentRepository extends AbstractVirtualDeploymentAssembly
 {
 
+   /** The deployment factory. */
+   private static final ProfileDeploymentFactory deploymentFactory = ProfileDeploymentFactory.getInstance();
+   
    /**
     * Create a ProfileDeployment.
     * 
@@ -61,7 +64,9 @@
       {
          throw new IllegalStateException("Assembled null virtual file");
       }
-      return new BasicProfileDeployment(vf, ctx);
+      ProfileDeployment profileDeployment = deploymentFactory.createDeployment(vf);
+      profileDeployment.addAttachment(VirtualDeploymentAssemblyContext.class.getName(), ctx);
+      return profileDeployment;
    }
 
    /**

Modified: projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/repository/virtual/VirtualDeploymentProfile.java
===================================================================
--- projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/repository/virtual/VirtualDeploymentProfile.java	2010-01-12 15:21:06 UTC (rev 99285)
+++ projects/profileservice/trunk/core/src/main/java/org/jboss/profileservice/repository/virtual/VirtualDeploymentProfile.java	2010-01-12 15:24:50 UTC (rev 99286)
@@ -22,9 +22,11 @@
 package org.jboss.profileservice.repository.virtual;
 
 import java.io.IOException;
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
@@ -59,8 +61,12 @@
    private final VirtualDeploymentRepository repository;
    
    /** The deployments. */
-   private Map<String, ProfileDeployment> deployments = Collections.emptyMap();
+   // Maintain the same order as the xml
+   private List<ProfileDeployment> deployments = Collections.emptyList();
    
+   /** The deployments by name. */
+   private Map<String, ProfileDeployment> deploymentsByName = Collections.emptyMap();
+   
    /** The last modified. */
    private final long lastModified;
    
@@ -92,13 +98,15 @@
    {
       if(deploymentMetaData != null && deploymentMetaData.isEmpty() == false)
       {
-         this.deployments = new HashMap<String, ProfileDeployment>();
+         this.deployments = new ArrayList<ProfileDeployment>();
+         this.deploymentsByName = new HashMap<String, ProfileDeployment>();
          for(ProfileDeploymentMetaData virtual: deploymentMetaData)
          {
             try
             {
                ProfileDeployment deployment = createDeployment(virtual);
-               this.deployments.put(deployment.getName(), deployment);
+               this.deployments.add(deployment);
+               this.deploymentsByName.put(deployment.getName(), deployment);
             }
             catch(IOException e)
             {
@@ -115,7 +123,7 @@
    @Override
    public ProfileDeployment getDeployment(String name) throws NoSuchDeploymentException
    {
-      return this.deployments.get(name);
+      return this.deploymentsByName.get(name);
    }
 
    /**
@@ -124,16 +132,16 @@
    @Override
    public Set<String> getDeploymentNames()
    {
-      return this.deployments.keySet();
+      return this.deploymentsByName.keySet();
    }
 
    /**
     * {@inheritDoc}
     */
    @Override
-   public Collection<ProfileDeployment> getDeployments()
+   public List<ProfileDeployment> getDeployments()
    {
-      return this.deployments.values();
+      return Collections.unmodifiableList(this.deployments);
    }
 
    /**
@@ -160,7 +168,7 @@
    @Override
    public boolean hasDeployment(String name)
    {
-      return this.deployments.containsKey(name);
+      return this.deploymentsByName.containsKey(name);
    }
 
    /**

Modified: projects/profileservice/trunk/core/src/test/java/org/jboss/test/profileservice/test/BasicProfileServiceUnitTestCase.java
===================================================================
--- projects/profileservice/trunk/core/src/test/java/org/jboss/test/profileservice/test/BasicProfileServiceUnitTestCase.java	2010-01-12 15:21:06 UTC (rev 99285)
+++ projects/profileservice/trunk/core/src/test/java/org/jboss/test/profileservice/test/BasicProfileServiceUnitTestCase.java	2010-01-12 15:24:50 UTC (rev 99286)
@@ -25,8 +25,10 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import org.jboss.deployers.client.spi.main.MainDeployer;
 import org.jboss.profileservice.bootstrap.ProfileServiceConstants;
 import org.jboss.profileservice.dependency.LocalProfileServiceDomain;
+import org.jboss.profileservice.deployers.MainDeployerPlugin;
 import org.jboss.profileservice.domain.spi.DomainFeatureNode;
 import org.jboss.profileservice.domain.spi.DomainMetaData;
 import org.jboss.profileservice.metadata.ProfileMetaDataFactory;
@@ -65,7 +67,7 @@
       DomainMetaDataRepoSupport support = new DomainMetaDataRepoSupport(domain);
       DomainMetaData metaData = support.getDomainMetaData();
       assertNotNull(metaData);
-      
+
       ProfileService ps = getBean(ProfileServiceConstants.PROFILESERVICE_NAME, ProfileService.class);
       LocalProfileServiceDomain resolver = getBean(ProfileServiceConstants.LOCALDOMAIN_NAME, LocalProfileServiceDomain.class);
       assertNotNull(ps);
@@ -87,6 +89,11 @@
          ps.activateProfile(key);
          activated.add(key);
       }
+      // Check MainDeployer 
+      assertNotNull(getBean("MainDeployer", MainDeployer.class));
+      // Check the profile deployer plugin for MainDeployer
+      assertNotNull(getBean("MainDeployerPlugin", MainDeployerPlugin.class));
+      
       for(ProfileKey key : ps.getActiveProfileKeys())
       {
          getLog().debug("active " + key);
@@ -99,7 +106,7 @@
    
    public void testWait() throws Exception
    {
-      
+      Thread.currentThread().wait();
    }   
    
 }

Modified: projects/profileservice/trunk/core/src/test/java/org/jboss/test/profileservice/virtual/support/TestVirtualDeploymentRepository.java
===================================================================
--- projects/profileservice/trunk/core/src/test/java/org/jboss/test/profileservice/virtual/support/TestVirtualDeploymentRepository.java	2010-01-12 15:21:06 UTC (rev 99285)
+++ projects/profileservice/trunk/core/src/test/java/org/jboss/test/profileservice/virtual/support/TestVirtualDeploymentRepository.java	2010-01-12 15:24:50 UTC (rev 99286)
@@ -25,7 +25,7 @@
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
-import org.jboss.profileservice.repository.BasicProfileDeployment;
+import org.jboss.profileservice.repository.ProfileDeploymentFactory;
 import org.jboss.profileservice.spi.ProfileDeployment;
 import org.jboss.profileservice.spi.VirtualDeploymentRepository;
 import org.jboss.profileservice.spi.repository.ArtifactId;
@@ -41,6 +41,10 @@
  */
 public class TestVirtualDeploymentRepository extends AbstractVirtualDeploymentAssembly implements VirtualDeploymentRepository
 {
+   
+   /** The deployment factory. */
+   private static final ProfileDeploymentFactory deploymentFactory = ProfileDeploymentFactory.getInstance();
+   
    /** The repositories. */
    private Map<String, ArtifactRepository<ArtifactId>> repositories = new ConcurrentHashMap<String, ArtifactRepository<ArtifactId>>();
    
@@ -65,7 +69,9 @@
       {
          throw new IllegalStateException("Assembled null virtual file");
       }
-      return new BasicProfileDeployment(vf, ctx);
+      ProfileDeployment profileDeployment = deploymentFactory.createDeployment(vf);
+      profileDeployment.addAttachment(VirtualDeploymentAssemblyContext.class.getName(), ctx);
+      return profileDeployment;
    }
 
    @Override

Added: projects/profileservice/trunk/core/src/test/resources/system/static/bootstrap/deployers.xml
===================================================================
--- projects/profileservice/trunk/core/src/test/resources/system/static/bootstrap/deployers.xml	                        (rev 0)
+++ projects/profileservice/trunk/core/src/test/resources/system/static/bootstrap/deployers.xml	2010-01-12 15:24:50 UTC (rev 99286)
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+   The base deployers
+-->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+   <!-- MetaValueFactory -->
+   <bean name="MetaValueFactory" >
+      <constructor factoryClass="org.jboss.metatype.api.values.MetaValueFactory" factoryMethod="getInstance"/>      
+   </bean>
+   <!-- The ManagedObjectFactory -->
+   <bean name="ManagedObjectFactory">
+      <constructor factoryClass="org.jboss.managed.api.factory.ManagedObjectFactory" factoryMethod="getInstance"/>
+      <property name="metaValueFactory"><inject bean="MetaValueFactory"/></property>
+      <!-- Accept any implementor of InstanceClassFactory -->
+      <incallback method="addInstanceClassFactory"/>
+      <uncallback method="removeInstanceClassFactory"/>
+     <!-- Accept any ManagedObjectDefinition -->
+      <incallback method="addManagedObjectDefinition"/>
+      <uncallback method="removeManagedObjectDefinition"/>
+   </bean>
+   <!-- The ManagedObjectCreator implementation -->
+   <bean name="ManagedObjectCreator" class="org.jboss.deployers.spi.deployer.helpers.DefaultManagedObjectCreator">
+      <property name="mof"><inject bean="ManagedObjectFactory"/></property>
+   </bean>
+
+   <!-- The MainDeployer -->
+   <bean name="MainDeployer" class="org.jboss.deployers.plugins.main.MainDeployerImpl">
+      <property name="structuralDeployers"><inject bean="StructuralDeployers"/></property>
+      <property name="deployers"><inject bean="Deployers"/></property>
+   </bean>
+
+   <!-- ModificationType structure processor -->
+   <bean name="ModificationTypeStructureProcessor" class="org.jboss.deployers.vfs.plugins.structure.modify.ModificationTypeStructureProcessor">
+     <incallback method="addMatcher"/>
+     <uncallback method="removeMatcher"/>
+   </bean>
+
+   <!-- The holder for deployers that determine structure -->
+   <bean name="StructuralDeployers" class="org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl">
+      <property name="structureBuilder">
+         <!-- The consolidator of the structure information -->
+         <bean name="StructureBuilder" class="org.jboss.deployers.vfs.plugins.structure.VFSStructureBuilder">
+           <property name="structureProcessor"><inject bean="ModificationTypeStructureProcessor"/></property>
+         </bean>
+      </property>
+      <!-- Accept any implementor of structure deployer -->
+      <incallback method="addDeployer"/>
+      <uncallback method="removeDeployer"/>
+   </bean>
+
+   <!-- The holder for deployers that do real deployment -->
+   <bean name="Deployers" class="org.jboss.deployers.plugins.deployers.DeployersImpl">
+   <!-- Uncomment the following @org.jboss.aop.microcontainer.aspects.jmx.JMX to enable registering
+    MC beans as MBeans. These MBeans provide debug level information about which deployers were selected for
+    processing the deployment and what attachments were added to the deployment. More details http://www.jboss.org/index.html?module=bb&op=viewtopic&t=155074&start=10#4233874
+    -->
+    <!--
+      <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.deployment:service=DeployersImpl", exposedInterface=org.jboss.deployers.plugins.deployers.DeployersImplMBean.class, registerDirectly=true)</annotation>
+      -->
+      <constructor><parameter><inject bean="jboss.kernel:service=KernelController"/></parameter></constructor>
+      <!-- Accept any implementor of deployer -->
+      <incallback method="addDeployer"/>
+      <uncallback method="removeDeployer"/>
+      <property name="mgtObjectCreator"><inject bean="ManagedObjectCreator"/></property>
+   </bean>
+
+   <!-- A declared structure descriptor deployer -->
+   <bean name="DeclaredStructure" class="org.jboss.deployers.vfs.plugins.structure.explicit.DeclaredStructure"/>
+
+    <!-- JAR Structure -->
+    <bean name="JARStructure" class="org.jboss.deployers.vfs.plugins.structure.jar.JARStructure">
+       <!-- Unless specified the default list of suffixes is .zip, .ear, .jar, ,.rar, .war, .sar, .har, .aop -->
+       <constructor>
+          <parameter>
+             <set elementClass="java.lang.String">
+                <value>.zip</value>
+                <value>.ear</value>
+                <value>.jar</value>
+                <value>.rar</value>
+                <value>.war</value>
+                <value>.sar</value>
+                <value>.har</value>
+                <value>.aop</value>
+                <value>.deployer</value>
+                <value>.beans</value>
+             </set>
+          </parameter>
+       </constructor>
+       <property name="candidateStructureVisitorFactory">
+          <!-- Any file that is not an ordinary directory is a candidate -->
+          <bean name="JARStructureCandidates" class="org.jboss.deployers.vfs.spi.structure.helpers.DefaultCandidateStructureVisitorFactory">
+             <!-- A filter to exclude some obvious non-subdeployments -->
+             <property name="filter">
+                <bean name="JARFilter" class="org.jboss.virtual.plugins.vfs.helpers.SuffixesExcludeFilter">
+                   <constructor><parameter>
+                      <list elementClass="java.lang.String">
+                         <!-- Exclude class files as subdeployments -->
+                         <value>.class</value>
+                      </list>
+                   </parameter></constructor>
+                </bean>
+             </property>
+          </bean>
+       </property>
+    </bean>
+
+    <!-- File Structure -->
+    <bean name="FileStructure" class="org.jboss.deployers.vfs.plugins.structure.file.FileStructure">
+       <!-- Unless specified the default list of suffixes is -service.xml, -beans.xml, -ds.xml, -aop.xml -->
+       <constructor>
+          <parameter>
+             <set elementClass="java.lang.String">
+                <value>-service.xml</value>
+                <value>-beans.xml</value>
+                <value>-ds.xml</value>
+                <value>-aop.xml</value>
+             </set>
+          </parameter>
+       </constructor>
+    </bean>
+
+   <bean name="BeanDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanDeployer">
+      <property name="suffix">jboss-beans.xml</property>
+   </bean>
+   <bean name="KernelDeploymentDeployer" class="org.jboss.deployers.vfs.deployer.kernel.KernelDeploymentDeployer" />
+   <bean name="BeanMetaDataDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer">
+      <constructor><parameter class="org.jboss.kernel.Kernel"><inject bean="jboss.kernel:service=Kernel"/></parameter></constructor>
+   </bean>
+   
+</deployment>

Modified: projects/profileservice/trunk/core/src/test/resources/system/static/bootstrap/profile.xml
===================================================================
--- projects/profileservice/trunk/core/src/test/resources/system/static/bootstrap/profile.xml	2010-01-12 15:21:06 UTC (rev 99285)
+++ projects/profileservice/trunk/core/src/test/resources/system/static/bootstrap/profile.xml	2010-01-12 15:24:50 UTC (rev 99286)
@@ -1,11 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <deployment xmlns="urn:jboss:bean-deployer:2.0">
 
+<!-- 
 	<bean name="NoopDeployerPlugin" class="org.jboss.profileservice.NoopProfileDeployerPlugin">
 		<install bean="ProfileDeployerPluginRegistry" method="addDefaultPlugin">
 			<parameter><this/></parameter>
 		</install>
 	</bean>
+ -->
+	<bean name="MainDeployerPlugin" class="org.jboss.profileservice.deployers.MainDeployerPlugin">
+		<constructor><parameter><inject bean="MainDeployer" /></parameter></constructor>
+		<install bean="ProfileDeployerPluginRegistry" method="addDefaultPlugin">
+			<parameter><this/></parameter>
+		</install>	
+	</bean>
 
 	<bean name="Basic Profile Factory" class="org.jboss.profileservice.profile.BasicProfileFactory">
 		<property name="repositoryManager"><inject bean="ArtifactRepositoryManager" /></property>

Modified: projects/profileservice/trunk/persistence/pom.xml
===================================================================
--- projects/profileservice/trunk/persistence/pom.xml	2010-01-12 15:21:06 UTC (rev 99285)
+++ projects/profileservice/trunk/persistence/pom.xml	2010-01-12 15:24:50 UTC (rev 99286)
@@ -19,7 +19,7 @@
 			<artifactId>junit</artifactId>
 			<scope>test</scope>
 		</dependency>
-		
+
 		<dependency>
 			<groupId>org.jboss.man</groupId>
 			<artifactId>jboss-managed</artifactId>
@@ -28,8 +28,13 @@
 			<groupId>org.jboss.man</groupId>
 			<artifactId>jboss-metatype</artifactId>
 		</dependency>
-		
+
 		<dependency>
+			<groupId>org.jboss</groupId>
+			<artifactId>jboss-mdr</artifactId>
+		</dependency>
+
+		<dependency>
 			<groupId>sun-jaxb</groupId>
 			<artifactId>jaxb-api</artifactId>
 		</dependency>

Modified: projects/profileservice/trunk/persistence/src/main/java/org/jboss/profileservice/persistence/AttachmentPropertyPopulator.java
===================================================================
--- projects/profileservice/trunk/persistence/src/main/java/org/jboss/profileservice/persistence/AttachmentPropertyPopulator.java	2010-01-12 15:21:06 UTC (rev 99285)
+++ projects/profileservice/trunk/persistence/src/main/java/org/jboss/profileservice/persistence/AttachmentPropertyPopulator.java	2010-01-12 15:24:50 UTC (rev 99286)
@@ -64,7 +64,7 @@
  * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
  * @version $Revision$
  */
-public class AttachmentPropertyPopulator
+class AttachmentPropertyPopulator
 {
 
    /** The logger. */

Modified: projects/profileservice/trunk/persistence/src/main/java/org/jboss/profileservice/persistence/ManagedObjectRecreationHelper.java
===================================================================
--- projects/profileservice/trunk/persistence/src/main/java/org/jboss/profileservice/persistence/ManagedObjectRecreationHelper.java	2010-01-12 15:21:06 UTC (rev 99285)
+++ projects/profileservice/trunk/persistence/src/main/java/org/jboss/profileservice/persistence/ManagedObjectRecreationHelper.java	2010-01-12 15:24:50 UTC (rev 99286)
@@ -55,12 +55,12 @@
       this.attachmentPopulator =  new AttachmentPropertyPopulator(mangedObjectFactory, this);
    }
    
-   public ClassLoader getLoader()
+   protected ClassLoader getLoader()
    {
       return this.loader.get();
    }
    
-   public void setLoader(ClassLoader loader)
+   protected void setLoader(ClassLoader loader)
    {
       this.loader.set(loader);
    }

Modified: projects/profileservice/trunk/sandbox/pom.xml
===================================================================
--- projects/profileservice/trunk/sandbox/pom.xml	2010-01-12 15:21:06 UTC (rev 99285)
+++ projects/profileservice/trunk/sandbox/pom.xml	2010-01-12 15:24:50 UTC (rev 99286)
@@ -1,32 +1,47 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <parent>
-    <groupId>org.jboss.profileservice</groupId>
-    <artifactId>jboss-profileservice-parent</artifactId>
-    <version>1.0.0-SNAPSHOT</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>org.jboss.profileservice</groupId>
-  <artifactId>jboss-profileservice-sandbox</artifactId>
-  <version>1.0.0-SNAPSHOT</version>
-  <packaging>jar</packaging>
-  <name>JBoss ProfileService Sandbox</name>
-  <url>http://www.jboss.org/jbossas</url>
-  <description>JBoss ProfileService Sandbox</description>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<parent>
+		<groupId>org.jboss.profileservice</groupId>
+		<artifactId>jboss-profileservice-parent</artifactId>
+		<version>1.0.0-SNAPSHOT</version>
+	</parent>
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.jboss.profileservice</groupId>
+	<artifactId>jboss-profileservice-sandbox</artifactId>
+	<version>1.0.0-SNAPSHOT</version>
+	<packaging>jar</packaging>
+	<name>JBoss ProfileService Sandbox</name>
+	<url>http://www.jboss.org/jbossas</url>
+	<description>JBoss ProfileService Sandbox</description>
 
-  <dependencies>
-  
- 	<dependency>
-		<groupId>junit</groupId>
-		<artifactId>junit</artifactId>
-		<scope>test</scope>
-	</dependency>
-  
- 	<dependency>
-		<groupId>org.jboss.logging</groupId>
-		<artifactId>jboss-logging-log4j</artifactId>
-	</dependency>
-  
+	<build>
+		<plugins>
+			<plugin>
+				<artifactId>maven-assembly-plugin</artifactId>
+				<configuration>
+					<descriptors>
+						<descriptor>src/assemble/repository.xml</descriptor>
+					</descriptors>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
+	<dependencies>
+
 		<dependency>
+			<groupId>org.jboss.logging</groupId>
+			<artifactId>jboss-logging-log4j</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>org.jboss.deployers</groupId>
+			<artifactId>jboss-deployers-vfs</artifactId>
+			<version>${version.org.jboss.deployers}</version>
+			<scope>provided</scope>
+		</dependency>
+
+		<dependency>
 			<groupId>org.jboss.kernel</groupId>
 			<artifactId>jboss-dependency</artifactId>
 			<scope>provided</scope>
@@ -37,25 +52,31 @@
 			<artifactId>jboss-kernel</artifactId>
 			<scope>provided</scope>
 		</dependency>
-  
- 	<dependency>
-		<groupId>org.jboss.profileservice</groupId>
-		<artifactId>jboss-profileservice-spi</artifactId>
-		<version>${project.parent.version}</version>
-	</dependency>
 
- 	<dependency>
-		<groupId>org.jboss.profileservice</groupId>
-		<artifactId>jboss-profileservice-core</artifactId>
-		<version>${project.parent.version}</version>
-	</dependency>
-  
-	<dependency>
-		<groupId>org.jboss</groupId>
-		<artifactId>jboss-vfs</artifactId>
-		<version>${version.org.jboss.vfs}</version>
-	</dependency>
-	
-  </dependencies>
-  
+		<dependency>
+			<groupId>org.jboss.profileservice</groupId>
+			<artifactId>jboss-profileservice-domain</artifactId>
+			<version>${project.parent.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.jboss.profileservice</groupId>
+			<artifactId>jboss-profileservice-core</artifactId>
+			<version>${project.parent.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.jboss.test</groupId>
+			<artifactId>jboss-test</artifactId>
+			<scope>test</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>org.jboss</groupId>
+			<artifactId>jboss-vfs</artifactId>
+			<version>${version.org.jboss.vfs}</version>
+		</dependency>
+
+	</dependencies>
+
 </project>




More information about the jboss-cvs-commits mailing list