本文整理汇总了Java中org.jboss.as.controller.client.helpers.standalone.ServerDeploymentActionResult.getDeploymentException方法的典型用法代码示例。如果您正苦于以下问题:Java ServerDeploymentActionResult.getDeploymentException方法的具体用法?Java ServerDeploymentActionResult.getDeploymentException怎么用?Java ServerDeploymentActionResult.getDeploymentException使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jboss.as.controller.client.helpers.standalone.ServerDeploymentActionResult
的用法示例。
在下文中一共展示了ServerDeploymentActionResult.getDeploymentException方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setup
import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentActionResult; //导入方法依赖的package包/类
@Override
public void setup(final ManagementClient managementClient, final String containerId) throws Exception {
final ServerDeploymentManager manager = ServerDeploymentManager.Factory
.create(managementClient.getControllerClient());
final DeploymentPlan plan = manager.newDeploymentPlan()
.add(new File("src/test/resources/isolations/" + TEST_DS_XML)).andDeploy().build();
final Future<ServerDeploymentPlanResult> future = manager.execute(plan);
final ServerDeploymentPlanResult result = future.get(20, SECONDS);
final ServerDeploymentActionResult actionResult = result.getDeploymentActionResult(plan.getId());
if (actionResult != null) {
final Throwable deploymentException = actionResult.getDeploymentException();
if (deploymentException != null) {
throw new RuntimeException(deploymentException);
}
}
}
开发者ID:PacktPublishing,项目名称:Mastering-Java-EE-Development-with-WildFly,代码行数:17,代码来源:ReadUncommittedTestCase.java
示例2: setup
import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentActionResult; //导入方法依赖的package包/类
@Override
public void setup(final ManagementClient managementClient, final String containerId) throws Exception {
final ServerDeploymentManager manager = ServerDeploymentManager.Factory
.create(managementClient.getControllerClient());
final DeploymentPlan plan = manager.newDeploymentPlan()
.add(new File("src/test/resources/distributed/" + TEXTS_DS_XML)).andDeploy().build();
final Future<ServerDeploymentPlanResult> future = manager.execute(plan);
final ServerDeploymentPlanResult result = future.get(20, SECONDS);
final ServerDeploymentActionResult actionResult = result.getDeploymentActionResult(plan.getId());
if (actionResult != null) {
final Throwable deploymentException = actionResult.getDeploymentException();
if (deploymentException != null) {
throw new RuntimeException(deploymentException);
}
}
}
开发者ID:PacktPublishing,项目名称:Mastering-Java-EE-Development-with-WildFly,代码行数:17,代码来源:DistributedTestCase.java
示例3: setup
import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentActionResult; //导入方法依赖的package包/类
@Override
public void setup(final ManagementClient managementClient, final String containerId) throws Exception {
copy(new File("src/test/resources/application-users.properties").toPath(),
new File("target/wildfly-10.1.0.Final/standalone/configuration/application-users.properties")
.toPath(),
REPLACE_EXISTING);
copy(new File("src/test/resources/application-roles.properties").toPath(),
new File("target/wildfly-10.1.0.Final/standalone/configuration/application-roles.properties")
.toPath(),
REPLACE_EXISTING);
final ServerDeploymentManager manager = ServerDeploymentManager.Factory
.create(managementClient.getControllerClient());
final DeploymentPlan plan = manager.newDeploymentPlan().add(new File("src/test/resources/" + FORUMS_DS_XML))
.andDeploy().build();
final Future<ServerDeploymentPlanResult> future = manager.execute(plan);
final ServerDeploymentPlanResult result = future.get(20, SECONDS);
final ServerDeploymentActionResult actionResult = result.getDeploymentActionResult(plan.getId());
if (actionResult != null) {
final Throwable deploymentException = actionResult.getDeploymentException();
if (deploymentException != null) {
throw new RuntimeException(deploymentException);
}
}
}
开发者ID:PacktPublishing,项目名称:Mastering-Java-EE-Development-with-WildFly,代码行数:25,代码来源:ApplicationTestCase.java
示例4: deploy
import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentActionResult; //导入方法依赖的package包/类
@SuppressWarnings("ThrowableResultOfMethodCallIgnored")
private static void deploy(ServerDeploymentManager deploymentManager, String runtimeName, InputStream input) throws Throwable {
ServerDeploymentPlanResult planResult;
List<DeploymentAction> actions = new ArrayList<>();
DeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan();
AddDeploymentPlanBuilder addBuilder = builder.add(runtimeName, input);
actions.add(addBuilder.getLastAction());
builder = addBuilder.andDeploy();
actions.add(builder.getLastAction());
DeploymentPlan plan = builder.build();
Future<ServerDeploymentPlanResult> future = deploymentManager.execute(plan);
planResult = future.get();
for (DeploymentAction action : actions) {
ServerDeploymentActionResult actionResult = planResult.getDeploymentActionResult(action.getId());
if (actionResult.getDeploymentException() != null) {
throw actionResult.getDeploymentException();
}
}
}