services
or types
configuration of the request-response tutorial, but we will separate the modules in two applications configurations. We will: And two applications:ResponseModule
in one framework instanceRequestModule
in another framework instanceapplications.xml
XML files has to be modified. We will define one file for each framework. The code is not impacted.
ResponseModule
:<applications> <application name="responseAppli" id="2"> <deployment> <lib url="samplesResponse.jar" /> </deployment> <modules> <module name="ResponseModule" id="1" > <implementation path="org.da.samples.protoframework.response.ResponseModule" > <initEntryPoint method="init" /> <defaultReceiveEntryPoint method="subscribe" /> </implementation> <interfaces> <requestReceived service="request" /> </interfaces> </module> </modules> </application> </applications>
<files> <file url="applicationResponse.xml" /> <file url="services.xml" /> <file url="types.xml" /> </files>
RequestModule
:<applications> <application name="requestAppli" id="1"> <deployment> <lib url="samplesRequest.jar" /> </deployment> <modules> <module name="RequestModule" id="1" > <implementation path="org.da.samples.protoframework.request.RequestModule" > <initEntryPoint method="init" /> <defaultReceiveEntryPoint method="subscribe" /> </implementation> <interfaces> <requestSend service="request" timeOut="200000ms"/> </interfaces> </module> </modules> </application> </applications>
<files> <file url="applicationPublish.xml" /> <file url="services.xml" /> <file url="types.xml" /> </files>
java -jar protoframework.jar config=filelistResponse.xml
To start the Request framework instance, we use our second filelist configuration file for our configuration:
java -jar protoframework.jar config=filelistRequest.xml
However as the two framework instances do not communicate, nothing happens on the GUI for the moment when we send a request because it is not received by the reponse module.
request
Servicerequest
Service<network> <channel name="request" type="input" port="8080" size="1000"> <service name="request" /> </channel> <channel name="response" type="output" port="8081" size="1000"> <service name="request" /> </channel> </network>We also need to specify the Network file on our first filelist configuration file:
<files> <file url="applicationResponse.xml" /> <file url="services.xml" /> <file url="types.xml" /> <file url="networkResponse.xml" /> </files>
request
Servicerequest
Service<network> <channel name="request" type="output" port="8080" size="1000"> <service name="request" /> </channel> <channel name="response" type="input" port="8081" size="1000"> <service name="request" /> </channel> </network>We also need to specify the Network file on our first filelist configuration file:
<files> <file url="applicationRequest.xml" /> <file url="services.xml" /> <file url="types.xml" /> <file url="networkRequest.xml" /> </files>
java -jar protoframework.jar config=filelistResponse.xml
To start the Request framework instance, we use our second filelist configuration file for our configuration:
java -jar protoframework.jar config=filelistRequest.xml
Now the two applications are behaving exactly as for the request-response tutorial. Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence