简体   繁体   English

WSO2 ESB XSLT介体创建临时文件(从未清除)

[英]WSO2 ESB XSLT Mediator creates temp files (never cleaned)

I use WSO2 ESB 4.5.1 on Windows. 我在Windows上使用WSO2 ESB 4.5.1。 My problem is that the temp folder WSO2_HOME/tmp is growing up and never cleaned. 我的问题是临时文件夹WSO2_HOME/tmp正在增长并且从未清除。

I found out that the problem comes from the xslt mediator , everytime it transform a big xml file (~15kb) a new temp file is created. 我发现问题出在xslt介体上 ,每当它转换一个大xml文件(〜15kb)时,都会创建一个新的临时文件。

Does anyone have an idea why these tmp files are not cleaned up? 有谁知道为什么不清理这些tmp文件?

Proxy: 代理:

<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse" name="input" transports="vfs" startOnLoad="true" trace="disable">
    <parameter name="transport.PollInterval">5</parameter>
    <parameter name="transport.vfs.FileURI">vfs:file://C:/WSO2/Test/From</parameter>
    <parameter name="transport.vfs.FileNamePattern">.*[.].*</parameter>
    <parameter name="transport.vfs.ContentType">application/xml</parameter>
    <target faultSequence="errorSequence">
        <inSequence>
            <log level="full"/>
            <property name="ClientApiNonBlocking" scope="axis2" action="remove"/>
            <property name="OUT_ONLY" value="true"/>   
            <xslt key="avintis_xml_indent"/>
            <property name="transport.vfs.ReplyFileName" expression="fn:concat('out_', $trp:FILE_NAME, '.xml')" scope="transport"/>
            <send>
                <endpoint>
                    <address uri="vfs:file://C:/WSO2/Test/To"/>
                </endpoint>
            </send>
        </inSequence>
    </target>
</proxy>

XSLT: XSLT:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:avintis="http://www.avintis.com/esb"
  xmlns:urn="urn:hl7-org:v2xml" version="2.0"
  xmlns:payload="http://ws.apache.org/commons/ns/payload">
  <xsl:output method="xml" encoding="UTF-8" indent="yes"/>

  <xsl:template match="*|text()|@*">
    <xsl:copy>
      <xsl:apply-templates select="*|text()|@*"/>
    </xsl:copy>
  </xsl:template>

</xsl:stylesheet>

inputfile: 输入文件:

any xml file bigger than ~15kb

Seems temp files do not get cleaned up by the HouseKeeping Task. 临时文件似乎无法通过HouseKeeping任务清除。 To clean them using the housekeeping task you can configure it in the Carbon.xml as shown below. 要使用管家任务清洁它们,可以在Carbon.xml中对其进行配置,如下所示。

<WorkDirectory>${carbon.home}/tmp/work</WorkDirectory>

   <HouseKeeping>

       <AutoStart>true</AutoStart>

       <Interval>10</Interval>

       <MaxTempFileLifetime>30</MaxTempFileLifetime>
   </HouseKeeping>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM