当前位置: 首页>>代码示例>>Java>>正文


Java DeployableContainer.deploy方法代码示例

本文整理汇总了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);
        }
    }
}
 
开发者ID:wildfly,项目名称:wildfly-arquillian,代码行数:33,代码来源:ArquillianServiceDeployer.java

示例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);
    
}
 
开发者ID:arquillian,项目名称:arquillian-extension-moco,代码行数:12,代码来源:MockServerDeployer.java


注:本文中的org.jboss.arquillian.container.spi.client.container.DeployableContainer.deploy方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。