JayCE

[enterprise integration server]

Reading messages from file and exchange a value

The following example configuration creates a component to read a file line by line. In every line(=message) it search for "test" and replace it by "real"

<configuration>
<system>
<name>Test System Kommserver</name>
<controller>org.jayce.system.plugins.controller.RMIController</controller>
<!-- <controller>org.jayce.system.plugins.controller.DummyController</controller> -->
<errorhandler active="true">
<classname>org.jayce.system.plugins.errorhandler.Log4JErrorHandler</classname>
</errorhandler>
<errorhandler active="true">
<classname>org.jayce.system.plugins.errorhandler.StdioErrorHandler</classname>
</errorhandler>
</system>

<components>

<component active="true">
<name>FileReader</name>
<classname>org.jayce.system.components.receiver.FileReceiver</classname>
<property name="Filename" value="/home/devel/test.msg"/>
</component>

<component active="true">
<name>StringReplacer</name>
<classname>org.jayce.system.components.processor.RegExpScriptProcessor</classname>
<property name="FindPattern" value="test"/>
<property name="ReplaceWith" value="real"/>
</component>

</components>

<chains>
<chain active="true">
<input>FileReader</input>
<output>StringReplacer</output>
</chain>
</chains>
</configuration>
SourceForge.net Logo