本文整理汇总了Java中org.jboss.arquillian.container.spi.client.container.DeployableContainer.deploy方法的典型用法代码示例。如果您正苦于以下问题:Java DeployableContainer.deploy方法的具体用法?Java DeployableContainer.deploy怎么用?Java DeployableContainer.deploy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jboss.arquillian.container.spi.client.container.DeployableContainer
的用法示例。
在下文中一共展示了DeployableContainer.deploy方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doServiceDeploy
import org.jboss.arquillian.container.spi.client.container.DeployableContainer; //导入方法依赖的package包/类
public synchronized void doServiceDeploy(@Observes BeforeDeploy event, Container container, ServiceArchiveHolder archiveHolder) {
// already deployed?
if (serviceArchiveDeployed.contains(container.getName())) {
archiveHolder.deploymentExistsAndRemove(event.getDeployment().getName()); // cleanup
return;
}
// only deploy the service if the deployment has been enriched by the jmx-as7 protocol
if (archiveHolder.deploymentExistsAndRemove(event.getDeployment().getName())) {
JavaArchive serviceArchive = (JavaArchive) archiveHolder.getArchive();
try {
log.infof("Deploy arquillian service: %s", serviceArchive);
final Map<String, String> props = container.getContainerConfiguration().getContainerProperties();
//MASSIVE HACK
//write the management connection props to the archive, so we can access them from the server
final ByteArrayOutputStream bytes = new ByteArrayOutputStream();
ObjectOutputStream out = new ObjectOutputStream(bytes);
out.writeObject(props.get("managementPort"));
out.writeObject(NetworkUtils.formatPossibleIpv6Address(props.get("managementAddress")));
out.writeObject(NetworkUtils.formatPossibleIpv6Address(props.get("managementProtocol")));
out.writeObject(props.get("authenticationConfig"));
out.close();
serviceArchive.addAsManifestResource(new ByteArrayAsset(bytes.toByteArray()), "org.jboss.as.managementConnectionProps");
DeployableContainer<?> deployableContainer = container.getDeployableContainer();
deployableContainer.deploy(serviceArchive);
serviceArchiveDeployed.add(container.getName());
} catch (Throwable th) {
log.error("Cannot deploy arquillian service", th);
}
}
}
示例2: executeBeforeDeploy
import org.jboss.arquillian.container.spi.client.container.DeployableContainer; //导入方法依赖的package包/类
public void executeBeforeDeploy(@Observes AfterDeploy event) throws DeploymentException {
if(mockServerWebArchive == null){
resolveMockServerArchive();
}
DeployableContainer<?> deployableContainer = event.getDeployableContainer();
deployableContainer.deploy(this.mockServerWebArchive);
}