• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java DeploymentEngine类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.axis2.deployment.DeploymentEngine的典型用法代码示例。如果您正苦于以下问题:Java DeploymentEngine类的具体用法?Java DeploymentEngine怎么用?Java DeploymentEngine使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DeploymentEngine类属于org.apache.axis2.deployment包,在下文中一共展示了DeploymentEngine类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: createAdressedEnabledClientSide

import org.apache.axis2.deployment.DeploymentEngine; //导入依赖的package包/类
public static ServiceContext createAdressedEnabledClientSide(
        AxisService service) throws AxisFault {
    File file = getAddressingMARFile();
    TestCase.assertTrue(file.exists());
    ConfigurationContext configContext = ConfigurationContextFactory
            .createConfigurationContextFromFileSystem(
                    TestingUtils.prefixBaseDirectory("target/test-resources/integrationRepo"), null);
    AxisModule axisModule = DeploymentEngine.buildModule(file,
                                                         configContext.getAxisConfiguration());
    configContext.getAxisConfiguration().addModule(axisModule);

    configContext.getAxisConfiguration().addService(service);


    ServiceGroupContext serviceGroupContext =
            configContext.createServiceGroupContext(service.getAxisServiceGroup());
    return serviceGroupContext.getServiceContext(service);
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:19,代码来源:UtilServer.java


示例2: createAdressedEnabledClientSide

import org.apache.axis2.deployment.DeploymentEngine; //导入依赖的package包/类
public static ServiceContext createAdressedEnabledClientSide(
        AxisService service, String clientHome) throws AxisFault {
    File file = getAddressingMARFile();
    TestCase.assertTrue(file.exists());

    ConfigurationContext configContext = ConfigurationContextFactory
            .createConfigurationContextFromFileSystem(clientHome, null);
    AxisModule axisModule = DeploymentEngine.buildModule(file,
                                                         configContext.getAxisConfiguration());

    configContext.getAxisConfiguration().addModule(axisModule);
    // sysContext.getAxisConfiguration().engageModule(moduleDesc.getName());

    configContext.getAxisConfiguration().addService(service);

    return new ServiceGroupContext(configContext, service.getAxisServiceGroup())
            .getServiceContext(service);
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:19,代码来源:UtilServer.java


示例3: unregisterDeployer

import org.apache.axis2.deployment.DeploymentEngine; //导入依赖的package包/类
/**
 * Un-registers the Endpoint deployer.
 *
 * @param axisConfig         AxisConfiguration to which this deployer belongs
 * @param synapseEnvironment SynapseEnvironment to which this deployer belongs
 */
private void unregisterDeployer(AxisConfiguration axisConfig,
                                SynapseEnvironment synapseEnvironment)
        throws TenantAwareLoadBalanceEndpointException {
    if (axisConfig != null) {
        DeploymentEngine deploymentEngine = (DeploymentEngine) axisConfig
                .getConfigurator();
        String synapseConfigPath = ServiceBusUtils
                .getSynapseConfigAbsPath(synapseEnvironment
                        .getServerContextInformation());
        String endpointDirPath = synapseConfigPath + File.separator
                + MultiXMLConfigurationBuilder.ENDPOINTS_DIR;
        deploymentEngine.removeDeployer(endpointDirPath,
                ServiceBusConstants.ARTIFACT_EXTENSION);
    }
}
 
开发者ID:apache,项目名称:stratos,代码行数:22,代码来源:LoadBalancerServiceComponent.java


示例4: registerDeployer

import org.apache.axis2.deployment.DeploymentEngine; //导入依赖的package包/类
/**
 * Registers the Endpoint deployer.
 *
 * @param axisConfig         AxisConfiguration to which this deployer belongs
 * @param synapseEnvironment SynapseEnvironment to which this deployer belongs
 */
private void registerDeployer(AxisConfiguration axisConfig,
                              SynapseEnvironment synapseEnvironment)
        throws TenantAwareLoadBalanceEndpointException {
    SynapseConfiguration synCfg = synapseEnvironment
            .getSynapseConfiguration();
    DeploymentEngine deploymentEngine = (DeploymentEngine) axisConfig
            .getConfigurator();
    SynapseArtifactDeploymentStore deploymentStore = synCfg
            .getArtifactDeploymentStore();

    String synapseConfigPath = ServiceBusUtils
            .getSynapseConfigAbsPath(synapseEnvironment
                    .getServerContextInformation());
    String endpointDirPath = synapseConfigPath + File.separator
            + MultiXMLConfigurationBuilder.ENDPOINTS_DIR;

    for (Endpoint ep : synCfg.getDefinedEndpoints().values()) {
        if (ep.getFileName() != null) {
            deploymentStore.addRestoredArtifact(endpointDirPath
                    + File.separator + ep.getFileName());
        }
    }
    deploymentEngine.addDeployer(new EndpointDeployer(), endpointDirPath,
            ServiceBusConstants.ARTIFACT_EXTENSION);
}
 
开发者ID:apache,项目名称:stratos,代码行数:32,代码来源:LoadBalancerServiceComponent.java


示例5: createAdressedEnabledClientSide

import org.apache.axis2.deployment.DeploymentEngine; //导入依赖的package包/类
public static ServiceContext createAdressedEnabledClientSide(
        AxisService service) throws AxisFault {
    File file = getAddressingMARFile();
    TestCase.assertTrue(file.exists());
    ConfigurationContext configContext = ConfigurationContextFactory
            .createConfigurationContextFromFileSystem(
                    "target/test-resources/integrationRepo", null);
    AxisModule axisModule = DeploymentEngine.buildModule(file,
                                                         configContext.getAxisConfiguration());

    AxisConfiguration axisConfiguration = configContext.getAxisConfiguration();
    axisConfiguration.addModule(axisModule);
    axisConfiguration.addService(service);
    ServiceGroupContext serviceGroupContext =
            configContext.createServiceGroupContext((AxisServiceGroup) service.getParent());
    return serviceGroupContext.getServiceContext(service);
}
 
开发者ID:wso2,项目名称:carbon-data,代码行数:18,代码来源:UtilServer.java


示例6: deployService

import org.apache.axis2.deployment.DeploymentEngine; //导入依赖的package包/类
public void deployService(Object service) throws IOException {
    String artifactName = service + ".aar";
    File file = copyResourceToFileSystem(artifactName, artifactName);
    AxisServiceGroup serviceGroup = DeploymentEngine.loadServiceGroup(file, cfgCtx);
    cfgCtx.getAxisConfiguration().addServiceGroup(serviceGroup);

}
 
开发者ID:wso2,项目名称:product-ei,代码行数:8,代码来源:SampleAxis2Server.java


示例7: createClientConfigurationContext

import org.apache.axis2.deployment.DeploymentEngine; //导入依赖的package包/类
public static ConfigurationContext createClientConfigurationContext() throws AxisFault {
    File file = getAddressingMARFile();
    TestCase.assertTrue(file.exists());

    ConfigurationContext configContext =
            ConfigurationContextFactory .createConfigurationContextFromFileSystem(
                    TestingUtils.prefixBaseDirectory(Constants.TESTING_PATH +"/integrationRepo"),
                    TestingUtils.prefixBaseDirectory(Constants.TESTING_PATH + "/integrationRepo/conf/axis2.xml"));
    AxisModule axisModule = DeploymentEngine.buildModule(file,
                                                         configContext.getAxisConfiguration());
    configContext.getAxisConfiguration().addModule(axisModule);
    return configContext;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:14,代码来源:UtilServer.java


示例8: loadServiceGroup

import org.apache.axis2.deployment.DeploymentEngine; //导入依赖的package包/类
/**
 * Load a ServiceGroup having name <code>serviceGroupName</code>
 *
 * @param serviceGroupName
 * @param configCtx
 * @param tempDirectory
 * @throws Exception
 */
public static void loadServiceGroup(String serviceGroupName,
                                    ConfigurationContext configCtx,
                                    String tempDirectory) throws Exception {
    if (!serviceGroupName.endsWith(".aar")) {
        serviceGroupName += ".aar";
    }
    File serviceArchive;
    String axis2Repo = System.getProperty(Constants.AXIS2_REPO);
    if (isURL(axis2Repo)) {
        DataHandler dh = new DataHandler(new URL(axis2Repo + "services/" + serviceGroupName));
        String tempDirName =
                tempDirectory + File.separator +
                (System.currentTimeMillis() + RANDOM.nextDouble());
        if(!new File(tempDirName).mkdirs()) {
             throw new Exception("Could not create temp dir " + tempDirName);
        }
        serviceArchive = new File(tempDirName + File.separator + serviceGroupName);
        FileOutputStream out = null;
        try {
            out = new FileOutputStream(serviceArchive);
            dh.writeTo(out);
            out.close();
        } finally {
            if (out != null) {
                out.close();
            }
        }
    } else {
        serviceArchive = new File(axis2Repo + File.separator + "services" +
                                  File.separator + serviceGroupName);
    }
    if(!serviceArchive.exists()){
        throw new FileNotFoundException("File " + serviceArchive + " not found");
    }
    AxisServiceGroup asGroup =
            DeploymentEngine.loadServiceGroup(serviceArchive, configCtx);
    configCtx.getAxisConfiguration().addServiceGroup(asGroup);
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:47,代码来源:ClusteringUtils.java


示例9: createClientConfigurationContext

import org.apache.axis2.deployment.DeploymentEngine; //导入依赖的package包/类
public static ConfigurationContext createClientConfigurationContext() throws AxisFault {
    File file = getAddressingMARFile();
    TestCase.assertTrue(file.exists());

    ConfigurationContext configContext =
            ConfigurationContextFactory .createConfigurationContextFromFileSystem(
                    "target/test-resources/integrationRepo",
                    "target/test-resources/integrationRepo/conf/axis2.xml");
    AxisModule axisModule = DeploymentEngine.buildModule(file,
                                                         configContext.getAxisConfiguration());
    configContext.getAxisConfiguration().addModule(axisModule);
    return configContext;
}
 
开发者ID:wso2,项目名称:carbon-data,代码行数:14,代码来源:UtilServer.java


示例10: deployService

import org.apache.axis2.deployment.DeploymentEngine; //导入依赖的package包/类
public void deployService(Object service) throws IOException {
    String artifactName = service + ".aar";
    File file = copyResourceToFileSystem(artifactName, artifactName);
    AxisServiceGroup serviceGroup = DeploymentEngine.loadServiceGroup(file, cfgCtx);
    cfgCtx.getAxisConfiguration().addServiceGroup(serviceGroup);
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:7,代码来源:Axis2ServerManager.java


示例11: deploy

import org.apache.axis2.deployment.DeploymentEngine; //导入依赖的package包/类
private void deploy(HumanTaskBaseConfiguration taskConfig) throws HumanTaskDeploymentException {

        if (taskConfig != null) {
            /**
             * Creating AxisService for HI
             */
            if (log.isDebugEnabled()) {
                log.debug("Deploying task " + taskConfig.getName());
            }

            AxisService axisService;
            Definition wsdlDef = taskConfig.getWSDL();

            if (taskConfig instanceof TaskConfiguration) {
                //to get the task id as response
                wsdlDef.getPortType(taskConfig.getPortType()).getOperation(
                        taskConfig.getOperation(),
                        null, null).setStyle(OperationType.REQUEST_RESPONSE);
            } else {
                //ONE_WAY no feed back for NOTIFICATIONS
                wsdlDef.getPortType(taskConfig.getPortType()).getOperation(
                        taskConfig.getOperation(),
                        null, null).setStyle(OperationType.ONE_WAY);
            }

            WSDL11ToAxisServiceBuilder serviceBuilder = createAxisServiceBuilder(taskConfig, wsdlDef);

            try {
                axisService = createAxisService(serviceBuilder, taskConfig);
                ServiceConfigurationUtil.configureService(axisService,
                        taskConfig.getEndpointConfiguration(
                                taskConfig.getServiceName().getLocalPart(),
                                taskConfig.getPortName()),
                        getConfigContext());

                ArrayList<AxisService> serviceList = new ArrayList<AxisService>();
                serviceList.add(axisService);
                DeploymentEngine.addServiceGroup(createServiceGroupForService(axisService), serviceList,
                        null, null, getTenantAxisConfig());

                if (log.isDebugEnabled()) {
                    log.debug(" Published axis2 service " + axisService.getName() + " for task " + taskConfig.getName());
                }

            } catch (AxisFault axisFault) {

                String errMsg = "Error populating the service";
                log.error(errMsg);
                throw new HumanTaskDeploymentException(errMsg, axisFault);
            }

        }
    }
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:54,代码来源:HumanTaskStore.java


示例12: publishAxisService

import org.apache.axis2.deployment.DeploymentEngine; //导入依赖的package包/类
private BPELProcessProxy publishAxisService(ProcessConf processConfiguration, QName serviceName,
                                                String portName)
            throws AxisFault {
        // TODO: Need to fix this to suite multi-tenant environment
        // TODO: There is a problem in this, in this manner we can't have two axis services with
        // same QName
        BPELProcessProxy processProxy = new BPELProcessProxy(processConfiguration, bpelServer,
                serviceName, portName);
        ConfigurationContext tenantConfigCtx =
                getConfigurationContextFromProcessConfiguration(processConfiguration);

        AxisService axisService;
        try {
            axisService = AxisServiceUtils.createAxisService(tenantConfigCtx.getAxisConfiguration(),
                    processProxy);

            EndpointConfiguration endpointConfig =
                    ((ProcessConfigurationImpl) processConfiguration).getEndpointConfiguration(
                            new WSDL11Endpoint(serviceName, portName));

            ServiceConfigurationUtil.configureService(axisService, endpointConfig, tenantConfigCtx);

        } catch (AxisFault e) {
            log.error("Error occurred creating the axis service " + serviceName.toString());
            throw new DeploymentException("BPEL Package deployment failed.", e);
        }

        processProxy.setAxisService(axisService);
        removeBPELProcessProxyAndAxisService(processConfiguration.getDeployer(), serviceName, portName);
        services.put(processConfiguration.getDeployer(), serviceName, portName, processProxy);

        ArrayList<AxisService> serviceList = new ArrayList<AxisService>();
        serviceList.add(axisService);
        DeploymentEngine.addServiceGroup(createServiceGroupForService(axisService), serviceList,
                null, null, tenantConfigCtx.getAxisConfiguration());
//
        if (log.isDebugEnabled()) {
            log.debug("BPELProcessProxy created for process " + processConfiguration.getProcessId());
            log.debug("AxisService " + serviceName + " created for BPEL process " +
                    processConfiguration.getProcessId());
        }

        return processProxy;
    }
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:45,代码来源:BPELBindingContextImpl.java


示例13: ScriptRepositoryListener

import org.apache.axis2.deployment.DeploymentEngine; //导入依赖的package包/类
public ScriptRepositoryListener(DeploymentEngine deploymentEngine) {
    super(deploymentEngine, false);
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:4,代码来源:ScriptRepositoryListener.java


示例14: deploy

import org.apache.axis2.deployment.DeploymentEngine; //导入依赖的package包/类
public void deploy(DeploymentFileData deploymentFileData) {
    ClassLoader threadClassLoader = null;
    try {
        threadClassLoader = Thread.currentThread().getContextClassLoader();
        String groupName = deploymentFileData.getName();
        URL location = deploymentFileData.getFile().toURL();
        if (isJar(deploymentFileData.getFile())) {
            log.info("Deploying artifact : " + deploymentFileData.getAbsolutePath());
            ArrayList<URL> urls = new ArrayList<URL>();
            urls.add(deploymentFileData.getFile().toURL());
            urls.add(axisConfig.getRepository());

            // adding libs under jaxws deployment dir
            addJaxwsLibs(urls, axisConfig.getRepository().getPath() + directory);

            String webLocation = DeploymentEngine.getWebLocationString();
            if (webLocation != null) {
                urls.add(new File(webLocation).toURL());
            }
            ClassLoader classLoader = Utils.createClassLoader(
                    urls,
                    axisConfig.getSystemClassLoader(),
                    true,
                    (File) axisConfig.
                            getParameterValue(Constants.Configuration.ARTIFACTS_TEMP_DIR),
                    axisConfig.isChildFirstClassLoading());
            Thread.currentThread().setContextClassLoader(classLoader);

            List<String> classList = Utils.getListOfClasses(deploymentFileData);
            AxisServiceGroup serviceGroup = deployClasses(groupName, location, classLoader, classList);
            
            if(serviceGroup == null) {
                String msg = "Error while deploying JAX-WS jar: " +
                        location.toString() +
                        ". JAX-WS Service deployment failed.";
                log.error(msg);
                axisConfig.getFaultyServices().
                        put(deploymentFileData.getFile().getAbsolutePath(), msg);
            }
        }
        super.deploy(deploymentFileData);
    } catch (Throwable t) {
        log.debug(Messages.getMessage("stroringfaultyservice", t.getMessage()), t);
        storeFaultyService(deploymentFileData, t);
    } finally {
        if (threadClassLoader != null) {
            Thread.currentThread().setContextClassLoader(threadClassLoader);
        }
    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:51,代码来源:JAXWSDeployer.java


示例15: WSInfoList

import org.apache.axis2.deployment.DeploymentEngine; //导入依赖的package包/类
public WSInfoList(DeploymentEngine deploy_engine) {
    deploymentEngine = deploy_engine;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:4,代码来源:WSInfoList.java



注:本文中的org.apache.axis2.deployment.DeploymentEngine类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java CardView类代码示例发布时间:2022-05-22
下一篇:
Java KillApplicationRequestPBImpl类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap