Package org.jboss.arquillian.spi.client.container

Examples of org.jboss.arquillian.spi.client.container.DeploymentException


   public void shouldCatchExceptionInDeploymentContext() throws Exception
   {
      registry.create(container1, serviceLoader);
      registry.create(container2, serviceLoader);
     
      when(deployableContainer1.deploy(isA(Archive.class))).thenThrow(new DeploymentException("_TEST_"));
     
      try
      {
         fire(new DeployManagedDeployments());
      }
View Full Code Here


      {
         return ManagementViewParser.parse(archive.getName(), (ProfileService)new InitialContext().lookup("ProfileService"));
      }
      catch (Exception e)
      {
         throw new DeploymentException("Could not extract deployment metadata", e);
      }
   }
View Full Code Here

      {
         undeploy(archive.getName());
      }
      catch (Exception e)
      {
         throw new DeploymentException("Could not undeploy from container", e);
      }
   }
View Full Code Here

            }
         }
      }
      catch (Exception e)
      {
         throw new DeploymentException("Could not deploy " + deploymentName, e);
      }
      if (failure != null)
      {
         throw new DeploymentException("Failed to deploy " + deploymentName, failure);
      }
   }
View Full Code Here

         DeploymentProgress undeployProgress = deploymentManager.remove(name);
         undeployProgress.run();
      }
      catch (Exception e)
      {
         throw new DeploymentException("Could not undeploy " + name, e);
      }
   }
View Full Code Here

               archive.as(ShrinkwrapReadableArchive.class),
               params);
      }
      catch (Exception e)
      {
         throw new DeploymentException("Could not deploy " + archive.getName(), e);
      }
      // TODO: Dynamically lookup contexts
      return new ProtocolMetaData()
         .addContext(
               new HTTPContext("localhost", configuration.getBindHttpPort(), "/test"));
View Full Code Here

      {
         server.getDeployer().undeploy(params.name, params);
      }
      catch (Exception e)
      {
         throw new DeploymentException("Could not undeploy " + archive.getName(), e);
      }
   }
View Full Code Here

   public ProtocolMetaData deploy(Deployment... deployments) throws DeploymentException
   {
      if (deploymentManager == null)
      {
         throw new DeploymentException("Could not deploy since deployment manager was not loaded");
      }

      TargetModuleID moduleInfo = null;
      try
      {
         for(Deployment deployment : deployments)
         {
            if(deployment.isArchiveDeployment())
            {
               PROGRESS_BARRIER.reset();
               resetModuleStatus();
               ProgressObject progress = deploymentManager.distribute(
                     deploymentManager.getTargets(), moduleTypeMapper.getModuleType(deployment.getArchive()),
                     deployment.getArchive().as(ZipExporter.class).exportAsInputStream(), null);
               progress.addProgressListener(new JSR88DeploymentListener(this, progress.getResultTargetModuleIDs(), CommandType.DISTRIBUTE));
               waitForModuleToStart();
               // QUESTION when is getResultTargetModuleIDs() > 0?
               moduleInfo =  progress.getResultTargetModuleIDs()[0];
              
               context.add(TargetModuleID.class, moduleInfo);
            }
         }
        
      }
      catch (Exception e)
      {
         throw new DeploymentException("Could not deploy archive", e);
      }

      if (moduleInfo == null || moduleInfo.getModuleID() == null)
      {
         throw new DeploymentException("Could not determine module id, likely because module did not deploy");
      }

      try
      {
         // FIXME pass moduleId to ServletMethodExecutor since we can't guarantee anymore it's /test
View Full Code Here

         return;
      }

      if (deploymentManager == null)
      {
         throw new DeploymentException("Could not undeploy since deployment manager was not loaded");
      }
     
      for(Deployment deployment : deployments)
      {
         if(deployment.isArchiveDeployment())
         {
            try
            {
               PROGRESS_BARRIER.reset();
               TargetModuleID moduleInfo = context.get(TargetModuleID.class);
               if (moduleInfo == null || moduleInfo.getModuleID() == null)
               {
                  log.log(Level.INFO, "Skipping undeploy since module ID could not be determined");
                  return;
               }
              
               TargetModuleID[] availableModuleIDs = deploymentManager.getAvailableModules(
                     moduleTypeMapper.getModuleType(deployment.getArchive()), getDeploymentManager().getTargets());
               TargetModuleID moduleInfoMatch = null;
               for (TargetModuleID candidate : availableModuleIDs)
               {
                  if (candidate.getModuleID().equals(moduleInfo.getModuleID()))
                  {
                     moduleInfoMatch = candidate;
                     break;
                  }
               }
  
               if (moduleInfoMatch != null)
               {
                  TargetModuleID[] targetModuleIDs = { moduleInfoMatch };
                  ProgressObject progress = deploymentManager.undeploy(targetModuleIDs);
                  progress.addProgressListener(new JSR88DeploymentListener(this, targetModuleIDs, CommandType.UNDEPLOY));
                  waitForModuleToUndeploy();
               }
               else
               {
                  resetModuleStatus();
                  log.info("Undeploy skipped since could not locate module in list of deployed modules");
               }
            }
            catch (Exception e)
            {
               throw new DeploymentException("Could not undeploy module", e);
            }
         }
      }
   }
View Full Code Here

         return new ProtocolMetaData()
            .addContext(httpContext);
      }
      catch (Exception e)
      {
         throw new DeploymentException("Could not deploy " + archive.getName(), e);
      }
   }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.spi.client.container.DeploymentException

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.