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


Java Utils.getShortFileName方法代码示例

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


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

示例1: undeploy

import org.apache.axis2.deployment.util.Utils; //导入方法依赖的package包/类
public void undeploy(String fileName) {
    //find the hierarchical part of the service group name
    String serviceHierarchy = Utils.getServiceHierarchy(fileName, this.directory);
    fileName = serviceHierarchy + Utils.getShortFileName(fileName);
    try {
        AxisServiceGroup serviceGroup =
                axisConfig.removeServiceGroup(fileName);
        if(configCtx != null) {
            configCtx.removeServiceGroupContext(serviceGroup);
        }
        super.undeploy(fileName);
        log.info(Messages.getMessage(DeploymentErrorMsgs.SERVICE_REMOVED,
                fileName));
    } catch (AxisFault axisFault) {
        //May be a faulty service
        log.debug(Messages.getMessage(DeploymentErrorMsgs.FAULTY_SERVICE_REMOVAL,
                axisFault.getMessage()), axisFault);
        axisConfig.removeFaultyService(fileName);
    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:21,代码来源:JAXWSDeployer.java

示例2: undeploy

import org.apache.axis2.deployment.util.Utils; //导入方法依赖的package包/类
public void undeploy(String fileName) throws DeploymentException {
    try {
        super.undeploy(fileName);
        fileName = Utils.getShortFileName(fileName);
        axisConfig.removeServiceGroup(fileName);
        log.info(Messages.getMessage(DeploymentErrorMsgs.SERVICE_REMOVED, fileName));
    } catch (AxisFault axisFault) {
        axisConfig.removeFaultyService(fileName);
    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:11,代码来源:CorbaDeployer.java

示例3: unDeploy

import org.apache.axis2.deployment.util.Utils; //导入方法依赖的package包/类
public void unDeploy() {
        String serviceName = null;
        List undeployed = new ArrayList();
        for (int i = 0; i < wsToUnDeploy.size(); i++) {
            try {
                WSInfo wsInfo = (WSInfo)wsToUnDeploy.get(i);
                String fileName = Utils.getShortFileName(wsInfo.getFileName());
//                if (wsInfo.getType() == TYPE_SERVICE) {
                    if (isHotUpdate()) {
                        try {
                            serviceName = getAxisServiceName(fileName);
                            if (!undeployed.contains(serviceName)) {
                                realAxisConfig.removeServiceGroup(serviceName);
                                undeployed.add(serviceName);
                                // TODO: need a way to also remove the ServiceGroup from the ConfigContext.applicationSessionServiceGroupContextTable
                                log.info(Messages.getMessage(DeploymentErrorMsgs.SERVICE_REMOVED, serviceName));
                            }
                        } catch (AxisFault axisFault) {
                            // May be a faulty service
                            realAxisConfig.removeFaultyService(serviceName);
                            log.debug("removeFaultyService: " + fileName);
                        }
                    } else {
                        realAxisConfig.removeFaultyService(serviceName);
                        log.debug("not hotUpdate, removeFaultyService: " + fileName);
                    }
//                }
            } catch (Exception e) {
                log.warn(e);
            }
        }
        wsToUnDeploy.clear();
    }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:34,代码来源:ScriptDeploymentEngine.java

示例4: undeploy

import org.apache.axis2.deployment.util.Utils; //导入方法依赖的package包/类
public void undeploy(String fileName) throws DeploymentException {
    try {
        //find the hierarchical part of the service group name
        String serviceHierarchy = Utils.getServiceHierarchy(fileName, this.directory);
        fileName = Utils.getShortFileName(fileName);
        fileName = DeploymentEngine.getAxisServiceName(fileName);

        //attach the hierarchical part if it is not null
        if (serviceHierarchy != null) {
            fileName = serviceHierarchy + fileName;
        }
        AxisServiceGroup serviceGroup = axisConfig.removeServiceGroup(fileName);
        //Fixed - https://issues.apache.org/jira/browse/AXIS2-4610
        if (serviceGroup != null) {
            for (Iterator services = serviceGroup.getServices(); services.hasNext();) {
            AxisService axisService = (AxisService) services.next();
            ServiceLifeCycle serviceLifeCycle = axisService.getServiceLifeCycle();
            if (serviceLifeCycle != null) {
                serviceLifeCycle.shutDown(configCtx, axisService);
            }
        }
            configCtx.removeServiceGroupContext(serviceGroup);
            log.info(Messages.getMessage(DeploymentErrorMsgs.SERVICE_REMOVED,
                    fileName));
        } else {
            axisConfig.removeFaultyService(fileName);
        }
        super.undeploy(fileName);
    } catch (AxisFault axisFault) {
        //May be a faulty service
        axisConfig.removeFaultyService(fileName);

        throw new DeploymentException(axisFault);
    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:36,代码来源:ServiceDeployer.java


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