Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The file binding example shows how components of ServiceMix can interact with the file system. This is important because many applications write files out to a directory on disk that and other applications may need access to. This application gives a simple example of how a ServiceMix component can read a file from the disk, process it into a normalized message, then send it via the NMR, to another ServiceMix component. The receiving component can then look at the message (which contains the file) and process it and write it out to another location on disk.

A hypothetical business scenario: An online wholesale distributor of books, CDs and books on tape, receives a nightly order from a retail store. The nightly order is transmitted to the distributor as a file and placed in a particular directory on disk. There is a ServiceMix component that continually scans that directory looking for order files. When it sees a file, it reads it in and processes it. It divides the order into separate orders for its suppliers, e.g., one order will be placed with the distributor's book supplier, one order will go to the CD supplier, etc. At some later point, the suppliers will log in and retrieve their files. This is not shown in this example.

The following diagram illustrates this:

Panel
borderColor#ccc
titleDepartment Store Distributor's Order Processing System
borderStylesolid

Image Added