summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvenkita <venkita@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-08-04 03:06:39 +0000
committervenkita <venkita@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-08-04 03:06:39 +0000
commitdbd169fe1e3ca6b3bfe7ce0fa6d8e81b52c6095f (patch)
tree51137db6a839190d2c29dfec7b9adfc0b09ddf54
parent6dd021d20b046c118f0ee08c70aca8f53541eecd (diff)
downloadATCD-dance-static-config2.tar.gz
*** empty log message ***dance-static-config2
-rw-r--r--TAO/CIAO/DAnCE/StaticConfigurator/StaticDAnCEApp.cpp56
1 files changed, 51 insertions, 5 deletions
diff --git a/TAO/CIAO/DAnCE/StaticConfigurator/StaticDAnCEApp.cpp b/TAO/CIAO/DAnCE/StaticConfigurator/StaticDAnCEApp.cpp
index 4713063bdf0..882bc8e5fc5 100644
--- a/TAO/CIAO/DAnCE/StaticConfigurator/StaticDAnCEApp.cpp
+++ b/TAO/CIAO/DAnCE/StaticConfigurator/StaticDAnCEApp.cpp
@@ -1,5 +1,6 @@
// $Id$
+#include "Container_Base.h"
#include "NodeApplication_Impl.h"
#include "DeploymentC.h"
#include "CIAO/DAnCE/NodeApplicationManager/ImplementationInfo.h"
@@ -48,12 +49,13 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
"");
try
{
+ /*
Deployment::DeploymentPlan plan;
TAO_InputCDR in_cdr(plan_cdr_buffer, sizeof(plan_cdr_buffer)-1 );
in_cdr >> plan;
-
+ */
//ACE_DEBUG ((LM_DEBUG, "Dumping deployment plan===start\n"));
//Deployment::DnC_Dump::dump (plan);
//ACE_DEBUG ((LM_DEBUG, "Dumping deployment plan===end\n"));
@@ -85,9 +87,9 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
CIAO::HOMECREATOR_FUNCPTR_MAP home_creator_fptr_map;
CIAO::HOMESERVANTCREATOR_FUNCPTR_MAP homesvnt_creator_fptr_map;
- CIAO::Static_Config_EntryPoints_Maps maps;
- maps.home_creator_funcptr_map_ = &home_creator_fptr_map;
- maps.home_servant_creator_funcptr_map_ = &homesvnt_creator_fptr_map;
+ CIAO::Static_Config_EntryPoints_Maps static_config_entrypoints_maps;
+ static_config_entrypoints_maps.home_creator_funcptr_map_ = &home_creator_fptr_map;
+ static_config_entrypoints_maps.home_servant_creator_funcptr_map_ = &homesvnt_creator_fptr_map;
int i=0;
for (i=0; i<homes_table_size; ++i)
@@ -99,6 +101,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
homes_table[i].servant_fptr_);
}
+ /*
CIAO::Static_DomainApplicationManager_Impl* dapp_mgr =
new CIAO::Static_DomainApplicationManager_Impl
(orb.in (),
@@ -131,14 +134,57 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
ACE_DEBUG ((LM_DEBUG, "[success]\n"));
ACE_DEBUG ((LM_DEBUG, "Executor: Application Deployed successfully \n"));
+ */
+
+ CIAO::Static_NodeDaemon_Impl *static_node_daemon_impl;
+ // Create and install the CIAO Daemon servant
+
+ ACE_DEBUG ((LM_DEBUG, "creating static_node_manager\n"));
+
+ static_node_daemon_impl =
+ new CIAO::Static_NodeDaemon_Impl("NodeDaemon",
+ orb.in (),
+ poa.in (),
+ "", //exe location
+ 0, //spawn delay
+ &static_config_entrypoints_maps);
+
+ static_node_daemon_impl->init ();
+
+ CORBA::Object_var table_object =
+ orb->resolve_initial_references ("IORTable"
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ IORTable::Table_var adapter =
+ IORTable::Table::_narrow (table_object.in () ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (CORBA::is_nil (adapter.in ()))
+ ACE_ERROR_RETURN ((LM_ERROR, "Nil IORTable\n"), -1);
+ CIAO::NodeDaemon_var daemon =
+ static_node_daemon_impl->_this ();
+
+ CORBA::String_var str =
+ orb->object_to_string (daemon.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ adapter->bind ("NodeManager",
+ str.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
// Run the main event loop for the ORB.
orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
-
+
+ /*
ACE_DEBUG ((LM_DEBUG, "Executor: destroy the application....."));
dapp_mgr->destroyApplication ();
ACE_DEBUG ((LM_DEBUG, "[success]\n"));
+ */
poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;