本文整理汇总了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);
}
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
}