Examples of ContainerRegistry


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

      if(scenario == null)
      {
         throw new IllegalArgumentException("No deployment scenario in context");
      }
     
      ContainerRegistry registry = containerRegistry.get();
      if (registry == null)
      {
         throw new IllegalArgumentException("No container registry in context");
      }

      if (!containerExists(registry.getContainers(), containerQualifier))
      {
         throw new IllegalArgumentException("No container with the specified name exists");
      }

      if (!isManualContainer(registry.getContainers(), containerQualifier))
      {
         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));
     
View Full Code Here

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

      if(scenario == null)
      {
         throw new IllegalArgumentException("No deployment scenario in context");
      }
     
      ContainerRegistry registry = containerRegistry.get();
      if (registry == null)
      {
         throw new IllegalArgumentException("No container registry in context");
      }

      if (!containerExists(registry.getContainers(), containerQualifier))
      {
         throw new IllegalArgumentException("No container with the specified name exists");
      }
     
      if (!isManualContainer(registry.getContainers(), containerQualifier))
      {
         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));
      }
View Full Code Here

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

      if(scenario == null)
      {
         throw new IllegalArgumentException("No deployment scenario in context");
      }
     
      ContainerRegistry registry = containerRegistry.get();
      if (registry == null)
      {
         throw new IllegalArgumentException("No container registry in context");
      }

      if (!containerExists(registry.getContainers(), containerQualifier))
      {
         throw new IllegalArgumentException("No container with the specified name exists");
      }
     
      if (!isManualContainer(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)
      {
View Full Code Here

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

   }

   @Override
   public void kill(String containerQualifier)
   {
      ContainerRegistry registry = containerRegistry.get();
      if (registry == null)
      {
         throw new IllegalArgumentException("No container registry in context");
      }

      if (!containerExists(registry.getContainers(), containerQualifier))
      {
         throw new IllegalArgumentException("No container with the specified name exists");
      }
     
      if (!isManualContainer(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

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

        } catch (LifecycleException e) {
            safeCloseClient();
            throw e;
        }

        ContainerRegistry registry = containerRegistryInstance.get();

        Map<String, String> containerNameMap = containerConfig.getContainerNameMap();
        Map<String, String> modeMap = containerConfig.getContainerModeMap();

        Domain domain = managementClient.createDomain(containerNameMap);
View Full Code Here

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

     * Update all Arquillian Containers in the Domain (group and server) with the new State.
     *
     * The Domain Controller can start/stop nodes outside of Arquillian's control.
     */
    private void updateDomainMembersState(State newState) {
        ContainerRegistry registry = containerRegistryInstance.get();
        Domain domain = domainInst.get();

        for (Server server : domain.getServers()) {
            registry.getContainer(server.getContainerName()).setState(newState);
        }

        for (ServerGroup group : domain.getServerGroups()) {
            registry.getContainer(group.getContainerName()).setState(newState);
        }
    }
View Full Code Here

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

     * The Group can start/stop nodes outside of Arquillian's control.
     */
    private void updateGroupMembersContainerState(State newState) {
        Set<Server> servers = domain.getServersInGroup(serverGroup);

        ContainerRegistry registry = containerRegistryInst.get();

        for (Server server : servers) {
            registry.getContainer(server.getContainerName()).setState(newState);
        }
    }
View Full Code Here

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

   }

   private void forEachDeployment(List<Deployment> deployments, Operation<Container, Deployment> operation) throws Exception
   {
      injector.get().inject(operation);
      ContainerRegistry containerRegistry = this.containerRegistry.get();
      if(containerRegistry == null)
      {
         return;
      }
      for(Deployment deployment: deployments)
      {
         Container container = containerRegistry.getContainer(deployment.getDescription().getTarget());
         operation.perform(container, deployment);
      }
   }
View Full Code Here

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

      return deployment;
   }

   private ContainerRegistry createRegistry(Manager manager)
   {
      ContainerRegistry registry = getFromContext(ContainerRegistry.class);
      if (registry != null)
         return registry;

      registry = manager.resolve(ContainerRegistry.class);
      validateRegistry(registry);
View Full Code Here

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

      DeploymentScenario scenario = deploymentScenario.get();
      if(scenario == null)
      {
         throw new IllegalArgumentException("No deployment scenario in context");
      }
      ContainerRegistry registry = containerRegistry.get();
      if(registry == null)
      {
         throw new IllegalArgumentException("No container registry in context");
      }
     
      Deployment deployment = scenario.deployment(new DeploymentTargetDescription(name));
      if(deployment == null)
      {
         throw new IllegalArgumentException("No deployment in context found with name " + name);
      }
     
      if (deployment.getDescription().managed())
      {
         throw new IllegalArgumentException("Could not deploy " + name + " deployment. The deployment is controlled by Arquillian");
      }
     
      Container container = registry.getContainer(deployment.getDescription().getTarget());
     
      if (!container.getState().equals(State.STARTED))
      {
         throw new IllegalArgumentException("Deployment with name " + name + " could not be deployed. Container " +
            container.getName() + " must be started first.");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.