... | ... | @@ -136,32 +136,31 @@ public class SubscriberApplication { |
|
|
|
|
|
Define the code is not enough to run Cameo applications. We need to configure a Cameo server with the following configuration file:
|
|
|
<pre><code class="xml">
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
|
<config port="7000" max_applications="20" log_directory="logs" debug="ON" polling_time="100">
|
|
|
<config port="7000" max_applications="20" log_directory="logs" debug="ON" polling_time="100">
|
|
|
|
|
|
<applications>
|
|
|
<applications>
|
|
|
|
|
|
<!-- The C++ application with name pubcpp -->
|
|
|
<application name="pubcpp" stream="yes" log_directory="logs">
|
|
|
<start executable="pubcppapp"/>
|
|
|
</application>
|
|
|
<!-- The C++ application with name pubcpp -->
|
|
|
<application name="pubcpp" stream="yes" log_directory="logs">
|
|
|
<start executable="pubcppapp"/>
|
|
|
</application>
|
|
|
|
|
|
|
|
|
<!-- The Java application with name subpubjava -->
|
|
|
<application name="subpubjava" stream="yes">
|
|
|
<start executable="java" args="-classpath bin.jar:jeromq-0.3.6.jar:protobuf-java-2.5.0.jar fr.ill.ics.nappli.test.SubscriberApplication"/>
|
|
|
</application>
|
|
|
<!-- The Java application with name subpubjava -->
|
|
|
<application name="subpubjava" stream="yes">
|
|
|
<start executable="java" args="-classpath bin.jar:jeromq-0.3.6.jar:protobuf-java-2.5.0.jar fr.ill.ics.nappli.test.SubscriberApplication"/>
|
|
|
</application>
|
|
|
|
|
|
</applications>
|
|
|
</applications>
|
|
|
|
|
|
</config>
|
|
|
</config>
|
|
|
</code></pre>
|
|
|
|
|
|
A Cameo server configuration file contains the list of applications that can be started with their name, executable and other attributes. For example we can specify that the application will stream its standard and error outputs.
|
|
|
Now we have to start the *subpubjava* application. That can be realized manually by using the Cameo console:
|
|
|
Now we have to execute the *subpubjava* application. That can be realized manually by using the Cameo console:
|
|
|
<pre>
|
|
|
> nappli tcp://machine:7000 subpubjava start
|
|
|
> cmo -e tcp://machine:7000 exec subpubjava
|
|
|
</pre>
|
|
|
|
|
|
The server running with the endpoint tcp://machine:7000 starts *subpubjava*.
|
... | ... | |