0 Replies Latest reply on Sep 15, 2013 2:01 PM by Mirko Richter

    Custom file read/write process in Fuse ESB 7.1

    Mirko Richter Newbie

      Hi,

       

      i need to implement a custom file-based lock mechanism where i'm not sure if it is already supported by the file2 EIP Component. It presumes that for each file the existence of one process that reads from the file and one process that writes to the file. The following examples shortly explain the desired behaviour of the Reader- and the Writer-Process (access to file "CAMLAB.XML"):

       

      Writer-process:

      -     Writer process wants a lock on the file ?CAMLAB.XML?.

      -     Writer process verifies that file ?CAMLAB.XMR? does not exist.

      -     Writer process creates handshake file ?CAMLAB.XMW? to signal reader.

      -     Writer process verifies again that file ?CAMLAB.XMR? does not exist.

      -     Writer process writes data to ?CAMLAB.XML?.

      -     Writer process removes handshake file ?CAMLAB.XMW?.

       

      Reader-process:

      -     Reader process checks for presence of XML file ?CAMLAB.XML?.

      -     Reader process finishes when the XML file was not found.

      -     Reader process verifies that ?CAMLAB.XMW? does not exist.

      -     Reader process creates handshake file ?CAMLAB.XMR? to signal writer.

      -     Reader process verifies again that file ?CAMLAB.XMW? does not exist.

      -     Reader process reads data from ?CAMLAB.XML?.

      -     Reader process removes data file ?CAMLAB.XML?.

      -     Reader process removes handshake file ?CAMLAB.XMR?.

       

      My question is: What would be the preferred "fuse-ESB-way" to implemented such a behaviour? Would file2 be able to support these requirements? If not, is it possible (and would it make sense) to extend the file2 EIP component to fulfill the requirements above or would i have to write my own new EIP component?

       

      I would prefer to reuse as much as possible of file2 in such a case...

       

      Thanks in advance for any kind of help,

      Mirko