summaryrefslogtreecommitdiff
path: root/TAO/CIAO
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/CIAO')
-rw-r--r--TAO/CIAO/ChangeLog58
-rw-r--r--TAO/CIAO/DAnCE/NodeApplication/NodeApp_Configurator.cpp8
-rw-r--r--TAO/CIAO/DAnCE/NodeApplication/NodeApp_Configurator.h69
-rw-r--r--TAO/CIAO/DAnCE/NodeApplication/NodeApplication.cpp174
-rw-r--r--TAO/CIAO/DAnCE/NodeApplication/NodeApplication.mpc4
-rw-r--r--TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Core.cpp349
-rw-r--r--TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Core.h142
-rw-r--r--TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Core.inl17
-rw-r--r--TAO/CIAO/NEWS11
-rw-r--r--TAO/CIAO/ciao/CCM_Core.mpc2
-rw-r--r--TAO/CIAO/ciao/Container_Impl.cpp (renamed from TAO/CIAO/DAnCE/NodeApplication/Container_Impl.cpp)2
-rw-r--r--TAO/CIAO/ciao/Container_Impl.h (renamed from TAO/CIAO/DAnCE/NodeApplication/Container_Impl.h)12
-rw-r--r--TAO/CIAO/ciao/Container_Impl.inl (renamed from TAO/CIAO/DAnCE/NodeApplication/Container_Impl.inl)0
-rw-r--r--TAO/CIAO/ciao/NodeApplication_Impl.cpp (renamed from TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.cpp)3
-rw-r--r--TAO/CIAO/ciao/NodeApplication_Impl.h (renamed from TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.h)18
-rw-r--r--TAO/CIAO/ciao/NodeApplication_Impl.inl (renamed from TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.inl)6
16 files changed, 184 insertions, 691 deletions
diff --git a/TAO/CIAO/ChangeLog b/TAO/CIAO/ChangeLog
index 87babf592fb..b32f54ab9f7 100644
--- a/TAO/CIAO/ChangeLog
+++ b/TAO/CIAO/ChangeLog
@@ -1,61 +1,3 @@
-Wed Oct 19 15:03:56 2005 Nanbor Wang <nanbor@exothermic.txcorp.com>
-
- These changes are made to add support for RT-capable
- NodeApplication.
-
- * ciao/CCM_Core.mpc:
- * ciao/Container_Impl.h:
- * ciao/Container_Impl.inl:
- * ciao/Container_Impl.cpp:
- * ciao/NodeApplication_Impl.h:
- * ciao/NodeApplication_Impl.inl:
- * ciao/NodeApplication_Impl.cpp: Moved NodeApplication and
- Container interface implementations under DAnCE/NodeApplication/
- subdir. They are coupled with NodeApplication implementation
- now.
-
- * DAnCE/NodeApplication/NodeApplication.mpc: Changed to
- incorporate the following files/changes.
-
- * DAnCE/NodeApplication/NodeApp_Configurator.h:
- * DAnCE/NodeApplication/NodeApp_Configurator.cpp: Added abstract,
- base NodeApp_Configurator class to define the interface for
- configuring NodeApplication internal.
-
- * DAnCE/NodeApplication/Container_Impl.h:
- * DAnCE/NodeApplication/Container_Impl.inl:
- * DAnCE/NodeApplication/Container_Impl.cpp: Moved from ciao/
- subdir.
-
- * DAnCE/NodeApplication/NodeApplication_Impl.h:
- * DAnCE/NodeApplication/NodeApplication_Impl.inl:
- * DAnCE/NodeApplication/NodeApplication_Impl.cpp: Changed to
- depend on a concrete NodeApp_Configurator to perform the
- configuration.
-
- * DAnCE/NodeApplication/NodeApplication_Core.h:
- * DAnCE/NodeApplication/NodeApplication_Core.inl:
- * DAnCE/NodeApplication/NodeApplication_Core.cpp:
- * DAnCE/NodeApplication/NodeApplication.cpp: Restructured the
- NodeApplication implementation so that the ORB event loop can be
- run on the main thread or on a separate thread, using the FIFO
- scheduling class.
-
- A new create_configurator method in NodeApplication_Core will
- create the "right" concrete configurator based on the command
- line flags. We will support a RT configuration soon.
- Currently, there's only a NoOp_Configurator for running
- NodeApplication without RT support.
-
- We will add the RT configuration as a dynamic library and will
- hook it up via ACE_DLL in a few days.
-
-Tue Oct 18 16:50:24 2005 William Otte <wotte@dre.vanderbilt.edu>
-
- * NEWS
-
- Updated release notes.
-
Mon Oct 17 13:21:59 2005 William Otte <wotte@dre.vanderbilt.edu>
* docs/schema/ccd.xsd
diff --git a/TAO/CIAO/DAnCE/NodeApplication/NodeApp_Configurator.cpp b/TAO/CIAO/DAnCE/NodeApplication/NodeApp_Configurator.cpp
deleted file mode 100644
index 4a2fb822f19..00000000000
--- a/TAO/CIAO/DAnCE/NodeApplication/NodeApp_Configurator.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
-// $Id$
-
-#include "NodeApp_Configurator.h"
-
-CIAO::NodeApp_Configurator::NodeApp_Configurator (CORBA::ORB_ptr o)
- : orb_ (CORBA::ORB::_duplicate (o))
-{
-}
diff --git a/TAO/CIAO/DAnCE/NodeApplication/NodeApp_Configurator.h b/TAO/CIAO/DAnCE/NodeApplication/NodeApp_Configurator.h
deleted file mode 100644
index 384f9b7639b..00000000000
--- a/TAO/CIAO/DAnCE/NodeApplication/NodeApp_Configurator.h
+++ /dev/null
@@ -1,69 +0,0 @@
-//$Id$
-/**========================================================
- *
- * @file NodeApp_Configurator.h
- *
- * @Brief This file contains the implementation of
- * the basic NodeApp_Configurator interface, the one
- * that does nothing more
- *
- * @author Nanbor Wang <nanbor@exothermic.txcorp.com>
- *========================================================*/
-
-#ifndef NODEAPP_CONFIGURATOR_H
-#define NODEAPP_CONFIGURATOR_H
-#include /**/ "ace/pre.h"
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ciao/Deployment_CoreC.h"
-
-namespace CIAO
-{
- /**
- *
- * @class NodeApp_Configurator
- *
- * @brief This class defines and implements the default
- * NodeApp_Configurator base class that's needed for configuring the
- * NodeApplication process.
- **/
- class NodeApp_Configurator
- {
- public:
- /// Default constructor.
- NodeApp_Configurator (CORBA::ORB_ptr o);
-
- /// Default destructor.
- virtual ~NodeApp_Configurator (void) = 0 {}
-
- /**
- * @brief "initialize" is called after NodeApplication get a hold
- * at this object.
- */
- virtual int initialize (void) = 0;
-
- /**
- * @brief "init_resource_manager" is called by NodeApplication when
- * it receives an "install" commands.
- */
- virtual int
- init_resource_manager (const ::Deployment::Properties &properties) = 0;
-
- /**
- * @brief get a policyset by its name.
- */
- virtual CORBA::PolicyList *
- find_container_policies (const ::Deployment::Properties &properties) = 0;
-
- protected:
- CORBA::ORB_var orb_;
- };
-}
-
-#include /**/ "ace/post.h"
-#endif /* NODEAPP_CONFIGURATOR_H */
diff --git a/TAO/CIAO/DAnCE/NodeApplication/NodeApplication.cpp b/TAO/CIAO/DAnCE/NodeApplication/NodeApplication.cpp
index 5e822928fcd..d50765f78d5 100644
--- a/TAO/CIAO/DAnCE/NodeApplication/NodeApplication.cpp
+++ b/TAO/CIAO/DAnCE/NodeApplication/NodeApplication.cpp
@@ -1,7 +1,59 @@
// $Id$
-#include "NodeApplication_Core.h"
+#include "NodeApplication_Impl.h"
+#include "NodeApplication_CallBackC.h"
#include "ciao/Server_init.h"
#include "ciao/CIAO_common.h"
+#include "ace/SString.h"
+#include "ace/Get_Opt.h"
+#include "ace/Env_Value_T.h"
+#include "ace/Sched_Params.h"
+#include "ace/OS_NS_errno.h"
+
+const char *ior_file_name = 0;
+const char *callback_ior = 0;
+int use_callback = 1;
+
+int
+parse_args (int argc, char *argv[])
+{
+ ACE_Get_Opt get_opts (argc, argv, "nk:o:");
+ int c;
+
+ while ((c = get_opts ()) != -1)
+ switch (c)
+ {
+ case 'n':
+ use_callback = 0;
+ break;
+
+
+ case 'o': // get the file name to write to
+ ior_file_name = get_opts.opt_arg ();
+ break;
+
+ case 'k': // get the activator callback IOR
+ callback_ior = get_opts.opt_arg ();
+ break;
+
+ case '?': // display help for use of the server.
+ default:
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "usage: %s\n"
+ "-n Do not use Callback (for testing)\n"
+ "-o <ior_output_file>\n"
+ "-k <NodeApplicationManager_callback_ior>\n"
+ "\n",
+ argv [0]),
+ -1);
+ }
+
+ if (use_callback && callback_ior == 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Callback IOR to NodeApplicationManager is required.\n"),
+ -1);
+
+ return 0;
+}
int
main (int argc, char *argv[])
@@ -10,8 +62,6 @@ main (int argc, char *argv[])
ACE_TRY
{
- ACE_DEBUG ((LM_DEBUG, "*** Starting NodeApplication\n"));
-
// Initialize orb
CORBA::ORB_var orb =
CORBA::ORB_init (argc,
@@ -22,16 +72,122 @@ main (int argc, char *argv[])
CIAO::Server_init (orb.in ());
- CIAO::NodeApplication_Options nodeapp_options;
-
- if (nodeapp_options.parse_args (argc, argv) != 0)
+ if (parse_args (argc, argv) != 0)
return -1;
- CIAO::NodeApplication_Core nodeapp_core (orb.in (),
- nodeapp_options);
+ // Get reference to Root POA.
+ CORBA::Object_var obj
+ = orb->resolve_initial_references ("RootPOA"
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ PortableServer::POA_var poa
+ = PortableServer::POA::_narrow (obj.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ // Activate POA manager
+ PortableServer::POAManager_var mgr
+ = poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ mgr->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ CIAO::NodeApplication_Impl *nodeapp_servant;
+
+ ACE_NEW_RETURN (nodeapp_servant,
+ CIAO::NodeApplication_Impl (orb.in (),
+ poa.in ()),
+ -1);
+
+ PortableServer::ServantBase_var safe_servant (nodeapp_servant);
+
+ // CONFIGURING NodeApplication
+ PortableServer::ObjectId_var nodeapp_oid
+ = poa->activate_object (nodeapp_servant
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ obj = poa->id_to_reference (nodeapp_oid.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ Deployment::NodeApplication_var nodeapp_obj =
+ Deployment::NodeApplication::_narrow (obj.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (CORBA::is_nil (nodeapp_obj.in ()))
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Unable to activate NodeApplication object\n"),
+ -1);
+
+
+ Deployment::NodeApplicationManager_var nodeapp_man;
+ Deployment::Properties_var prop = new Deployment::Properties;
+
+ if (use_callback)
+ {
+ obj = orb->string_to_object (callback_ior
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ CIAO::NodeApplication_Callback_var nam_callback
+ = CIAO::NodeApplication_Callback::_narrow (obj.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ Deployment::Properties_out properties_out (prop.out ());
+
+ nodeapp_man
+ = nam_callback->register_node_application (nodeapp_obj.in (),
+ properties_out
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+
+ /** @@ We need to call NodeApplication servant's init method.
+ * But it's not sure to me where exactly we can get the
+ * Properties needed by the init method at this moment. There are two
+ * ways to set the property of the NodeApplication:
+ * 1. call init remotely from NodeApplicationManager
+ * 2. call init locally on the servant of NodeApplication.
+ */
+ bool result = nodeapp_servant->init (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (result)
+ {
+ ACE_DEBUG ((LM_DEBUG, "NodeApplication Failed on creating and\
+ initializing the session container!"));
+ return 1;
+ }
+
+ CORBA::String_var str = orb->object_to_string (nodeapp_obj.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ CIAO::Utility::write_IOR (ior_file_name,
+ str.in ());
+
+ // End Deployment part
+ if (CIAO::debug_level () > 10)
+ {
+ ACE_DEBUG ((LM_INFO, "NodeApplication IOR: %s\n", str.in ()));
+
+ ACE_DEBUG ((LM_DEBUG,
+ "Running NodeApplication...\n"));
+ }
// Run the main event loop for the ORB.
- nodeapp_core.run_orb ();
+ orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
}
ACE_CATCHANY
diff --git a/TAO/CIAO/DAnCE/NodeApplication/NodeApplication.mpc b/TAO/CIAO/DAnCE/NodeApplication/NodeApplication.mpc
index a9da0e5b7a2..e258358d5eb 100644
--- a/TAO/CIAO/DAnCE/NodeApplication/NodeApplication.mpc
+++ b/TAO/CIAO/DAnCE/NodeApplication/NodeApplication.mpc
@@ -8,10 +8,6 @@ project(NodeApplication): ciao_component_dnc {
}
Source_Files {
- NodeApp_Configurator.cpp
- Container_Impl.cpp
- NodeApplication_Core.cpp
- NodeApplication_Impl.cpp
NodeApplication.cpp
}
}
diff --git a/TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Core.cpp b/TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Core.cpp
deleted file mode 100644
index 305e68e85aa..00000000000
--- a/TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Core.cpp
+++ /dev/null
@@ -1,349 +0,0 @@
-// $Id$
-
-#include "ciao/NodeApplication_CallBackC.h"
-#include "ace/Sched_Params.h"
-#include "NodeApplication_Impl.h"
-#include "NodeApplication_Core.h"
-#include "ace/Null_Mutex.h"
-#include "ciao/CIAO_common.h"
-#include "ace/Get_Opt.h"
-
-#if !defined (__ACE_INLINE__)
-# include "NodeApplication_Core.inl"
-#endif /* __ACE_INLINE__ */
-
-const char *
-sched_policy_name (int sched_policy)
-{
- const char *name = 0;
-
- switch (sched_policy)
- {
- case ACE_SCHED_OTHER:
- name = "SCHED_OTHER";
- break;
- case ACE_SCHED_RR:
- name = "SCHED_RR";
- break;
- case ACE_SCHED_FIFO:
- name = "SCHED_FIFO";
- break;
- }
-
- return name;
-}
-
-
-/// The following check is taken from $(TAO_ROOT)/tests/RTCORBA/
-int
-check_supported_priorities (CORBA::ORB_ptr orb)
-{
- int sched_policy =
- orb->orb_core ()->orb_params ()->ace_sched_policy ();
-
- // Check that we have sufficient priority range to run,
- // i.e., more than 1 priority level.
- int max_priority =
- ACE_Sched_Params::priority_max (sched_policy);
- int min_priority =
- ACE_Sched_Params::priority_min (sched_policy);
-
- if (max_priority == min_priority)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Not enough priority levels with the %s scheduling policy\n"
- "on this platform to run, terminating program....\n"
- "Check svc.conf options\n",
- sched_policy_name (sched_policy)));
-
- return -1;
- }
- return 0;
-}
-
-CIAO::NoOp_Configurator::~NoOp_Configurator (void)
-{
- // Not much to do.
-}
-
-int
-CIAO::NoOp_Configurator::initialize (void)
-{
- // Do nothing to initialize the NodeApplication process.
- return 0;
-}
-
-int
-CIAO::NoOp_Configurator::init_resource_manager
-(const ::Deployment::Properties & /*properties*/)
-{
- // @@ Currently do thing. We should go over the resource struct in
- // the future and throw exceptions if there are
- // un-recognizable/supported stuff in it.
- return 0;
-}
-
-CORBA::PolicyList *
-CIAO::NoOp_Configurator::find_container_policies
-(const ::Deployment::Properties & /*properties*/)
-{
- // Not much to do.
-
- return 0;
-}
-
-int
-CIAO::NodeApplication_Options::parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "nrk:o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'n':
- this->use_callback_ = 0;
- break;
-
-
- case 'o': // get the file name to write to
- this->ior_output_filename_ = get_opts.opt_arg ();
- break;
-
- case 'k': // get the activator callback IOR
- this->callback_ior_ = get_opts.opt_arg ();
- break;
-
- case 'r': // Enable RT support
- this->rt_support_ = 1;
- break;
-
- case '?': // display help for use of the server.
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s\n"
- "-n Do not use Callback (for testing)\n"
- "-o <ior_output_file>\n"
- "-k <NodeApplicationManager_callback_ior>\n"
- "-r Request RT support\n"
- "\n",
- argv [0]),
- -1);
- }
-
- if (this->use_callback_ && this->callback_ior_.length() == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Callback IOR to NodeApplicationManager is required.\n"),
- -1);
-
- return 0;
-}
-
-int
-CIAO::NodeApplication_Core::svc ()
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var object =
- this->orb_->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // ...
- CIAO::NodeApplication_Impl *nodeapp_servant;
-
- ACE_NEW_RETURN (nodeapp_servant,
- CIAO::NodeApplication_Impl (this->orb_.in (),
- root_poa.in (),
- *this->configurator_.get ()),
- -1);
-
- PortableServer::ServantBase_var safe_servant (nodeapp_servant);
-
- // Configuring NodeApplication.
- PortableServer::ObjectId_var nodeapp_oid
- = root_poa->activate_object (nodeapp_servant
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object = root_poa->id_to_reference (nodeapp_oid.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Deployment::NodeApplication_var nodeapp_obj =
- Deployment::NodeApplication::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (nodeapp_obj.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to activate NodeApplication object\n"),
- -1);
-
- /** @@ We need to call NodeApplication servant's init method.
- * But it's not sure to me where exactly we can get the
- * Properties needed by the init method at this moment. There are two
- * ways to set the property of the NodeApplication:
- * 1. call init remotely from NodeApplicationManager
- * 2. call init locally on the servant of NodeApplication.
- */
- bool retval = nodeapp_servant->init (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (retval)
- {
- ACE_DEBUG ((LM_DEBUG, "NodeApplication Failed on creating and\
- initializing the session container!"));
- return 1;
- }
-
- CORBA::String_var str = this->orb_->object_to_string (nodeapp_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (this->options_.ior_output_filename_.length () != 0)
- CIAO::Utility::write_IOR (this->options_.ior_output_filename_.c_str (),
- str.in ());
-
- // End Deployment part
- if (CIAO::debug_level () > 10)
- {
- ACE_DEBUG ((LM_INFO, "NodeApplication IOR: %s\n", str.in ()));
-
- }
-
- Deployment::NodeApplicationManager_var nodeapp_man;
- Deployment::Properties_var prop = new Deployment::Properties;
-
- if (this->options_.use_callback_)
- {
- object = this->orb_->string_to_object (this->options_.callback_ior_.c_str ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CIAO::NodeApplication_Callback_var nam_callback
- = CIAO::NodeApplication_Callback::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Deployment::Properties_out properties_out (prop.out ());
-
- nodeapp_man
- = nam_callback->register_node_application (nodeapp_obj.in (),
- properties_out
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "Running NodeApplication...\n"));
-
- this->orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->orb_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- return -1;
- }
- ACE_ENDTRY;
-
- ACE_DEBUG ((LM_DEBUG,
- "Exiting NodeApplication...\n"));
- return 0;
-}
-
-int
-CIAO::NodeApplication_Core::run_orb ()
-{
- // check supported priority before running RT
- if (this->options_.rt_support_ != 0 &&
- check_supported_priorities (this->orb_.in ()) != 0)
- {
- ACE_DEBUG ((LM_ERROR, "ERROR: DISABLE RT SUPPORT\n"));
- this->options_.rt_support_ = 0;
- }
-
- if (this->configurator_factory () != 0)
- ACE_ERROR_RETURN ((LM_ERROR, "ERROR: Unable to acquire and initialize the NodeApplication configurator.\n"), -1);
-
- if (this->options_.rt_support_ != 0) // RT support reuqested
- {
-
-
- // spawn a thread
- // Task activation flags.
- long flags =
- THR_NEW_LWP |
- THR_JOINABLE |
- this->orb_->orb_core ()->orb_params ()->thread_creation_flags ();
-
- // Activate task.
- int result =
- this->activate (flags);
- if (result == -1)
- {
- if (errno == EPERM)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot create thread with scheduling policy %s\n"
- "because the user does not have the appropriate privileges, terminating program....\n"
- "Check svc.conf options and/or run as root\n",
- sched_policy_name (this->orb_->orb_core ()->orb_params ()->ace_sched_policy ())),
- 2);
- }
- else
- return -1;
- }
-
- ACE_DEBUG ((LM_DEBUG, "*** Running NodeApplication in RT mode\n"));
-
- // Wait for task to exit.
- result =
- this->wait ();
- ACE_ASSERT (result != -1);
-
- ACE_DEBUG ((LM_INFO, "*** Ending NodeApplication\n"));
- return 0;
-
- }
- else
- return this->svc ();
-}
-
-int
-CIAO::NodeApplication_Core::configurator_factory (void)
-{
- CIAO::NodeApp_Configurator* ptr = 0;
-
- if (this->options_.rt_support_)
- {
- // Manufacture a RTNA_configurator
- }
- else
- ACE_NEW_RETURN (ptr,
- CIAO::NoOp_Configurator (this->orb_.in ()),
- -1);
-
- this->configurator_.reset (ptr);
-
- return this->configurator_->initialize ();
-}
diff --git a/TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Core.h b/TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Core.h
deleted file mode 100644
index 3113b7759f7..00000000000
--- a/TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Core.h
+++ /dev/null
@@ -1,142 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file NodeApplication_Core.h
- *
- * $Id$
- *
- * An ACE_Task subclass that manages the NodeApplication runtime. We
- * can run this class as a separate thread, as in the case of RT
- * support, or as a event driven ORB.
- *
- * @author Nanbor Wang <nanbor@cs.wustl.edu>
- */
-//=============================================================================
-
-
-#ifndef CIAO_NODEAPPLICATION_CORE_H
-#define CIAO_NODEAPPLICATION_CORE_H
-#include /**/ "ace/pre.h"
-
-#include "tao/ORB_Core.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/ORB.h"
-#include "ace/Task.h"
-#include "ace/SString.h"
-#include "ace/Auto_Ptr.h"
-#include "NodeApp_Configurator.h"
-
-namespace CIAO
-{
- class NodeApplication_Core;
-
- /**
- * @class NodeApplication_Options
- *
- * @brief An class for managing and extracting command line options
- * for NodeApplication.
- */
- class NodeApplication_Options
- {
- public:
- // default ctor.
- NodeApplication_Options () : use_callback_ (1), rt_support_ (0) {}
-
- // extracting commandline arguments
- int parse_args (int argc, char *argv[]);
-
- friend class NodeApplication_Core;
-
- private:
- // The name of the file to write stringified IOR to.
- ACE_CString ior_output_filename_;
-
- // Stringified IOR of a CIAO's callback object.
- ACE_CString callback_ior_;
-
- // CIAO ComponentServer uses the callback object to pass it's
- // own object reference back to NodeApplicationManager.
- int use_callback_;
-
- // If we need to support RT-CORBA. Currently, this is
- // mandatory, but we can probably allow some sort of
- // "best-effort" RT support. I.e., if the platform/environment
- // doesn't support RT, then we will still deploy the NodeApp but
- // ignore the RT spec. Perhaps something in the future.
- int rt_support_;
- };
-
- /**
- * @class NoOP_Configurator
- *
- * @brief The NoOp_Configurator doesn't do anything.
- */
- class NoOp_Configurator : public NodeApp_Configurator
- {
- public:
- /// Default constructor.
- NoOp_Configurator (CORBA::ORB_ptr o);
-
- /// Default destructor.
- virtual ~NoOp_Configurator (void);
-
- /**
- * @brief "initialize" is called after NodeApplication get a hold
- * at this object.
- */
- virtual int initialize (void);
-
- /**
- * @brief "init_resource_manager" is called by NodeApplication when
- * it receives an "install" commands.
- */
- virtual int
- init_resource_manager (const ::Deployment::Properties &properties);
-
- /**
- * @brief get a policyset by its name.
- */
- virtual CORBA::PolicyList *
- find_container_policies (const ::Deployment::Properties &properties);
- };
-
- /**
- * @class NodeApplication_Core
- *
- * @brief An ACE_Task subclass that allow the ORB thread to be run
- * as separate thread when RT behaviors are needed.
- */
- class NodeApplication_Core
- : public virtual ACE_Task_Base
- {
- public:
- NodeApplication_Core (CORBA::ORB_ptr orb,
- NodeApplication_Options &opts);
-
- virtual int svc (void);
-
- int run_orb (void);
-
- protected:
- int configurator_factory (void);
-
- CORBA::ORB_var orb_;
-
- NodeApplication_Options &options_;
-
- auto_ptr<NodeApp_Configurator> configurator_;
- };
-
-}
-
-#if defined (__ACE_INLINE__)
-# include "NodeApplication_Core.inl"
-#endif /* __ACE_INLINE__ */
-
-#include /**/ "ace/post.h"
-#endif /* CIAO_NODEAPPLICAITON_CORE_H */
diff --git a/TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Core.inl b/TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Core.inl
deleted file mode 100644
index 92bb1a04b62..00000000000
--- a/TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Core.inl
+++ /dev/null
@@ -1,17 +0,0 @@
-// -*- C++ -*- $Id$
-
-ACE_INLINE
-CIAO::NoOp_Configurator::NoOp_Configurator (CORBA::ORB_ptr o)
- : NodeApp_Configurator (o)
-{
-}
-
-ACE_INLINE
-CIAO::NodeApplication_Core::NodeApplication_Core (CORBA::ORB_ptr o,
- CIAO::NodeApplication_Options &opts)
- : orb_ (CORBA::ORB::_duplicate (o)),
- options_ (opts),
- configurator_ (0)
-{
-}
-
diff --git a/TAO/CIAO/NEWS b/TAO/CIAO/NEWS
index 464e20df2df..3c3fc72a79e 100644
--- a/TAO/CIAO/NEWS
+++ b/TAO/CIAO/NEWS
@@ -36,7 +36,6 @@ PLANNED MAJOR CHANGES "SOMETIME IN THE FUTURE" (i.e., exact beta not known)
decisions, without handcrafting the mechanisms needed to (1) configure
the algorithms and (2) deploy the decisions made by the algorithms.
-. Implement support for more complex type initialization with XML.
PLANNED MAJOR CHANGES FOR THE NEXT RELEASE
==========================================
@@ -60,14 +59,6 @@ PLANNED MAJOR CHANGES FOR THE NEXT RELEASE
USER VISIBLE CHANGES BETWEEN CIAO-0.4.7 and CIAO-0.4.8
======================================================
-. The XSC based config handlers have been heavily optimized, resulting
- in greatly reduced parsing overhead for large deployments.
-
-. The DAnCE toolchain now supports initializing attributes which have
- enumerated types. Support for other complex types is planned for the
- future. Please see examples/Hello/descriptors/
- flattened_deploymentplan_without_ns.cdp for an example of how to
- populate enumerated attributes.
. Integrated Real-time QoS support to CIAO based on OMG's new
Deployment and Configuration (D&C) specification. Such effort
@@ -80,7 +71,7 @@ USER VISIBLE CHANGES BETWEEN CIAO-0.4.7 and CIAO-0.4.8
. Added functionality in XML parsing code to resolve schema in
$CIAO_ROOT/docs/schema instead of the local directory only. All
DeploymentPlans should use Deployment.xsd instead of
- Modified_Deployment.xsd, which has been removed.
+ Modified_Deployment.xsd.
. Fixed bug in CIDL code generation for some types of component and
home attributes.
diff --git a/TAO/CIAO/ciao/CCM_Core.mpc b/TAO/CIAO/ciao/CCM_Core.mpc
index 80b2435024d..f338fba8256 100644
--- a/TAO/CIAO/ciao/CCM_Core.mpc
+++ b/TAO/CIAO/ciao/CCM_Core.mpc
@@ -155,7 +155,9 @@ project (CIAO_DnC_Server) : orbsvcslib, portableserver, valuetype, naming, ifr_c
Source_Files {
Container_Base.cpp
+ Container_Impl.cpp
Swapping_Container.cpp
+ NodeApplication_Impl.cpp
Context_Impl_Base.cpp
Home_Servant_Impl_Base.cpp
Servant_Impl_Base.cpp
diff --git a/TAO/CIAO/DAnCE/NodeApplication/Container_Impl.cpp b/TAO/CIAO/ciao/Container_Impl.cpp
index 194c35c6f6c..ac5fc047693 100644
--- a/TAO/CIAO/DAnCE/NodeApplication/Container_Impl.cpp
+++ b/TAO/CIAO/ciao/Container_Impl.cpp
@@ -1,6 +1,6 @@
// $Id$
#include "Container_Impl.h"
-#include "ciao/CCM_ComponentC.h" // for calling StandardConfigurator interface
+#include "CCM_ComponentC.h" // for calling StandardConfigurator interface
#include "orbsvcs/CosNamingC.h"
diff --git a/TAO/CIAO/DAnCE/NodeApplication/Container_Impl.h b/TAO/CIAO/ciao/Container_Impl.h
index be17b77bf75..428b47c67f2 100644
--- a/TAO/CIAO/DAnCE/NodeApplication/Container_Impl.h
+++ b/TAO/CIAO/ciao/Container_Impl.h
@@ -25,12 +25,12 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#include "ciao/Deployment_CoreS.h"
-#include "ciao/Container_Base.h"
-//#include "ciao/Swapping_Container.h"
+#include "Deployment_CoreS.h"
+#include "Container_Base.h"
+#include "Swapping_Container.h"
#include "ace/SString.h"
-#include "ciao/Server_init.h" // write_IOR function
-#include "ciao/CIAO_common.h" // CIAO::debug_level
+#include "Server_init.h" // write_IOR function
+#include "CIAO_common.h" // CIAO::debug_level
namespace CIAO
{
@@ -45,7 +45,7 @@ namespace CIAO
* interface and is used to manage the lifecycle of the installed
* components and homes.
*/
- class Container_Impl
+ class CIAO_SERVER_Export Container_Impl
: public virtual POA_Deployment::Container
{
public:
diff --git a/TAO/CIAO/DAnCE/NodeApplication/Container_Impl.inl b/TAO/CIAO/ciao/Container_Impl.inl
index 40406e5582e..40406e5582e 100644
--- a/TAO/CIAO/DAnCE/NodeApplication/Container_Impl.inl
+++ b/TAO/CIAO/ciao/Container_Impl.inl
diff --git a/TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.cpp b/TAO/CIAO/ciao/NodeApplication_Impl.cpp
index 403a6d4afc1..cfc18baaf91 100644
--- a/TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.cpp
+++ b/TAO/CIAO/ciao/NodeApplication_Impl.cpp
@@ -297,9 +297,6 @@ CIAO::NodeApplication_Impl::install (
Deployment::ComponentInfos_var retv;
ACE_TRY
{
- // Extract ORB resource def here.
- // this->configurator_.init_resource_manager (xxx);
-
const ::Deployment::ContainerImplementationInfos container_infos =
node_impl_info.impl_infos;
diff --git a/TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.h b/TAO/CIAO/ciao/NodeApplication_Impl.h
index 334d878f9ae..b16e8931ccb 100644
--- a/TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.h
+++ b/TAO/CIAO/ciao/NodeApplication_Impl.h
@@ -20,16 +20,16 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#include "ciao/Deployment_CoreS.h"
-#include "ciao/Server_init.h"
-#include "ciao/CIAO_common.h"
-#include "ciao/Object_Set_T.h"
+#include "Container_Base.h"
+#include "Deployment_CoreS.h"
+#include "Server_init.h"
+#include "CIAO_common.h"
+#include "Object_Set_T.h"
#include "tao/ORB.h"
#include "ace/Synch.h"
#include "ace/Synch_Traits.h"
#include "ace/SString.h"
#include "ace/Hash_Map_Manager_T.h"
-#include "NodeApp_Configurator.h"
using CIAO::Utility::write_IOR;
@@ -57,14 +57,13 @@ namespace CIAO
// @@ Gan, as we discussed before can you please wrap this
// implementation in a namespace Node_Application or whatever to
// signify that it belongs to another software piece of CIAO?
- class NodeApplication_Impl
+ class CIAO_SERVER_Export NodeApplication_Impl
: public virtual POA_Deployment::NodeApplication
{
public:
/// Default constructor.
NodeApplication_Impl (CORBA::ORB_ptr o,
- PortableServer::POA_ptr p,
- NodeApp_Configurator &c);
+ PortableServer::POA_ptr p);
/// Default destructor.
virtual ~NodeApplication_Impl (void);
@@ -220,9 +219,6 @@ namespace CIAO
//document it?
PortableServer::POA_var poa_;
- // Configurator for allocating NodeApp resources and policies
- NodeApp_Configurator &configurator_;
-
/// Cached properties
Deployment::Properties properties_;
diff --git a/TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.inl b/TAO/CIAO/ciao/NodeApplication_Impl.inl
index bf504f337fb..d0a30e2b401 100644
--- a/TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.inl
+++ b/TAO/CIAO/ciao/NodeApplication_Impl.inl
@@ -4,12 +4,10 @@
ACE_INLINE
CIAO::NodeApplication_Impl::
NodeApplication_Impl (CORBA::ORB_ptr o,
- PortableServer::POA_ptr p,
- NodeApp_Configurator &c)
+ PortableServer::POA_ptr p)
: orb_ (CORBA::ORB::_duplicate (o)),
- poa_ (PortableServer::POA::_duplicate (p)),
- configurator_ (c)
+ poa_ (PortableServer::POA::_duplicate (p))
{
}