PublishModule module increments or decrements a value cyclicallyEventModule module allows to click on a toggle to set if the first module should increment or decrement the value, and shows the valueservices or types configuration of the first tutorial, but we will separate the modules in two applications configurations. We will:EventModule in one framework instancePublishModule in another framework instance
applications.xml XML files has to be modified. We will define one file for each framework. The code is not impacted.
EventModule:<applications> <application name="eventAppli"> <deployment> <lib url="samplesEvent.jar" /> </deployment> <modules> <module name="EventModule" id="1" > <implementation path="org.da.samples.protoframework.event.EventModule" > <initEntryPoint method="init" /> <defaultReceiveEntryPoint method="subscribe" /> </implementation> <interfaces> <eventSend service="event" attach="attach"/> <subscribe service="published" /> </interfaces> </module> </modules> </application> </applications>
<files> <file url="applicationEvent.xml" /> <file url="services.xml" /> <file url="types.xml" /> </files>
PublishModule:<applications> <application name="publishAppli"> <deployment> <lib url="samplesPublish.jar" /> </deployment> <modules> <module name="PublishModule"> <implementation path="org.da.samples.protoframework.publish.PublishModule" > <initEntryPoint method="init" /> <defaultReceiveEntryPoint method="subscribe" /> <defaultSendEntryPoint method="publish" /> </implementation> <interfaces> <eventReceived service="event"/> <cyclic service="published" frequency="200ms" attach="attach"/> </interfaces> </module> </modules> </application> </applications>
<files> <file url="applicationPublish.xml" /> <file url="services.xml" /> <file url="types.xml" /> </files>
java -jar protoframework.jar config=filelistEvent.xml
To start the second framework instance, we use our second filelist configuration file for our configuration:
java -jar protoframework.jar config=filelistPublish.xml
However as the two framework instances do not communicate, nothing happens on the GUI for the moment:
event Servicepublish Service
<network> <channel name="event" type="output" port="8080" size="1000"> <service name="event" /> </channel> <channel name="publish" type="input" port="8081" size="1000"> <service name="published" /> </channel> </network>We also need to specify the Network file on our first filelist configuration file:
<files> <file url="applicationEvent.xml" /> <file url="services.xml" /> <file url="types.xml" /> <file url="networkEvent.xml" /> </files>
event Servicepublish Service
<network> <channel name="event" type="input" port="8080" size="1000"> <service name="event" /> </channel> <channel name="publish" type="output" port="8081" size="1000"> <service name="published" /> </channel> </network>We also need to specify the Network file on our second filelist configuration file:
<files> <file url="applicationEvent.xml" /> <file url="services.xml" /> <file url="types.xml" /> <file url="networkPublish.xml" /> </files>
java -jar protoframework.jar config=filelistEvent.xml
To start the second framework instance, we use our second filelist configuration file for our configuration:
java -jar protoframework.jar config=filelistPublish.xml
Now the two applications are behaving exactly as for the first tutorial.Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence