[jboss-cvs] jboss-cvs-commits Digest, Vol 54, Issue 35

Ales Justin ales.justin at gmail.com
Mon Dec 6 12:19:12 EST 2010


Some additional / extra test wouldn't hurt. ;-)

> ------------------------------
> 
> Message: 3
> Date: Mon, 6 Dec 2010 11:27:25 -0500
> From: jboss-cvs-commits at lists.jboss.org
> Subject: [jboss-cvs] JBossAS SVN: r109729 - in trunk:
> 	system/src/main/java/org/jboss/system/server/profileservice/bootstrap
> 	and 4 other directories.
> To: jboss-cvs-commits at lists.jboss.org
> Message-ID:
> 	<201012061627.oB6GRPHI030849 at svn01.web.mwc.hst.phx2.redhat.com>
> Content-Type: text/plain; charset=UTF-8
> 
> Author: emuckenhuber
> Date: 2010-12-06 11:27:25 -0500 (Mon, 06 Dec 2010)
> New Revision: 109729
> 
> Added:
>   trunk/system/src/main/java/org/jboss/system/server/profileservice/bootstrap/BootstrapDomainMetaData.java
> Removed:
>   trunk/system/src/main/java/org/jboss/system/server/profileservice/profile/plugins/
> Modified:
>   trunk/component-matrix/pom.xml
>   trunk/system/src/main/java/org/jboss/system/server/profileservice/bootstrap/BasicProfileServiceBootstrap.java
>   trunk/system/src/main/java/org/jboss/system/server/profileservice/bootstrap/StaticBootstrapProfileFactory.java
>   trunk/system/src/main/java/org/jboss/system/server/profileservice/deployers/MainDeployerPlugin.java
>   trunk/system/src/main/java/org/jboss/system/server/profileservice/deployers/StructureMetaDataBuilder.java
>   trunk/system/src/main/java/org/jboss/system/server/profileservice/deployers/VDFDeploymentBuilder.java
>   trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/LegacyProfileDeploymentFactory.java
>   trunk/system/src/main/java/org/jboss/system/tools/LegacyDeploymentScannerAdapter.java
>   trunk/system/src/main/java/org/jboss/system/tools/ProfileServiceToolsFacade.java
> Log:
> [JBAS-8707] don't swallow the exception for failed (hot-)deployments and update the profile service version
> 
> Modified: trunk/component-matrix/pom.xml
> ===================================================================
> --- trunk/component-matrix/pom.xml	2010-12-06 16:18:35 UTC (rev 109728)
> +++ trunk/component-matrix/pom.xml	2010-12-06 16:27:25 UTC (rev 109729)
> @@ -120,7 +120,7 @@
>     <version.org.jboss.mod_cluster>1.1.0.Final</version.org.jboss.mod_cluster>
>     <version.org.jboss.mx>6.0.0.Beta5</version.org.jboss.mx>
>     <version.org.jboss.naming>5.0.5.Final</version.org.jboss.naming>
> -    <version.org.jboss.profileservice>0.1.0.Alpha1</version.org.jboss.profileservice>
> +    <version.org.jboss.profileservice>0.2.1</version.org.jboss.profileservice>
>     <version.org.jboss.reflect>2.2.0.Alpha9</version.org.jboss.reflect>
>     <version.org.jboss.reloaded.naming>0.3.0</version.org.jboss.reloaded.naming>
>     <version.org.jboss.resteasy>2.1-beta-1</version.org.jboss.resteasy>
> 
> Modified: trunk/system/src/main/java/org/jboss/system/server/profileservice/bootstrap/BasicProfileServiceBootstrap.java
> ===================================================================
> --- trunk/system/src/main/java/org/jboss/system/server/profileservice/bootstrap/BasicProfileServiceBootstrap.java	2010-12-06 16:18:35 UTC (rev 109728)
> +++ trunk/system/src/main/java/org/jboss/system/server/profileservice/bootstrap/BasicProfileServiceBootstrap.java	2010-12-06 16:27:25 UTC (rev 109729)
> @@ -23,7 +23,6 @@
> 
> import java.net.URL;
> import java.util.ArrayList;
> -import java.util.Collections;
> import java.util.List;
> import java.util.Map;
> 
> @@ -32,13 +31,14 @@
> import org.jboss.bootstrap.spi.as.server.MCJBossASBasedServerProvider;
> import org.jboss.kernel.Kernel;
> import org.jboss.kernel.spi.deployment.KernelDeployment;
> +import org.jboss.logging.Logger;
> +import org.jboss.profileservice.Hack;
> import org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap;
> import org.jboss.profileservice.config.ProfileServiceConfig;
> import org.jboss.profileservice.deployment.hotdeploy.HDScannerFactory;
> import org.jboss.profileservice.domain.AbstractDomainMetaData;
> -import org.jboss.profileservice.domain.ManagementDomainMetaData;
> -import org.jboss.profileservice.domain.ServerMetaData;
> -import org.jboss.profileservice.domain.spi.DomainMetaDataFragment;
> +import org.jboss.profileservice.domain.spi.DomainMetaData;
> +import org.jboss.profileservice.domain.spi.DomainMetaDataRepository;
> import org.jboss.profileservice.metadata.ProfilesMetaDataFactory;
> import org.jboss.profileservice.profile.metadata.CommonProfileNameSpaces;
> import org.jboss.profileservice.profile.metadata.FeatureCapability;
> @@ -49,72 +49,74 @@
> 
> /**
>  * The basic profile service bootstrap.
> - * 
> + *
>  * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
>  * @version $Revision$
>  */
> -public class BasicProfileServiceBootstrap<K extends MCJBossASBasedServerProvider<K, T>, T extends JBossASBasedServerConfig<T>> 
> -   extends AbstractProfileServiceBootstrap implements JBossASBootstrap<K,T>  
> +public class BasicProfileServiceBootstrap<K extends MCJBossASBasedServerProvider<K, T>, T extends JBossASBasedServerConfig<T>>
> +   extends AbstractProfileServiceBootstrap implements JBossASBootstrap<K,T>
> {
> 
> +   private static final Logger log = Logger.getLogger("ProfileServiceBootstrap");
> +
>    /** Default domain name, since we don't have a domain right now. */
>    private static final String DOMAIN_NAME = ProfileKey.DEFAULT;
> -   
> -   private URL profilesLocation; 
> -   
> +
> +   private URL profilesLocation;
> +
>    /** The domain meta data. */
>    private AbstractDomainMetaData domainMetaData;
> 
> -   /** The profile meta data factory. */
> -   private DomainMetaDataFragment profileFactory;
> -   
> +   /** The domain meta data repository. */
> +   private DomainMetaDataRepository profileFactory;
> +
>    /** The hd scanner factory. */
>    private HDScannerFactory hdScannerFactory;
> -   
> +
>    /** The bootstrap deployments. */
>    // TODO this should be removed
>    private Map<String, KernelDeployment> bootstrapDeployments;
> -   
> +
>    public BasicProfileServiceBootstrap(Kernel kernel, ProfileServiceConfig config)
>    {
>       super(kernel, config);
>    }
> -   
> -   public DomainMetaDataFragment getProfileFactory()
> +
> +   public DomainMetaDataRepository getProfileFactory()
>    {
>       return profileFactory;
>    }
> -   
> -   public void setProfileFactory(DomainMetaDataFragment profileFactory)
> +
> +   public void setProfileFactory(DomainMetaDataRepository profileFactory)
>    {
>       this.profileFactory = profileFactory;
>    }
> -   
> +
>    public HDScannerFactory getHdScannerFactory()
>    {
>       return hdScannerFactory;
>    }
> -   
> +
>    public void setHdScannerFactory(HDScannerFactory hdScannerFactory)
>    {
>       this.hdScannerFactory = hdScannerFactory;
>    }
> -   
> +
>    public URL getProfilesLocation()
>    {
>       return profilesLocation;
>    }
> -   
> +
>    public void setProfilesLocation(URL profilesLocation)
>    {
>       this.profilesLocation = profilesLocation;
>    }
> -   
> +
>    public Map<String, KernelDeployment> getBootstrapDeployments()
>    {
>       return bootstrapDeployments;
>    }
> -   
> +
>    public void start(K server) throws Exception
>    {
>       // Create the domain meta data
> @@ -143,15 +145,15 @@
>          log.error("failed to start server", t);
>       }
>    }
> -   
> +
>    public void prepareShutdown(K server)
>    {
>       super.prepareShutdown();
>       hdScannerFactory.disabledScanning();
>       getConfig().getDeployerRegistry().prepareShutdown();
>    }
> -   
> -   public void shutdown(K server) 
> +
> +   public void shutdown(K server)
>    {
>       try
>       {
> @@ -162,41 +164,41 @@
>          getConfig().getDeployerRegistry().shutdown();
>       }
>    }
> -   
> +
>    protected void createWorkaroundProfile()
>    {
>       // FIXME
>       EmptyProfileMetaData metaData = new EmptyProfileMetaData("workaround");
>       List<ProfileMetaDataVisitorNode> nodes = new ArrayList<ProfileMetaDataVisitorNode>();
> -      nodes.add(new FeatureCapability(CommonProfileNameSpaces.BOOTSTRAP_PROFILE_NAMESPACE));
> +      nodes.add(new FeatureCapability(CommonProfileNameSpaces.PROFILE_NAMESPACE));
> +      nodes.add(new FeatureCapability(CommonProfileNameSpaces.IMMUTABLE_PROFILE_NAMESPACE));
>       nodes.add(new FeatureCapability(CommonProfileNameSpaces.FARMING_PROFILE_NAMESPACE));
>       nodes.add(new FeatureCapability(CommonProfileNameSpaces.HOTDEPLOY_PROFILE_NAMESPACE));
>       metaData.setFeatures(nodes);
> -      getMetaDataRegistry().registerProfileMetaData(metaData);
> +      profileRepository.getDomainRepository().registerMetaData(metaData);
>    }
> -   
> +
>    protected AbstractDomainMetaData createDomainMetaData(String serverName)
>    {
> -      AbstractDomainMetaData domain = new AbstractDomainMetaData();
> -      domain.setDomain(new ManagementDomainMetaData(DOMAIN_NAME));
> -      domain.setServer(new ServerMetaData(serverName));
> -      domain.setFragments(Collections.singletonList(profileFactory));
> -      return domain;
> +      // The delegate
> +      DomainMetaData delegate = getProfileFactory().getDomainMetaData();
> +      // Temp bootstrap domain meta data
> +      return new BootstrapDomainMetaData(DOMAIN_NAME, serverName, delegate);
>    }
> -   
> +
>    protected void populateProfileRepository() throws Exception
>    {
>       if(getProfilesLocation() != null)
>       {
>          ProfilesMetaDataFactory metadataFactory = new ProfilesMetaDataFactory();
>          metadataFactory.parse(getProfilesLocation());
> -         Map<String, ProfileMetaData> profiles = metadataFactory.getProfiles();      
> +         Map<String, ProfileMetaData> profiles = metadataFactory.getProfiles();
>          for(ProfileMetaData metaData : profiles.values())
>          {
> -            getMetaDataRegistry().registerProfileMetaData(metaData);
> +            profileRepository.getProfileRepository().registerMetaData(metaData);
>          }
>       }
>    }
> -   
> +
> }
> 
> 
> Added: trunk/system/src/main/java/org/jboss/system/server/profileservice/bootstrap/BootstrapDomainMetaData.java
> ===================================================================
> --- trunk/system/src/main/java/org/jboss/system/server/profileservice/bootstrap/BootstrapDomainMetaData.java	                        (rev 0)
> +++ trunk/system/src/main/java/org/jboss/system/server/profileservice/bootstrap/BootstrapDomainMetaData.java	2010-12-06 16:27:25 UTC (rev 109729)
> @@ -0,0 +1,53 @@
> +/*
> +* JBoss, Home of Professional Open Source
> +* Copyright 2010, 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.system.server.profileservice.bootstrap;
> +
> +import org.jboss.profileservice.domain.AbstractDomainMetaData;
> +import org.jboss.profileservice.domain.ManagementDomainMetaData;
> +import org.jboss.profileservice.domain.ServerMetaData;
> +import org.jboss.profileservice.domain.spi.DomainMetaData;
> +import org.jboss.profileservice.domain.spi.DomainMetaDataFragmentVisitor;
> +
> +/**
> + * @author Emanuel Muckenhuber
> + */
> +public class BootstrapDomainMetaData extends AbstractDomainMetaData
> +{
> +
> +   private DomainMetaData delegate;
> +   
> +   public BootstrapDomainMetaData(String domainName, String serverName, DomainMetaData delegate)
> +   {
> +      super();
> +      setDomain(new ManagementDomainMetaData(domainName));
> +      setServer(new ServerMetaData(serverName));
> +      this.delegate = delegate;
> +   }
> +   
> +   public void visit(DomainMetaDataFragmentVisitor visitor)
> +   {
> +      super.visit(visitor);
> +      this.delegate.visit(visitor);
> +   }
> +   
> +}
> +
> 
> Modified: trunk/system/src/main/java/org/jboss/system/server/profileservice/bootstrap/StaticBootstrapProfileFactory.java
> ===================================================================
> --- trunk/system/src/main/java/org/jboss/system/server/profileservice/bootstrap/StaticBootstrapProfileFactory.java	2010-12-06 16:18:35 UTC (rev 109728)
> +++ trunk/system/src/main/java/org/jboss/system/server/profileservice/bootstrap/StaticBootstrapProfileFactory.java	2010-12-06 16:27:25 UTC (rev 109729)
> @@ -28,12 +28,14 @@
> import java.util.Collections;
> import java.util.List;
> 
> +import org.jboss.profileservice.domain.AbstractDomainMetaData;
> +import org.jboss.profileservice.domain.spi.DomainMetaData;
> import org.jboss.profileservice.domain.spi.DomainMetaDataFragment;
> import org.jboss.profileservice.domain.spi.DomainMetaDataFragmentVisitor;
> +import org.jboss.profileservice.domain.spi.DomainMetaDataRepository;
> import org.jboss.profileservice.profile.metadata.BasicSubProfileMetaData;
> import org.jboss.profileservice.profile.metadata.helpers.AbstractProfileMetaData;
> import org.jboss.profileservice.profile.metadata.helpers.ProfileMetaDataFactory;
> -import org.jboss.profileservice.profile.metadata.plugin.PropertyProfileMetaData;
> import org.jboss.profileservice.profile.metadata.plugin.ScanPeriod;
> import org.jboss.profileservice.spi.metadata.ProfileMetaData;
> import org.jboss.profileservice.spi.metadata.ProfileMetaDataVisitorNode;
> @@ -46,7 +48,7 @@
>  * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
>  * @version $Revision$
>  */
> -public class StaticBootstrapProfileFactory implements DomainMetaDataFragment
> +public class StaticBootstrapProfileFactory implements DomainMetaDataFragment, DomainMetaDataRepository
> {
> 
>    /** The bindings profile name. */
> @@ -184,6 +186,18 @@
>       this.attachmentStoreRoot = attachmentStoreRoot;
>    }
> 
> +   protected DomainMetaDataFragment getFragment()
> +   {
> +      return this;
> +   }
> +
> +   public DomainMetaData getDomainMetaData()
> +   {
> +      AbstractDomainMetaData domain = new AbstractDomainMetaData();
> +      domain.setFragments(Collections.singletonList(getFragment()));
> +      return domain;
> +   }
> +   
>    public String getNameSpace()
>    {
>       return "";
> @@ -191,8 +205,7 @@
> 
>    public void visit(DomainMetaDataFragmentVisitor visitor)
>    {
> -      for(ProfileMetaData profile : createProfiles())
> -      {
> +      for(ProfileMetaData profile : createProfiles()) {
>          visitor.addProfileMetaData(profile);
>       }
>    }
> @@ -234,12 +247,10 @@
>    protected void createApplicationProfiles(List<ProfileMetaData> profiles, List<String> dependencies)
>    {
>       // the hot deployment profiles
> -      if(getApplicationURIs().isEmpty() == false)
> -      {
> -         for(int i = 0; i < getApplicationURIs().size(); i++)
> -         {
> -            URI uri = getApplicationURIs().get(i);
> -            String profileName = i == 0 ? applicationsName : applicationsName + i;
> +      if(getApplicationURIs().isEmpty() == false) {
> +         for(int i = 0; i < getApplicationURIs().size(); i++) {
> +            final URI uri = getApplicationURIs().get(i);
> +            final String profileName = i == 0 ? applicationsName : applicationsName + i;
>             profiles.add(createScanningProfile(profileName, uri, dependencies, true));
>             dependencies.add(profileName);
>          }
> @@ -270,13 +281,10 @@
>     */
>    protected ProfileMetaData createScanningProfile(String name, URI root, Collection<String> dependencies, boolean hotDeployment)
>    {
> -      PropertyProfileMetaData profile;
> -      if(hotDeployment)
> -      {
> +      AbstractProfileMetaData profile;
> +      if(hotDeployment) {
>          profile = ProfileMetaDataFactory.createHotDeploymentScanningProfile(name, root, getScanPeriod());
> -      }
> -      else
> -      {
> +      } else {
>          profile = ProfileMetaDataFactory.createImmutableScanningProfile(name, root);
>       }
>       // Dependencies
> @@ -292,8 +300,7 @@
>    protected AbstractProfileMetaData processDependencies(AbstractProfileMetaData metaData, Collection<String> names)
>    {
>       List<ProfileMetaDataVisitorNode> nodes = new ArrayList<ProfileMetaDataVisitorNode>();
> -      for(String name : names)
> -      {
> +      for(String name : names) {
>          nodes.add(new BasicSubProfileMetaData(name));
>       }
>       metaData.setFeatures(nodes);
> 
> Modified: trunk/system/src/main/java/org/jboss/system/server/profileservice/deployers/MainDeployerPlugin.java
> ===================================================================
> --- trunk/system/src/main/java/org/jboss/system/server/profileservice/deployers/MainDeployerPlugin.java	2010-12-06 16:18:35 UTC (rev 109728)
> +++ trunk/system/src/main/java/org/jboss/system/server/profileservice/deployers/MainDeployerPlugin.java	2010-12-06 16:27:25 UTC (rev 109729)
> @@ -73,7 +73,7 @@
>       {
>          throw new IllegalArgumentException("null profile deployment");
>       }
> -      Deployment d = createDeployment(deployment);
> +      Deployment d = createDeployment(key, deployment);
>       deployer.addDeployment(d);
>    }
> 
> @@ -125,9 +125,9 @@
>       this.deployer.shutdown();
>    }
> 
> -   Deployment createDeployment(ProfileDeployment deployment)
> +   Deployment createDeployment(ProfileKey key, ProfileDeployment deployment) throws Exception
>    {
> -      return deploymentBuilder.createDeployment(deployment);
> +      return deploymentBuilder.createDeployment(key, deployment);
>    }
> 
> }
> 
> Modified: trunk/system/src/main/java/org/jboss/system/server/profileservice/deployers/StructureMetaDataBuilder.java
> ===================================================================
> --- trunk/system/src/main/java/org/jboss/system/server/profileservice/deployers/StructureMetaDataBuilder.java	2010-12-06 16:18:35 UTC (rev 109728)
> +++ trunk/system/src/main/java/org/jboss/system/server/profileservice/deployers/StructureMetaDataBuilder.java	2010-12-06 16:27:25 UTC (rev 109729)
> @@ -22,7 +22,6 @@
> package org.jboss.system.server.profileservice.deployers;
> 
> import java.util.ArrayList;
> -import java.util.Collections;
> import java.util.List;
> 
> import org.jboss.deployers.client.spi.Deployment;
> @@ -73,7 +72,7 @@
> 
>    protected ContextInfo createStructureMetaData(Deployment deployment, String path, BasicVirtualAssemblyContext ctx)
>    {
> -      List<String> metaDataLocations = Collections.singletonList(BasicVirtualAssemblyContext.META_INF);
> +      List<String> metaDataLocations = ctx.getMetaDataLocations();
>       List<ClassPathEntry> classPathEntries = getClassPathEntries(ctx);
> 
>       ContextInfo info = deploymentFactory.addContext(deployment, path, metaDataLocations, classPathEntries);
> @@ -91,13 +90,15 @@
>    protected List<ClassPathEntry> getClassPathEntries(BasicVirtualAssemblyContext ctx)
>    {
>       List<ClassPathEntry> entries = new ArrayList<ClassPathEntry>();
> -      if(ctx.getRoots() != null && ctx.getRoots().isEmpty() == false)
> +      if(ctx.getClassPathLocations() != null && ctx.getClassPathLocations().isEmpty() == false)
>       {
> -         for(String s : ctx.getRoots())
> +         for(String s : ctx.getClassPathLocations())
>          {
> -            entries.add(VFSDeploymentFactory.createClassPathEntry(s));
> +            entries.add(DeploymentFactory.createClassPathEntry(s));
>          }
>       }
> +      // Add the root
> +      entries.add(DeploymentFactory.createClassPathEntry(""));
>       return entries;
>    }
> 
> 
> Modified: trunk/system/src/main/java/org/jboss/system/server/profileservice/deployers/VDFDeploymentBuilder.java
> ===================================================================
> --- trunk/system/src/main/java/org/jboss/system/server/profileservice/deployers/VDFDeploymentBuilder.java	2010-12-06 16:18:35 UTC (rev 109728)
> +++ trunk/system/src/main/java/org/jboss/system/server/profileservice/deployers/VDFDeploymentBuilder.java	2010-12-06 16:27:25 UTC (rev 109729)
> @@ -29,6 +29,7 @@
> import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
> import org.jboss.profileservice.deployment.DeploymentBuilder;
> import org.jboss.profileservice.spi.ProfileDeployment;
> +import org.jboss.profileservice.spi.ProfileKey;
> import org.jboss.system.server.profileservice.repository.LegacyProfileDeploymentFactory.WorkaroundProfileDeployment;
> import org.jboss.vfs.VFS;
> import org.jboss.vfs.VirtualFile;
> @@ -60,7 +61,7 @@
> 
>    private VDFDeploymentBuilder() { }
> 
> -   public Deployment createDeployment(ProfileDeployment profileDeployment)
> +   public Deployment createDeployment(ProfileKey key, ProfileDeployment profileDeployment) throws Exception
>    {
>       Deployment d = null;
>       if(profileDeployment.getRoot() == null)
> 
> Modified: trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/LegacyProfileDeploymentFactory.java
> ===================================================================
> --- trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/LegacyProfileDeploymentFactory.java	2010-12-06 16:18:35 UTC (rev 109728)
> +++ trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/LegacyProfileDeploymentFactory.java	2010-12-06 16:27:25 UTC (rev 109729)
> @@ -26,7 +26,7 @@
> import java.net.URISyntaxException;
> 
> import org.jboss.profileservice.deployment.AbstractProfileDeployment;
> -import org.jboss.profileservice.repository.ProfileDeploymentFactory;
> +import org.jboss.profileservice.deployment.ProfileDeploymentFactory;
> import org.jboss.profileservice.spi.ProfileDeployment;
> import org.jboss.vfs.VirtualFile;
> 
> 
> Modified: trunk/system/src/main/java/org/jboss/system/tools/LegacyDeploymentScannerAdapter.java
> ===================================================================
> --- trunk/system/src/main/java/org/jboss/system/tools/LegacyDeploymentScannerAdapter.java	2010-12-06 16:18:35 UTC (rev 109728)
> +++ trunk/system/src/main/java/org/jboss/system/tools/LegacyDeploymentScannerAdapter.java	2010-12-06 16:27:25 UTC (rev 109729)
> @@ -66,7 +66,10 @@
>             final Scanner scanner = scanners.next();
>             try
>             {
> -               scanner.start();
> +               synchronized(scanner)
> +               {
> +                  scanner.start();
> +               }
>             }
>             catch(Exception e)
>             {
> @@ -90,16 +93,19 @@
>          // TODO only scan the profiles registered here ?
>          for(final Scanner scanner : hdFactory.getRegisteredScanners())
>          {
> -            if(scanner.isScheduled())
> +            synchronized(scanner)
>             {
> -               try
> +               if(scanner.isScheduled())
>                {
> -                  scanner.scan();
> -               }
> -               catch(Exception e)
> -               {
> -                  // log
> -               }
> +                  try
> +                  {
> +                     scanner.scan();
> +                  }
> +                  catch(Exception e)
> +                  {
> +                     // log
> +                  }
> +               }  
>             }
>          }
>       }
> @@ -114,11 +120,14 @@
>       {
>          for(final Scanner scanner : hdFactory.getRegisteredScanners())
>          {
> -            if(scanner.isScheduled())
> +            synchronized(scanner)
>             {
> -               scanner.stop();
> -               stoppedScanners.add(scanner);
> -            }        
> +               if(scanner.isScheduled())
> +               {
> +                  scanner.stop();
> +                  stoppedScanners.add(scanner);
> +               }
> +            }      
>          }         
>       }
>    }
> 
> Modified: trunk/system/src/main/java/org/jboss/system/tools/ProfileServiceToolsFacade.java
> ===================================================================
> --- trunk/system/src/main/java/org/jboss/system/tools/ProfileServiceToolsFacade.java	2010-12-06 16:18:35 UTC (rev 109728)
> +++ trunk/system/src/main/java/org/jboss/system/tools/ProfileServiceToolsFacade.java	2010-12-06 16:27:25 UTC (rev 109729)
> @@ -42,8 +42,8 @@
> import org.jboss.profileservice.spi.action.ActionController;
> import org.jboss.profileservice.spi.managed.ManagedProfile;
> import org.jboss.profileservice.spi.metadata.ProfileMetaData;
> -import org.jboss.profileservice.spi.repository.ArtifactId;
> -import org.jboss.profileservice.spi.repository.ArtifactRepository;
> +import org.jboss.profileservice.spi.repository.artifact.ArtifactId;
> +import org.jboss.profileservice.spi.repository.artifact.ArtifactRepository;
> import org.jboss.vfs.util.PathTokenizer;
> 
> /**
> 
> 
> 
> ------------------------------
> 
> _______________________________________________
> jboss-cvs-commits mailing list
> jboss-cvs-commits at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-cvs-commits
> 
> 
> End of jboss-cvs-commits Digest, Vol 54, Issue 35
> *************************************************




More information about the jboss-cvs-commits mailing list