zoukankan      html  css  js  c++  java
  • 使用axis2时在temp文件产生大量缓存

    问题详细描述:

    解决在使用axis2时,每一次请求产生axis2jar临时文件,导致占用大量磁盘空间问题。

    解决方法1:

    在spring配置文件中采用构造注入:

    <bean id="axisConfigContext"
            class="org.apache.axis2.context.ConfigurationContextFactory"  
            factory-method ="createConfigurationContextFromFileSystem" >  
        < constructor-arg index ="0" >< null /></ constructor->arg>  
        < constructor-arg index ="1" >< null /></ constructor->arg>  
    </ bean>
    < bean id ="stub" class ="...Stub" scope ="prototype" >  
        < constructor-arg ref ="axisConfigContext" />  
    </ bean>  

    注:…Stub是对应项目中的stub类;

    解决方法2:

    采用代码的方式:

    private static ConfigurationContext configurationContext;  
        static {  
            try {  
                configurationContext = ConfigurationContextFactory  
                            .createConfigurationContextFromFileSystem(null, null);  
            } catch (AxisFault axisFault) {  
                axisFault.printStackTrace();  
            }  
    }  

    注:将生成的对象引入到stub类中。

  • 相关阅读:
    time模块
    time模块,计算时间差
    re模块
    Python之常用文件操作
    Django运行错误常见问题及解决方法1
    用JetBrains PyCharm 2017.2创建运行Django程序
    wsgi Python的WEB框架
    django模块安装环境变量
    Django
    DOM
  • 原文地址:https://www.cnblogs.com/wjc920/p/9256189.html
Copyright © 2011-2022 走看看