The Trigger File option of the File Adapter enabled us to tell the adapter when the file is ready to be picked up. For example, assume that you are writing a big file that will be picked up by the file adapter, then there might me a case that file adapter might pick up an incomplete file. To avoid this, there is an option to specify that as soon as the trigger file appears in the specified folder, parse the input file.
There is a catch here. By default, it works only once. By this I mean that if there is a file available to be picked up by the file adapter and its waiting for the trigger file, then as soon as trigger file comes up, the input file is picked up. However, now if you delete the trigger file, and place a new input data file, that file will be picked up again without waiting for the trigger file. This is the default option. To override this option, we need to add the following property in the file adapter's jca file:
There are 3 options for TriggerFileStrategy property:EndpointActivation, OnceOnly, EveryTime.
The details are available at:
http://technology.amis.nl/blog/9461/the-inbound-file-adapter-%E2%80%93-use-trigger-file
Note however that the trigger file is not deleted even if the file adapter is configured to delete the input file. The trigger file stays there. So, you need to take care of its deletion by yourself.
There is a catch here. By default, it works only once. By this I mean that if there is a file available to be picked up by the file adapter and its waiting for the trigger file, then as soon as trigger file comes up, the input file is picked up. However, now if you delete the trigger file, and place a new input data file, that file will be picked up again without waiting for the trigger file. This is the default option. To override this option, we need to add the following property in the file adapter's jca file:
<property name="TriggerFileStrategy" value="EveryTime"/>There are 3 options for TriggerFileStrategy property:EndpointActivation, OnceOnly, EveryTime.
The details are available at:
http://technology.amis.nl/blog/9461/the-inbound-file-adapter-%E2%80%93-use-trigger-file
Note however that the trigger file is not deleted even if the file adapter is configured to delete the input file. The trigger file stays there. So, you need to take care of its deletion by yourself.
anna kodiga telugu lo chepparade.........
ReplyDelete