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


Java AxisModule.getModuleClassLoader方法代码示例

本文整理汇总了Java中org.apache.axis2.description.AxisModule.getModuleClassLoader方法的典型用法代码示例。如果您正苦于以下问题:Java AxisModule.getModuleClassLoader方法的具体用法?Java AxisModule.getModuleClassLoader怎么用?Java AxisModule.getModuleClassLoader使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.axis2.description.AxisModule的用法示例。


在下文中一共展示了AxisModule.getModuleClassLoader方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import org.apache.axis2.description.AxisModule; //导入方法依赖的package包/类
public static void init(AxisConfiguration configuration) {
    classLoaders.put("system", configuration.getSystemClassLoader());
    classLoaders.put("axis2", ClassLoaderUtil.class.getClassLoader());
    for (Iterator iter = configuration.getServiceGroups(); iter.hasNext(); ) {
        AxisServiceGroup group = (AxisServiceGroup) iter.next();
        ClassLoader serviceGroupClassLoader = group.getServiceGroupClassLoader();
        if (serviceGroupClassLoader != null) {
            classLoaders.put(getServiceGroupMapKey(group), serviceGroupClassLoader);
        }
    }
    for (Object obj : configuration.getModules().values()) {
        AxisModule module = (AxisModule) obj;
        ClassLoader moduleClassLoader = module.getModuleClassLoader();
        if (moduleClassLoader != null) {
            classLoaders.put(getModuleMapKey(module), moduleClassLoader);
        }
    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:19,代码来源:ClassLoaderUtil.java

示例2: populateModule

import org.apache.axis2.description.AxisModule; //导入方法依赖的package包/类
private void populateModule(AxisModule module, URL moduleUrl) throws DeploymentException {
    try {
        ClassLoader classLoader = module.getModuleClassLoader();
        InputStream moduleStream = classLoader.getResourceAsStream("META-INF/module.xml");
        if (moduleStream == null) {
            moduleStream = classLoader.getResourceAsStream("meta-inf/module.xml");
        }
        if (moduleStream == null) {
            throw new DeploymentException(
                    Messages.getMessage(
                            DeploymentErrorMsgs.MODULE_XML_MISSING, moduleUrl.toString()));
        }
        ModuleBuilder moduleBuilder = new ModuleBuilder(moduleStream, module, axisConfig);
        moduleBuilder.populateModule();
    } catch (IOException e) {
        throw new DeploymentException(e);
    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:19,代码来源:DeploymentEngine.java

示例3: addModuleClassLoader

import org.apache.axis2.description.AxisModule; //导入方法依赖的package包/类
public static void addModuleClassLoader(AxisModule module) {
    ClassLoader moduleClassLoader = module.getModuleClassLoader();
    if (moduleClassLoader != null) {
        classLoaders.put(getModuleMapKey(module), moduleClassLoader);
    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:7,代码来源:ClassLoaderUtil.java

示例4: addNewModule

import org.apache.axis2.description.AxisModule; //导入方法依赖的package包/类
public static void addNewModule(AxisModule modulemetadata,
                                AxisConfiguration axisConfiguration) throws AxisFault {

    Flow inflow = modulemetadata.getInFlow();
    ClassLoader moduleClassLoader = modulemetadata.getModuleClassLoader();

    if (inflow != null) {
        Utils.addFlowHandlers(inflow, moduleClassLoader);
    }

    Flow outFlow = modulemetadata.getOutFlow();

    if (outFlow != null) {
        Utils.addFlowHandlers(outFlow, moduleClassLoader);
    }

    Flow faultInFlow = modulemetadata.getFaultInFlow();

    if (faultInFlow != null) {
        Utils.addFlowHandlers(faultInFlow, moduleClassLoader);
    }

    Flow faultOutFlow = modulemetadata.getFaultOutFlow();

    if (faultOutFlow != null) {
        Utils.addFlowHandlers(faultOutFlow, moduleClassLoader);
    }

    axisConfiguration.addModule(modulemetadata);
    log.debug(Messages.getMessage(DeploymentErrorMsgs.ADDING_NEW_MODULE));

    synchronized (axisConfiguration.getFaultyServicesDuetoModules()) {

        //Check whether there are faulty services due to this module
        HashMap<String, FaultyServiceData> faultyServices =
                (HashMap<String, FaultyServiceData>) axisConfiguration.getFaultyServicesDuetoModule(
                        modulemetadata.getName());
        faultyServices = (HashMap<String, FaultyServiceData>) faultyServices.clone();

        // Here iterating a cloned hashmap and modifying the original hashmap.
        // To avoid the ConcurrentModificationException.
        for (FaultyServiceData faultyServiceData : faultyServices.values()) {

            axisConfiguration.removeFaultyServiceDuetoModule(modulemetadata.getName(),
                    faultyServiceData
                            .getServiceGroup().getServiceGroupName());

            //Recover the faulty serviceGroup.
            addServiceGroup(faultyServiceData.getServiceGroup(),
                    faultyServiceData.getServiceList(),
                    faultyServiceData.getServiceLocation(),
                    faultyServiceData.getCurrentDeploymentFile(),
                    axisConfiguration);
        }
    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:57,代码来源:DeploymentEngine.java


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