diff options
Diffstat (limited to 'modules/CIAO/examples/Hello/descriptors')
12 files changed, 1352 insertions, 0 deletions
diff --git a/modules/CIAO/examples/Hello/descriptors/Aliased_Map.dat b/modules/CIAO/examples/Hello/descriptors/Aliased_Map.dat new file mode 100644 index 00000000000..30e6930c2a3 --- /dev/null +++ b/modules/CIAO/examples/Hello/descriptors/Aliased_Map.dat @@ -0,0 +1,2 @@ +SenderNode corbaloc:iiop:localhost:60001/Alias.NodeManager +ReceiverNode corbaloc:iiop:localhost:60001/Alias.NodeManager
\ No newline at end of file diff --git a/modules/CIAO/examples/Hello/descriptors/DeploymentPlan.cdp b/modules/CIAO/examples/Hello/descriptors/DeploymentPlan.cdp new file mode 100644 index 00000000000..fb0bf963c32 --- /dev/null +++ b/modules/CIAO/examples/Hello/descriptors/DeploymentPlan.cdp @@ -0,0 +1,361 @@ +<Deployment:DeploymentPlan + xmlns:Deployment="http://www.omg.org/Deployment" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd"> + <label>Hello_Deployment_1</label> + <UUID>Hello_Deployment_1</UUID> + + <!-- Implementations declarations --> + + <!-- Home implementation --> + <implementation xmi:id="Hello_ReceiverHomeImplementation"> + <name>Hello_ReceiverHomeImplementation</name> + <source/> + <artifact xmi:idref="Hello_Receiver_ExecArtifact" /> + <artifact xmi:idref="Hello_Receiver_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see 10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Hello_ReceiverHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Hello_ReceiverHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Hello_Receiver_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Hello_Receiver_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="Hello_ReceiverComponentImplementation"> + <name>Hello_ReceiverComponentImplementation</name> + <source/> + <artifact xmi:idref="Hello_Receiver_ExecArtifact" /> + <artifact xmi:idref="Hello_Receiver_SvntArtifact" /> + </implementation> + + <implementation xmi:id="Hello_SenderHomeImplementation"> + <name>Hello_SenderHomeImplementation</name> + <source/> + <artifact xmi:idref="Hello_Sender_ExecArtifact" /> + <artifact xmi:idref="Hello_Sender_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see 10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Hello_SenderHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Hello_SenderHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Hello_Sender_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Hello_Sender_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="Hello_SenderComponentImplementation"> + <name>Hello_SenderComponentImplementation</name> + <source/> + <artifact xmi:idref="Hello_Sender_ExecArtifact" /> + <artifact xmi:idref="Hello_Sender_SvntArtifact" /> + </implementation> + + <instance xmi:id="Hello_ReceiverHomeInstance"> + <name>Hello_ReceiverHome</name> + <node>ReceiverNode</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="Hello_ReceiverHomeImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.InstanceIOR</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ReceiverHome.ior</string> + </value> + </value> + </configProperty> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.RegisterNaming</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ReceiverHome</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="Hello_ReceiverComponentInstance"> + <name>Hello_ReceiverComponent</name> + <node>ReceiverNode</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="Hello_ReceiverComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Hello_ReceiverHome</string> + </value> + </value> + </configProperty> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.InstanceIOR</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Receiver.ior</string> + </value> + </value> + </configProperty> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.RegisterNaming</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Receiver</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="Hello_SenderHomeInstance"> + <name>Hello_SenderHome</name> + <node>SenderNode</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="Hello_SenderHomeImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.InstanceIOR</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SenderHome.ior</string> + </value> + </value> + </configProperty> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.RegisterNaming</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SenderHome</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="Hello_SenderComponentInstance"> + <name>Hello_SenderComponent</name> + <node>SenderNode</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="Hello_SenderComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Hello_SenderHome</string> + </value> + </value> + </configProperty> + <configProperty> + <name>local_message</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>hello, world!</string> + </value> + </value> + </configProperty> + <configProperty> + <name>color</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>COLOR_SELECTION</name> + <typeId>IDL:Hello/COLOR_SELECTION:1.0</typeId> + <member>empty</member> + <member>white</member> + <member>red</member> + <member>yellow</member> + </enum> + </type> + <value> + <enum>yellow</enum> + </value> + </value> + </configProperty> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.InstanceIOR</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Sender.ior</string> + </value> + </value> + </configProperty> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.RegisterNaming</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Sender</string> + </value> + </value> + </configProperty> + </instance> + + <connection> + <name>MessageConnection</name> + <internalEndpoint> + <portName>read_message</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="Hello_ReceiverComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>push_message</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="Hello_SenderComponentInstance" /> + </internalEndpoint> + </connection> + + <connection> + <name>EventConnection</name> + <internalEndpoint> + <portName>click_out</portName> + <provider>false</provider> + <kind>EventPublisher</kind> + <instance xmi:idref="Hello_SenderComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>click_in</portName> + <provider>true</provider> + <kind>EventConsumer</kind> + <instance xmi:idref="Hello_ReceiverComponentInstance" /> + </internalEndpoint> + </connection> + + <!-- Artifacts declarations --> + <artifact xmi:id="Hello_Receiver_ExecArtifact"> + <name>Hello_Receiver_exec</name> + <source/> + <node/> + <location>Hello_Receiver_exec</location> + </artifact> + <artifact xmi:id="Hello_Receiver_SvntArtifact"> + <name>Hello_Receiver_svnt</name> + <source/> + <node/> + <location>Hello_Receiver_svnt</location> + </artifact> + + <artifact xmi:id="Hello_Sender_ExecArtifact"> + <name>Hello_Sender_exec</name> + <source/> + <node/> + <location>Hello_Sender_exec</location> + </artifact> + <artifact xmi:id="Hello_Sender_SvntArtifact"> + <name>Hello_Sender_svnt</name> + <source/> + <node/> + <location>Hello_Sender_svnt</location> + </artifact> + +</Deployment:DeploymentPlan> diff --git a/modules/CIAO/examples/Hello/descriptors/DeploymentPlan_without_ns.cdp b/modules/CIAO/examples/Hello/descriptors/DeploymentPlan_without_ns.cdp new file mode 100644 index 00000000000..6d5b3f05780 --- /dev/null +++ b/modules/CIAO/examples/Hello/descriptors/DeploymentPlan_without_ns.cdp @@ -0,0 +1,317 @@ +<Deployment:DeploymentPlan + xmlns:Deployment="http://www.omg.org/Deployment" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd"> + <label>Hello_Deployment_1</label> + <UUID>Hello_Deployment_1</UUID> + + <!-- Implementations declarations --> + + <!-- Home implementation --> + <implementation xmi:id="Hello_ReceiverHomeImplementation"> + <name>Hello_ReceiverHomeImplementation</name> + <source/> + <artifact xmi:idref="Hello_Receiver_ExecArtifact" /> + <artifact xmi:idref="Hello_Receiver_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see 10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Hello_ReceiverHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Hello_ReceiverHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Hello_Receiver_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Hello_Receiver_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="Hello_ReceiverComponentImplementation"> + <name>Hello_ReceiverComponentImplementation</name> + <source/> + <artifact xmi:idref="Hello_Receiver_ExecArtifact" /> + <artifact xmi:idref="Hello_Receiver_SvntArtifact" /> + </implementation> + + <implementation xmi:id="Hello_SenderHomeImplementation"> + <name>Hello_SenderHomeImplementation</name> + <source/> + <artifact xmi:idref="Hello_Sender_ExecArtifact" /> + <artifact xmi:idref="Hello_Sender_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see 10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Hello_SenderHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Hello_SenderHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Hello_Sender_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Hello_Sender_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="Hello_SenderComponentImplementation"> + <name>Hello_SenderComponentImplementation</name> + <source/> + <artifact xmi:idref="Hello_Sender_ExecArtifact" /> + <artifact xmi:idref="Hello_Sender_SvntArtifact" /> + </implementation> + + <instance xmi:id="Hello_ReceiverHomeInstance"> + <name>Hello_ReceiverHome</name> + <node>ReceiverNode</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="Hello_ReceiverHomeImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.InstanceIOR</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>ReceiverHome.ior</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="Hello_ReceiverComponentInstance"> + <name>Hello_ReceiverComponent</name> + <node>ReceiverNode</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="Hello_ReceiverComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Hello_ReceiverHome</string> + </value> + </value> + </configProperty> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.InstanceIOR</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Receiver.ior</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="Hello_SenderHomeInstance"> + <name>Hello_SenderHome</name> + <node>SenderNode</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="Hello_SenderHomeImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.InstanceIOR</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SenderHome.ior</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="Hello_SenderComponentInstance"> + <name>Hello_SenderComponent</name> + <node>SenderNode</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="Hello_SenderComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Hello_SenderHome</string> + </value> + </value> + </configProperty> + <configProperty> + <name>local_message</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>hello, world!</string> + </value> + </value> + </configProperty> + <configProperty> + <name>color</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>COLOR_SELECTION</name> + <typeId>IDL:Hello/COLOR_SELECTION:1.0</typeId> + <member>empty</member> + <member>white</member> + <member>red</member> + <member>yellow</member> + </enum> + </type> + <value> + <enum>yellow</enum> + </value> + </value> + </configProperty> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.InstanceIOR</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Sender.ior</string> + </value> + </value> + </configProperty> + </instance> + + <connection> + <name>MessageConnection</name> + <internalEndpoint> + <portName>read_message</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="Hello_ReceiverComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>push_message</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="Hello_SenderComponentInstance" /> + </internalEndpoint> + </connection> + + <connection> + <name>EventConnection</name> + <internalEndpoint> + <portName>click_out</portName> + <provider>false</provider> + <kind>EventPublisher</kind> + <instance xmi:idref="Hello_SenderComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>click_in</portName> + <provider>true</provider> + <kind>EventConsumer</kind> + <instance xmi:idref="Hello_ReceiverComponentInstance" /> + </internalEndpoint> + </connection> + + <!-- Artifacts declarations --> + <artifact xmi:id="Hello_Receiver_ExecArtifact"> + <name>Hello_Receiver_exec</name> + <source/> + <node/> + <location>Hello_Receiver_exec</location> + </artifact> + <artifact xmi:id="Hello_Receiver_SvntArtifact"> + <name>Hello_Receiver_svnt</name> + <source/> + <node/> + <location>Hello_Receiver_svnt</location> + </artifact> + + <artifact xmi:id="Hello_Sender_ExecArtifact"> + <name>Hello_Sender_exec</name> + <source/> + <node/> + <location>Hello_Sender_exec</location> + </artifact> + <artifact xmi:id="Hello_Sender_SvntArtifact"> + <name>Hello_Sender_svnt</name> + <source/> + <node/> + <location>Hello_Sender_svnt</location> + </artifact> + +</Deployment:DeploymentPlan> diff --git a/modules/CIAO/examples/Hello/descriptors/Domain.cdd b/modules/CIAO/examples/Hello/descriptors/Domain.cdd new file mode 100644 index 00000000000..882b29724cd --- /dev/null +++ b/modules/CIAO/examples/Hello/descriptors/Domain.cdd @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<Deployment:Domain + xmlns:Deployment="http://www.omg.org/Deployment" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd"> +<label>Hello Domain</label> +<UUID>effd4bd0-6db0-4c50-9bb7-db9decebae1c</UUID> +<node> + <name>Sender</name> + <label>Sender's Node</label> +</node> +<node> + <name>Receiver</name> + <label>Receiver's Node</label> +</node> +</Deployment:Domain> diff --git a/modules/CIAO/examples/Hello/descriptors/Hello.pcd b/modules/CIAO/examples/Hello/descriptors/Hello.pcd new file mode 100644 index 00000000000..a0f5051444a --- /dev/null +++ b/modules/CIAO/examples/Hello/descriptors/Hello.pcd @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no" ?> +<Deployment:PackageConfiguration +xmlns:Deployment="http://www.omg.org/Deployment" +xmlns:xmi="http://www.omg.org/XMI" +xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd"> + <label>Hello Example Configuration for Unix machines</label> + <UUID>559d65e8-0407-48c0-a158-dafe21360fef</UUID> + <basePackage href="Hello.cpd"/> +</Deployment:PackageConfiguration> diff --git a/modules/CIAO/examples/Hello/descriptors/NodeManagerMap.dat b/modules/CIAO/examples/Hello/descriptors/NodeManagerMap.dat new file mode 100644 index 00000000000..fb390806728 --- /dev/null +++ b/modules/CIAO/examples/Hello/descriptors/NodeManagerMap.dat @@ -0,0 +1,4 @@ +SenderNode corbaloc:iiop:localhost:60001/Sender.NodeManager + + +ReceiverNode corbaloc:iiop:localhost:60002/Receiver.NodeManager
\ No newline at end of file diff --git a/modules/CIAO/examples/Hello/descriptors/package.tpd b/modules/CIAO/examples/Hello/descriptors/package.tpd new file mode 100644 index 00000000000..d447a2abb4a --- /dev/null +++ b/modules/CIAO/examples/Hello/descriptors/package.tpd @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no" ?> +<Deployment:TopLevelPackageDescription +xmlns:Deployment="http://www.omg.org/Deployment" +xmlns:xmi="http://www.omg.org/XMI" +xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd"> + <package href="Hello.pcd"/> +</Deployment:TopLevelPackageDescription> diff --git a/modules/CIAO/examples/Hello/descriptors/run_NodeDaemons.pl b/modules/CIAO/examples/Hello/descriptors/run_NodeDaemons.pl new file mode 100755 index 00000000000..2baf6b0cb0b --- /dev/null +++ b/modules/CIAO/examples/Hello/descriptors/run_NodeDaemons.pl @@ -0,0 +1,43 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# $Id$ +# -*- perl -*- + +use lib "$ENV{ACE_ROOT}/bin"; +use PerlACE::Run_Test; + +$status = 0; +$iorfile1 = PerlACE::LocalFile ("NodeApp1.ior"); +$iorfile2 = PerlACE::LocalFile ("NodeApp2.ior"); + +#for ($iter = 0; $iter <= $#ARGV; $iter++) { +# if ($ARGV[$iter] eq "-h" || $ARGV[$iter] eq "-?") { +# print "Run_Test Perl script for NodeApplicationTest \n\n"; +# print "run_test \n"; +# print "\n"; +# print "-h -- prints this information\n"; +# exit 0; +# } +#} + + +unlink $iorfile1; +unlink $iorfile2; + +$CIAO_ROOT=$ENV{'CIAO_ROOT'}; +$DANCE_ROOT = "$ENV{'DANCE_ROOT'}"; + +PerlACE::add_lib_path ('../lib'); + +$SV1 = new PerlACE::Process ("$DANCE_ROOT/bin/dance_node_manager", + "-ORBEndpoint iiop://localhost:60001 -s $CIAO_ROOT/bin/ciao_componentserver -n Sender=NodeApp1.ior -t 30 --instance-nc corbaloc:rir:/NameService"); + +$SV2 = new PerlACE::Process ("$DANCE_ROOT/bin/dance_node_manager", + "-ORBEndpoint iiop://localhost:60002 -s $CIAO_ROOT/bin/ciao_componentserver -n Receiver=NodeApp2.ior -t 30 --instance-nc corbaloc:rir:/NameService"); + +$SV1->Spawn (); +$SV2->Spawn (); + +sleep (99999999999); diff --git a/modules/CIAO/examples/Hello/descriptors/run_test.pl b/modules/CIAO/examples/Hello/descriptors/run_test.pl new file mode 100755 index 00000000000..a34d57731eb --- /dev/null +++ b/modules/CIAO/examples/Hello/descriptors/run_test.pl @@ -0,0 +1,205 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# $Id$ +# -*- perl -*- + +use lib "$ENV{'ACE_ROOT'}/bin"; +use PerlACE::Run_Test; + +$CIAO_ROOT = "$ENV{'CIAO_ROOT'}"; +$TAO_ROOT = "$ENV{'TAO_ROOT'}"; +$DAnCE = "$ENV{'DANCE_ROOT'}"; + +$daemons_running = 0; +$em_running = 0; +$ns_running = 0; + +$daemons = 2; +@ports = ( 60001, 60002 ); +@iorfiles = ( "NodeApp1.ior", "NodeApp2.ior" ); +@nodenames = ( "Sender", "Receiver" ); + +$status = 0; +$dat_file = "NodeManagerMap.dat"; +$cdp_file = "DeploymentPlan.cdp"; + +$controller_exec = "$CIAO_ROOT/examples/Hello/Sender/starter"; + +$nsior = PerlACE::LocalFile ("ns.ior"); + +PerlACE::add_lib_path ('../lib'); + +unlink $nsior; + +$E = 0; +$EM = 0; + +# Delete if there are any .ior files. +sub delete_ior_files { + for ($i = 0; $i < $daemons; ++$i) { + unlink $iorfiles[$i]; + } + unlink PerlACE::LocalFile ("EM.ior"); + unlink PerlACE::LocalFile ("Receiver.ior"); + unlink PerlACE::LocalFile ("Sender.ior"); + unlink PerlACE::LocalFile ("DAM.ior"); + unlink PerlACE::LocalFile ("ns.ior"); +} + +sub kill_node_daemons { + for ($i = 0; $i < $daemons; ++$i) { + $Daemons[$i]->Kill (); $Daemons[$i]->TimedWait (1); + } +} + +sub kill_open_processes { + if ($daemons_running == 1) { + kill_node_daemons (); + } + + if ($em_running == 1) { + $EM->Kill (); + $EM->TimedWait (1); + } + + if ($ns_running == 1) { + $NS->Kill (); + $NS->TimedWait (1); + } + +} + +sub run_node_daemons { + for ($i = 0; $i < $daemons; ++$i) + { + $iorfile = $iorfiles[$i]; + $port = $ports[$i]; + $nodename = $nodenames[$i]; + $iiop = "iiop://localhost:$port"; + $node_app = "$CIAO_ROOT/bin/ciao_componentserver"; + + $d_cmd = "$DAnCE/bin/dance_node_manager"; + $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --instance-nc corbaloc:rir:/NameService"; + + print "Run dance_node_manager with $d_param\n"; + + $Daemons[$i] = new PerlACE::Process ($d_cmd, $d_param); + $result = $Daemons[$i]->Spawn (); + push(@processes, $Daemons[$i]); + + if (PerlACE::waitforfile_timed ($iorfile, + 30) == -1) { + print STDERR + "ERROR: The ior $iorfile file of node daemon $i could not be found\n"; + for (; $i >= 0; --$i) { + $Daemons[$i]->Kill (); $Daemons[$i]->TimedWait (1); + } + return -1; + } + } + return 0; +} + +delete_ior_files (); + +# Invoke naming service + +$NS = new PerlACE::Process ("$TAO_ROOT/orbsvcs/Naming_Service/Naming_Service", "-m 0 -ORBEndpoint iiop://localhost:60003 -o ns.ior"); + +$NS->Spawn (); + +print STDERR "Starting Naming Service with -m 0 -ORBEndpoint iiop://localhost:60003 -o ns.ior\n"; + +if (PerlACE::waitforfile_timed ($nsior, $PerlACE::wait_interval_for_process_creation) == -1) +{ + print STDERR "ERROR: cannot find naming service IOR file\n"; + $NS->Kill (); + exit 1; +} + +$ns_running = 1; + +# Set up NamingService environment +$ENV{"NameServiceIOR"} = "corbaloc:iiop:localhost:60003/NameService"; + + +# Invoke node daemons. +print "Invoking node daemons\n"; +$status = run_node_daemons (); + +if ($status != 0) { + print STDERR "ERROR: Unable to execute the node daemons\n"; + kill_open_processes (); + exit 1; +} + +$daemons_running = 1; + +# Invoke execution manager. +print "Invoking execution manager (dance_execution_manager.exe) with -eEM.ior --node-map $dat_file\n"; +$EM = new PerlACE::Process ("$DAnCE/bin/dance_execution_manager", + "-eEM.ior --node-map $dat_file"); +$EM->Spawn (); + +if (PerlACE::waitforfile_timed ("EM.ior", + $PerlACE::wait_interval_for_process_creation) == -1) { + print STDERR + "ERROR: The ior file of execution manager could not be found\n"; + kill_open_processes (); + exit 1; +} + +$em_running = 1; + +# Invoke executor - start the application -. +print "Invoking executor - start the application -\n"; + +print "Start dance_plan_launcher.exe with -x DeploymentPlan.cdp -k file://EM.ior\n"; +$E = + new PerlACE::Process ("$DAnCE/bin/dance_plan_launcher", + "-x DeploymentPlan.cdp -k file://EM.ior"); + +$E->SpawnWaitKill (50); + +if (PerlACE::waitforfile_timed ( + "Receiver.ior", + $PerlACE::wait_interval_for_process_creation) == -1) { + print STDERR "ERROR: The ior file of receiver could not be found\n"; + kill_open_processes (); + exit 1; +} + +if (PerlACE::waitforfile_timed ("Sender.ior", + $PerlACE::wait_interval_for_process_creation) == -1) { + print STDERR "ERROR: The ior file of sender could not be found\n"; + kill_open_processes (); + exit 1; +} + +print "Invoking the controller ($controller_exec -k file://Sender.ior)\n"; +$controller = new PerlACE::Process ("$controller_exec", "-k file://Sender.ior"); +$result = $controller->SpawnWaitKill (30); + +if ($result != 0) { + print STDERR "ERROR: The controller returned $result\n"; + $status = 1; +} + +# Invoke executor - stop the application -. +print "Invoking executor - stop the application -\n"; +print "by running dance_plan_launcher.exe with -k file://EM.ior -x DeploymentPlan.cdp -q\n"; + +$E = + new PerlACE::Process ("$DAnCE/bin/dance_plan_launcher", + "-k file://EM.ior -x DeploymentPlan.cdp -q"); +$E->SpawnWaitKill (30); + +print "Executor returned.\n"; +print "Shutting down rest of the processes.\n"; + +delete_ior_files (); +kill_open_processes (); + +exit $status; diff --git a/modules/CIAO/examples/Hello/descriptors/run_test_alias.pl b/modules/CIAO/examples/Hello/descriptors/run_test_alias.pl new file mode 100755 index 00000000000..4d53ae417d4 --- /dev/null +++ b/modules/CIAO/examples/Hello/descriptors/run_test_alias.pl @@ -0,0 +1,195 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# $Id$ +# -*- perl -*- + +use lib "$ENV{'ACE_ROOT'}/bin"; +use PerlACE::Run_Test; + +$CIAO_ROOT = "$ENV{'CIAO_ROOT'}"; +$TAO_ROOT = "$ENV{'TAO_ROOT'}"; +$DAnCE = "$ENV{'DANCE_ROOT'}"; +$daemons_running = 0; +$em_running = 0; +$ns_running = 0; +$daemons = 1; +@ports = ( 60001 ); +@iorfiles = ( "NodeApp1.ior" ); +@nodenames = ( "Alias" ); +$status = 0; +$dat_file = "Aliased_Map.dat"; +$cdp_file = "DeploymentPlan.cdp"; +$controller_exec = "$CIAO_ROOT/examples/Hello/Sender/starter"; + +$nsior = PerlACE::LocalFile ("ns.ior"); + +PerlACE::add_lib_path ('../lib'); + +unlink $nsior; + +$E = 0; +$EM = 0; + +# Delete if there are any .ior files. +sub delete_ior_files { + for ($i = 0; $i < $daemons; ++$i) { + unlink $iorfiles[$i]; + } + unlink PerlACE::LocalFile ("EM.ior"); + unlink PerlACE::LocalFile ("Receiver.ior"); + unlink PerlACE::LocalFile ("Sender.ior"); + unlink PerlACE::LocalFile ("DAM.ior"); + unlink PerlACE::LocalFile ("ns.ior"); +} + +sub kill_node_daemons { + for ($i = 0; $i < $daemons; ++$i) { + $Daemons[$i]->Kill (); $Daemons[$i]->TimedWait (1); + } +} + +sub kill_open_processes { + if ($daemons_running == 1) { + kill_node_daemons (); + } + + if ($em_running == 1) { + $EM->Kill (); + $EM->TimedWait (1); + } + + if ($ns_running == 1) { + $NS->Kill (); + $NS->TimedWait (1); + } + +} + +sub run_node_daemons { + for ($i = 0; $i < $daemons; ++$i) + { + $iorfile = $iorfiles[$i]; + $port = $ports[$i]; + $nodename = $nodenames[$i]; + $iiop = "iiop://localhost:$port"; + $node_app = "$CIAO_ROOT/bin/ciao_componentserver"; + + $d_cmd = "$DAnCE/bin/dance_node_manager"; + $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --instance-nc corbaloc:rir:/NameService"; + + $Daemons[$i] = new PerlACE::Process ($d_cmd, $d_param); + $result = $Daemons[$i]->Spawn (); + push(@processes, $Daemons[$i]); + + if (PerlACE::waitforfile_timed ($iorfile, + 30) == -1) { + print STDERR + "ERROR: The ior $iorfile file of node daemon $i could not be found\n"; + for (; $i >= 0; --$i) { + $Daemons[$i]->Kill (); $Daemons[$i]->TimedWait (1); + } + return -1; + } + } + return 0; +} + +delete_ior_files (); + +# Invoke naming service + +$NS = new PerlACE::Process ("$TAO_ROOT/orbsvcs/Naming_Service/Naming_Service", "-m 0 -ORBEndpoint iiop://localhost:60003 -o ns.ior"); + +$NS->Spawn (); + +print STDERR "Starting Naming Service\n"; + +if (PerlACE::waitforfile_timed ($nsior, $PerlACE::wait_interval_for_process_creation) == -1) +{ + print STDERR "ERROR: cannot find naming service IOR file\n"; + $NS->Kill (); + exit 1; +} + +$ns_running = 1; + +# Set up NamingService environment +$ENV{"NameServiceIOR"} = "corbaloc:iiop:localhost:60003/NameService"; + + +# Invoke node daemons. +print "Invoking node daemons\n"; +$status = run_node_daemons (); + +if ($status != 0) { + print STDERR "ERROR: Unable to execute the node daemons\n"; + kill_open_processes (); + exit 1; +} + +$daemons_running = 1; + +# Invoke execution manager. +print "Invoking execution manager\n"; +$EM = new PerlACE::Process ("$DAnCE/bin/dance_execution_manager", + "-eEM.ior --node-map $dat_file"); +$EM->Spawn (); + +if (PerlACE::waitforfile_timed ("EM.ior", + $PerlACE::wait_interval_for_process_creation) == -1) { + print STDERR + "ERROR: The ior file of execution manager could not be found\n"; + kill_open_processes (); + exit 1; +} + +$em_running = 1; + +# Invoke executor - start the application -. +print "Invoking executor - start the application -\n"; +$E = + new PerlACE::Process ("$DAnCE/bin/dance_plan_launcher", + "-x DeploymentPlan.cdp -k file://EM.ior"); + +$E->SpawnWaitKill (5000); + +if (PerlACE::waitforfile_timed ( + "Receiver.ior", + $PerlACE::wait_interval_for_process_creation) == -1) { + print STDERR "ERROR: The ior file of receiver could not be found\n"; + kill_open_processes (); + exit 1; +} + +if (PerlACE::waitforfile_timed ("Sender.ior", + $PerlACE::wait_interval_for_process_creation) == -1) { + print STDERR "ERROR: The ior file of sender could not be found\n"; + kill_open_processes (); + exit 1; +} + +print "Invoking the controller\n"; +$controller = new PerlACE::Process ("$controller_exec", "-k file://Sender.ior"); +$result = $controller->SpawnWaitKill (3000); + +if ($result != 0) { + print STDERR "ERROR: The controller returned $result\n"; + $status = 1; +} + +# Invoke executor - stop the application -. +print "Invoking executor - stop the application -\n"; +$E = + new PerlACE::Process ("$DAnCE/bin/dance_plan_launcher", + "-k file://EM.ior -x DeploymentPlan.cdp -q"); +$E->SpawnWaitKill (3000); + +print "Executor returned.\n"; +print "Shutting down rest of the processes.\n"; + +delete_ior_files (); +kill_open_processes (); + +exit $status; diff --git a/modules/CIAO/examples/Hello/descriptors/run_test_without_ns.pl b/modules/CIAO/examples/Hello/descriptors/run_test_without_ns.pl new file mode 100755 index 00000000000..f973c3837dc --- /dev/null +++ b/modules/CIAO/examples/Hello/descriptors/run_test_without_ns.pl @@ -0,0 +1,181 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# $Id$ +# -*- perl -*- + +use lib "$ENV{'ACE_ROOT'}/bin"; +use PerlACE::Run_Test; + +$CIAO_ROOT = "$ENV{'CIAO_ROOT'}"; +$TAO_ROOT = "$ENV{'TAO_ROOT'}"; +$DAnCE = "$ENV{'DANCE_ROOT'}"; + +$daemons_running = 0; +$em_running = 0; +$ns_running = 0; + +$daemons = 2; +@ports = ( 60001, 60002 ); +@iorfiles = ( "NodeApp1.ior", "NodeApp2.ior" ); +@nodenames = ( "Sender", "Receiver" ); + +$status = 0; +$dat_file = "NodeManagerMap.dat"; +$cdp_file = "DeploymentPlan_without_ns.cdp"; + +$controller_exec = "$CIAO_ROOT/examples/Hello/Sender/starter"; + +PerlACE::add_lib_path ('../lib'); + +unlink $nsior; + +$E = 0; +$EM = 0; + +# Delete if there are any .ior files. +sub delete_ior_files { + for ($i = 0; $i < $daemons; ++$i) { + unlink $iorfiles[$i]; + } + unlink PerlACE::LocalFile ("EM.ior"); + unlink PerlACE::LocalFile ("Receiver.ior"); + unlink PerlACE::LocalFile ("Sender.ior"); + unlink PerlACE::LocalFile ("DAM.ior"); +} + +sub kill_node_daemons { + for ($i = 0; $i < $daemons; ++$i) { + $Daemons[$i]->Kill (); $Daemons[$i]->TimedWait (1); + } +} + +sub kill_open_processes { + if ($daemons_running == 1) { + kill_node_daemons (); + } + + if ($em_running == 1) { + $EM->Kill (); + $EM->TimedWait (1); + } + + if ($ns_running == 1) { + $NS->Kill (); + $NS->TimedWait (1); + } + +} + +sub run_node_daemons { + for ($i = 0; $i < $daemons; ++$i) + { + $iorfile = $iorfiles[$i]; + $port = $ports[$i]; + $nodename = $nodenames[$i]; + $iiop = "iiop://localhost:$port"; + $node_app = "$CIAO_ROOT/bin/ciao_componentserver"; + + $d_cmd = "$DAnCE/bin/dance_node_manager"; + $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30"; + + print "Run dance_node_manager with $d_param\n"; + + $Daemons[$i] = new PerlACE::Process ($d_cmd, $d_param); + $result = $Daemons[$i]->Spawn (); + push(@processes, $Daemons[$i]); + + if (PerlACE::waitforfile_timed ($iorfile, + 30) == -1) { + print STDERR + "ERROR: The ior $iorfile file of node daemon $i could not be found\n"; + for (; $i >= 0; --$i) { + $Daemons[$i]->Kill (); $Daemons[$i]->TimedWait (1); + } + return -1; + } + } + return 0; +} + +delete_ior_files (); + +# Invoke node daemons. +print "Invoking node daemons\n"; +$status = run_node_daemons (); + +if ($status != 0) { + print STDERR "ERROR: Unable to execute the node daemons\n"; + kill_open_processes (); + exit 1; +} + +$daemons_running = 1; + +# Invoke execution manager. +print "Invoking execution manager (dance_execution_manager.exe) with -eEM.ior --node-map $dat_file\n"; +$EM = new PerlACE::Process ("$DAnCE/bin/dance_execution_manager", + "-eEM.ior --node-map $dat_file"); +$EM->Spawn (); + +if (PerlACE::waitforfile_timed ("EM.ior", + $PerlACE::wait_interval_for_process_creation) == -1) { + print STDERR + "ERROR: The ior file of execution manager could not be found\n"; + kill_open_processes (); + exit 1; +} + +$em_running = 1; + +# Invoke executor - start the application -. +print "Invoking executor - start the application -\n"; + +print "Start dance_plan_launcher.exe with -x DeploymentPlan_without_ns.cdp -k file://EM.ior\n"; +$E = + new PerlACE::Process ("$DAnCE/bin/dance_plan_launcher", + "-x DeploymentPlan_without_ns.cdp -k file://EM.ior"); + +$E->SpawnWaitKill (5000); + +if (PerlACE::waitforfile_timed ( + "Receiver.ior", + $PerlACE::wait_interval_for_process_creation) == -1) { + print STDERR "ERROR: The ior file of receiver could not be found\n"; + kill_open_processes (); + exit 1; +} + +if (PerlACE::waitforfile_timed ("Sender.ior", + $PerlACE::wait_interval_for_process_creation) == -1) { + print STDERR "ERROR: The ior file of sender could not be found\n"; + kill_open_processes (); + exit 1; +} + +print "Invoking the controller ($controller_exec -k file://Sender.ior)\n"; +$controller = new PerlACE::Process ("$controller_exec", "-k file://Sender.ior"); +$result = $controller->SpawnWaitKill (3000); + +if ($result != 0) { + print STDERR "ERROR: The controller returned $result\n"; + $status = 1; +} + +# Invoke executor - stop the application -. +print "Invoking executor - stop the application -\n"; +print "by running dance_plan_launcher.exe with -k file://EM.ior -x DeploymentPlan.cdp -q\n"; + +$E = + new PerlACE::Process ("$DAnCE/bin/dance_plan_launcher", + "-k file://EM.ior -x DeploymentPlan.cdp -q"); +$E->SpawnWaitKill (3000); + +print "Executor returned.\n"; +print "Shutting down rest of the processes.\n"; + +delete_ior_files (); +kill_open_processes (); + +exit $status; diff --git a/modules/CIAO/examples/Hello/descriptors/svc_em.conf b/modules/CIAO/examples/Hello/descriptors/svc_em.conf new file mode 100644 index 00000000000..2aa568bf9af --- /dev/null +++ b/modules/CIAO/examples/Hello/descriptors/svc_em.conf @@ -0,0 +1,9 @@ +# $Id$ +# +# Please see $TAO_ROOT/docs/Options.html for details on these options. +# + +static Advanced_Resource_Factory "-ORBReactorType select_st -ORBInputCDRAllocator null -ORBConnectionCacheLock null -ORBFlushingStrategy blocking" +static Client_Strategy_Factory "-ORBProfileLock null -ORBClientConnectionHandler RW" +static Server_Strategy_Factory "-ORBConcurrency thread-per-connection -ORBPOALock thread -ORBAllowReactivationOfSystemids 0" + |