基于 sequence/name 使用 soa ftp 适配器的文件排序

File sorting based on sequence/name using soa ftp adapter

目前,ftp 正在使用 属性 基于时间戳从其他服务器轮询文件:

新要求规定根据文件的名称或顺序轮询文件,这与使用时间戳不同。

目前,ftp soa 中的适配器提供两个属性

oracle.tip.adapter.file.inbound.listing.TimestampSorterAscending 按修改后的时间戳对文件名进行升序排序;

oracle.tip.adapter.file.inbound.listing.TimestampSorterDescending 根据修改后的时间戳对文件名进行降序排序

适配器配置如下:

<adapter-config name="##" adapter="FTP Adapter" wsdlLocation="##.wsdl" xmlns="http://platform.###">

  <connection-factory location="###" UIincludeWildcard=""/>
  <endpoint-activation portType="Get_ptt" operation="Get">
    <activation-spec className="###">
      <property name="DeleteFile" value="true"/>
      <property name="MinimumAge" value="0"/>
      <property name="PhysicalDirectory" value="##"/>
      <property name="Recursive" value="false"/>
      <property name="PollingFrequency" value="5"/>
      <property name="FileType" value="ascii"/>
      <property name="PhysicalArchiveDirectory" value=##"/>
      <property name="IncludeFiles" value=""/>
      <property name="UseHeaders" value="false"/>
      <property name="SingleThreadModel" value="true"/>
      <property name="MaxRaiseSize" value="50"/>
      <property name="ListSorter" value="oracle.tip.adapter.file.inbound.listing.TimestampSorterAscending"/>

    </activation-spec>
  </endpoint-activation>

</adapter-config>

感谢您的帮助。

我想文件的处理顺序很重要。如果是这样,我不会委托工作来确保文件适配器的顺序。我宁愿在后端处理这个。如果您不想或可以这样做:FTP 适配器始终按字母升序选取文件。

ftp 目前允许以下两种轮询策略选项:

--属性 名称="ListSorter" 值="oracle.tip.adapter.file.inbound.listing.TimestampSorterAscending"--

--属性 名称="ListSorter" 值="oracle.tip.adapter.file.inbound.listing.TimestampSorterDescending"--

ftp 适配器(.JCA 文件)中的这些属性允许 ftp 入站轮询策略基于时间戳,禁用此 属性 或删除此 属性从 .jca 文件或控制台启用默认轮询策略,即基于序列的轮询。

谢谢。