Package org.jboss.deployers.structure.spi

Examples of org.jboss.deployers.structure.spi.DeploymentContext


      return context;
   }

   public DeploymentUnit getDeploymentUnit(String name)
   {
      DeploymentContext context = getDeploymentContext(name);
      if (context == null)
         return null;
      return context.getDeploymentUnit();
   }
View Full Code Here


    * @return true if deployment is a redeployment, false otherwise
    */
   protected boolean checkExistingTopLevelDeployment(Deployment deployment, boolean addToDeploy)
   {
      String name = deployment.getName();
      DeploymentContext previous = topLevelDeployments.get(name);
      if (previous != null)
      {
         log.debug("Removing previous deployment: " + previous.getName());
         toRedeploy.put(name, deployment);
         return true;
      }
      else
      {
View Full Code Here

    * @throws DeploymentException for any error
    */
   protected void determineDeploymentContext(Deployment deployment, boolean addToDeploy) throws DeploymentException
   {
      String name = deployment.getName();
      DeploymentContext context = null;
      try
      {
         context = determineStructure(deployment);
         if (DeploymentState.ERROR.equals(context.getState()))
         {
            errorDeployments.put(name, context);
         }

         context.getTransientAttachments().addAttachment(MainDeployer.class, this);
         topLevelDeployments.put(name, context);
         addContext(context, addToDeploy);
      }
      catch (DeploymentException e)
      {
View Full Code Here

         if (shutdown.get())
            throw new IllegalStateException("The main deployer is shutdown");

         log.debug("Remove deployment context: " + name);

         DeploymentContext context = topLevelDeployments.remove(name);
         if (context == null)
            return false;

         context.getTransientAttachments().removeAttachment(MainDeployer.class);
         removeContext(context, addToUndeploy);

         return true;
      }
      finally
View Full Code Here

         {
            try
            {
               Deployment deployment = deployments[i];
               addDeployment(deployment, false);
               DeploymentContext context = getTopLevelDeploymentContext(deployment.getName());
               if (contexts == null)
                  throw new DeploymentException("Deployment context not found: " + deployment.getName());

               deployers.process(Collections.singletonList(context), null);
               contexts[i] = context;
View Full Code Here

         if (shutdown.get())
            throw new IllegalStateException("The main deployer is shutdown");

         for(Deployment deployment : deployments)
         {
            DeploymentContext context = getTopLevelDeploymentContext(deployment.getName());
            if (context != null)
            {
               try
               {
                  removeDeployment(deployment, false);
View Full Code Here

         throw new IllegalArgumentException("Null names.");

      List<Deployment> deployments = new ArrayList<Deployment>();
      for(String name : names)
      {
         DeploymentContext context = getTopLevelDeploymentContext(name);
         if (context != null)
            deployments.add(context.getDeployment());
         else if (log.isTraceEnabled())
            log.trace("No such deployment present: " + name);
      }
      if (deployments.isEmpty() == false)
         undeploy(deployments.toArray(new Deployment[deployments.size()]));
View Full Code Here

         throw new IllegalStateException("No deployers");

      lockRead();
      try
      {
         DeploymentContext context = getTopLevelDeploymentContext(deploymentName);
         if (context == null)
            return DeploymentStages.NOT_INSTALLED;
         DeploymentStage result = deployers.getDeploymentStage(context);
         if (result != null)
            return result;
View Full Code Here

         throw new IllegalStateException("No deployers");

      lockRead();
      try
      {
         DeploymentContext context = getTopLevelDeploymentContext(deploymentName);
         if (context == null)
            throw new DeploymentException("Top level deployment " + deploymentName + " not found");
         try
         {
            deployers.change(context, stage);
View Full Code Here

      deployers.checkStructureComplete(getDeploymentContexts(names));
   }

   public DeploymentState getDeploymentState(String name)
   {
      DeploymentContext context = getDeploymentContext(name);
      if (context == null)
         return DeploymentState.UNDEPLOYED;
      return context.getState();
   }
View Full Code Here

TOP

Related Classes of org.jboss.deployers.structure.spi.DeploymentContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.