org.jboss.arquillian.container.spi.client.deployment.Deployment.deployedWithError()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(198)

本文整理了Java中org.jboss.arquillian.container.spi.client.deployment.Deployment.deployedWithError()方法的一些代码示例,展示了Deployment.deployedWithError()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Deployment.deployedWithError()方法的具体详情如下:
包路径:org.jboss.arquillian.container.spi.client.deployment.Deployment
类名称:Deployment
方法名:deployedWithError

Deployment.deployedWithError介绍

暂无

代码示例

代码示例来源:origin: org.jboss.forge.furnace.test/arquillian-furnace-classpath

private void waitForDeploymentCompletion(Deployment deployment, final AddonId addonToDeploy, int quantity,
    TimeUnit unit)
    throws DeploymentException
{
 AddonRegistry registry = runnable.getForge().getAddonRegistry();
 Addon addon = registry.getAddon(addonToDeploy);
 try
 {
   Future<Void> future = addon.getFuture();
   if (!future.isDone())
   {
    future.get();
   }
   Addons.waitUntilStartedOrMissing(addon, quantity, unit);
 }
 catch (Exception e)
 {
   deployment.deployedWithError(e);
   throw new DeploymentException("AddonDependency " + addonToDeploy + " failed to deploy.", e);
 }
 if (addon.getStatus().isFailed())
 {
   DeploymentException e = new DeploymentException("AddonDependency " + addonToDeploy + " failed to deploy.");
   deployment.deployedWithError(e);
   throw new DeploymentException("AddonDependency " + addonToDeploy + " failed to deploy.", e);
 }
}

代码示例来源:origin: org.jboss.forge/arquillian-forge-classpath

deployment.deployedWithError(e);
throw e;

代码示例来源:origin: arquillian/arquillian-core

@Override
  public Void call() throws Exception {
    DeployableContainer<?> deployableContainer = event.getDeployableContainer();
    Deployment deployment = event.getDeployment();
    DeploymentDescription deploymentDescription = deployment.getDescription();
  
  /*
   * TODO: should the DeploymentDescription producer some how be automatically registered ?
   * Or should we just 'know' who is the first one to create the context
   */
    deploymentDescriptionProducer.set(deploymentDescription);
    deploymentProducer.set(deployment);
    deployEvent.fire(new BeforeDeploy(deployableContainer, deploymentDescription));
    try {
      if (deploymentDescription.isArchiveDeployment()) {
        protocolMetadata.set(deployableContainer.deploy(
          deploymentDescription.getTestableArchive() != null
            ? deploymentDescription.getTestableArchive() : deploymentDescription.getArchive()));
      } else {
        deployableContainer.deploy(deploymentDescription.getDescriptor());
      }
      deployment.deployed();
    } catch (Exception e) {
      deployment.deployedWithError(e);
      throw e;
    }
    deployEvent.fire(new AfterDeploy(deployableContainer, deploymentDescription));
    return null;
  }
});

代码示例来源:origin: org.jboss.arquillian.container/arquillian-container-impl-base

@Override
  public Void call() throws Exception {
    DeployableContainer<?> deployableContainer = event.getDeployableContainer();
    Deployment deployment = event.getDeployment();
    DeploymentDescription deploymentDescription = deployment.getDescription();
  
  /*
   * TODO: should the DeploymentDescription producer some how be automatically registered ?
   * Or should we just 'know' who is the first one to create the context
   */
    deploymentDescriptionProducer.set(deploymentDescription);
    deploymentProducer.set(deployment);
    deployEvent.fire(new BeforeDeploy(deployableContainer, deploymentDescription));
    try {
      if (deploymentDescription.isArchiveDeployment()) {
        protocolMetadata.set(deployableContainer.deploy(
          deploymentDescription.getTestableArchive() != null
            ? deploymentDescription.getTestableArchive() : deploymentDescription.getArchive()));
      } else {
        deployableContainer.deploy(deploymentDescription.getDescriptor());
      }
      deployment.deployed();
    } catch (Exception e) {
      deployment.deployedWithError(e);
      throw e;
    }
    deployEvent.fire(new AfterDeploy(deployableContainer, deploymentDescription));
    return null;
  }
});

相关文章