Package org.jboss.arquillian.container.spi

Examples of org.jboss.arquillian.container.spi.Container


               "Please verify that the @" + OperateOnDeployment.class.getSimpleName() + " annotation on method " + method.getName() + " match a defined " +
               "@" + org.jboss.arquillian.container.test.api.Deployment.class.getSimpleName() + ".name");
      }
      if(deployment != null)
      {
         Container container = containerRegistry.getContainer(deployment.getDescription().getTarget());
         callback.call(container, deployment);
      }
   }
View Full Code Here


         throw new IllegalArgumentException("Could not start " + containerQualifier + " container. The container life cycle is controlled by Arquillian");
      }
     
      List<Deployment> managedDeployments = scenario.startupDeploymentsFor(new TargetDescription(containerQualifier));
     
      Container container = registry.getContainer(new TargetDescription(containerQualifier));

      log.info("Manual starting of a server instance");

      event.fire(new StartContainer(container));
     
      for (Deployment d : managedDeployments)
      {
         if(d.getDescription().managed() && "custom".equalsIgnoreCase(container.getContainerConfiguration().getMode()))
         {
            throw new IllegalStateException(
                  "Trying to deploy managed deployment " + d.getDescription().getName() +
                  " to custom mode container " + container.getName());
         }
         if (!d.isDeployed())
         {
            log.info("Automatic deploying of the managed deployment with name " + d.getDescription().getName() +
               " for the container with name " + container.getName());
            event.fire(new DeployDeployment(container, d));
         }
      }
   }
View Full Code Here

         throw new IllegalArgumentException("Could not start " + containerQualifier + " container. The container life cycle is controlled by Arquillian");
      }

      List<Deployment> managedDeployments = scenario.startupDeploymentsFor(new TargetDescription(containerQualifier));
     
      Container container = registry.getContainer(new TargetDescription(containerQualifier));

      for (String name : config.keySet())
      {
         container.getContainerConfiguration().overrideProperty(name, config.get(name));
      }

      log.info("Manual starting of a server instance with overridden configuration. New configuration: " +
         container.getContainerConfiguration().getContainerProperties());

      event.fire(new SetupContainer(container));
      event.fire(new StartContainer(container));
     
      for (Deployment d : managedDeployments)
      {
         if (!d.isDeployed())
         {
            log.info("Automatic deploying of the managed deployment with name " + d.getDescription().getName() +
               " for the container with name " + container.getName());
            event.fire(new DeployDeployment(container, d));
         }
      }
   }
View Full Code Here

      if (!isControllableContainer(registry.getContainers(), containerQualifier))
      {
         throw new IllegalArgumentException("Could not start " + containerQualifier + " container. The container life cycle is controlled by Arquillian");
      }

      Container container = registry.getContainer(new TargetDescription(containerQualifier));

      List<Deployment> managedDeployments = scenario.startupDeploymentsFor(new TargetDescription(containerQualifier));
     
      for (Deployment d : managedDeployments)
      {
         if (d.isDeployed())
         {
            log.info("Automatic undeploying of the managed deployment with name " + d.getDescription().getName() +
               " from the container with name " + container.getName());
            event.fire(new UnDeployDeployment(container, d));
         }
      }
     
      log.info("Manual stopping of a server instance");
View Full Code Here

      if (!isControllableContainer(registry.getContainers(), containerQualifier))
      {
         throw new IllegalArgumentException("Could not start " + containerQualifier + " container. The container life cycle is controlled by Arquillian");
      }

      Container container = registry.getContainer(new TargetDescription(containerQualifier));

      log.info("Hard killing of a server instance");

      event.fire(new KillContainer(container));
   }
View Full Code Here

      if (!containerExists(registry.getContainers(), containerQualifier))
      {
         throw new IllegalArgumentException("No container found in registry with name " + containerQualifier);
      }

      Container container = registry.getContainer(new TargetDescription(containerQualifier));
      return container.getState() == Container.State.STARTED;
   }
View Full Code Here

      {
         return;
      }
      for(Deployment deployment: deployments)
      {
         Container container = containerRegistry.getContainer(deployment.getDescription().getTarget());
         operation.perform(container, deployment);
      }
   }
View Full Code Here

   protected void validate(DeploymentScenario scenario)
   {
      ContainerRegistry conReg = containerRegistry.get();
      for(TargetDescription target : scenario.targets())
      {
         Container container = conReg.getContainer(target);
         if(container == null)
         {
            throw new ValidationException(
                  DeploymentScenario.class.getSimpleName() + " contains targets not matching any defined Container in the registry. " + target.getName() +
                  ". Possible causes are: No Deployable Container found on Classpath or " +
View Full Code Here

         throw new IllegalArgumentException("Could not start " + containerQualifier + " container. The container life cycle is controlled by Arquillian");
      }
     
      List<Deployment> managedDeployments = scenario.startupDeploymentsFor(new TargetDescription(containerQualifier));
     
      Container container = registry.getContainer(new TargetDescription(containerQualifier));

      log.info("Manual starting of a server instance");

      event.fire(new StartContainer(container));
     
      for (Deployment d : managedDeployments)
      {
         if (!d.isDeployed())
         {
            log.info("Automatic deploying of the managed deployment with name " + d.getDescription().getName() +
               " for the container with name " + container.getName());
            event.fire(new DeployDeployment(container, d));
         }
      }
   }
View Full Code Here

         throw new IllegalArgumentException("Could not start " + containerQualifier + " container. The container life cycle is controlled by Arquillian");
      }

      List<Deployment> managedDeployments = scenario.startupDeploymentsFor(new TargetDescription(containerQualifier));
     
      Container container = registry.getContainer(new TargetDescription(containerQualifier));

      for (String name : config.keySet())
      {
         container.getContainerConfiguration().overrideProperty(name, config.get(name));
      }

      log.info("Manual starting of a server instance with overridden configuration. New configuration: " +
         container.getContainerConfiguration().getContainerProperties());

      event.fire(new SetupContainer(container));
      event.fire(new StartContainer(container));
     
      for (Deployment d : managedDeployments)
      {
         if (!d.isDeployed())
         {
            log.info("Automatic deploying of the managed deployment with name " + d.getDescription().getName() +
               " for the container with name " + container.getName());
            event.fire(new DeployDeployment(container, d));
         }
      }
   }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.container.spi.Container

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.