Search code examples
oracle-databasesortingftpmiddlewaresoa

File sorting based on sequence/name using soa ftp adapter


Currently, ftp is polling the files from the other server based on timestamp using property:

the new requirement states to poll the files based on their name or sequence unlike using timestamp.

currently, ftp adapter in soa offers two properties

  • List item

oracle.tip.adapter.file.inbound.listing.TimestampSorterAscending to sort the file names by their modified time stamps in ascending manner ;

oracle.tip.adapter.file.inbound.listing.TimestampSorterDescending to sort the file names by their modified time stamps in descending manner

The adapter configuration follows:

<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>

Appreciate your help.


Solution

  • The ftp currently allow two polling strategy options which are following:

    --property name="ListSorter" value="oracle.tip.adapter.file.inbound.listing.TimestampSorterAscending"--

    --property name="ListSorter" value="oracle.tip.adapter.file.inbound.listing.TimestampSorterDescending"--

    These properties in ftp adapters (.JCA files) allows ftp inbound polling strategy to be based on the timeStamp, disabling this property or removing this property from the .jca file or from console enable the by default polling strategy i.e. polling based on sequence.

    Thanks.