summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-12-19 01:23:18 +0000
committerbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-12-19 01:23:18 +0000
commitb7321bb960b613ba1019e3c8740a0de090c2d321 (patch)
tree5d6e2023b6b96e16e1bcda1f57d986c9fe19ba47
parent4f12c054417a4a4c8dea0e8216c82e7ed9aaf391 (diff)
downloadATCD-b7321bb960b613ba1019e3c8740a0de090c2d321.tar.gz
ChangeLogTag:Sat Dec 18 19:21:01 1999 Darrell Brunsch <brunsch@cs.wustl.edu>
-rw-r--r--TAO/ChangeLog-99c8
-rw-r--r--TAO/tao/POA.cpp33
2 files changed, 39 insertions, 2 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c
index 57b0468d263..7a718c97c78 100644
--- a/TAO/ChangeLog-99c
+++ b/TAO/ChangeLog-99c
@@ -1,3 +1,11 @@
+Sat Dec 18 19:21:01 1999 Darrell Brunsch <brunsch@cs.wustl.edu>
+
+ * tao/POA.cpp: Fixed the imr_notify_startup method to not
+ deadlock. But the change required the server_object to
+ be moved into the current POA, instead of the root. This
+ means a POA registered with the IMR must also have the
+ USER_ID policy in addition to the PERSITENT policy (for now).
+
Sat Dec 18 17:01:11 1999 Darrell Brunsch <brunsch@cs.wustl.edu>
* orbsvcs/Time_Service/Server_i.cpp:
diff --git a/TAO/tao/POA.cpp b/TAO/tao/POA.cpp
index fb23cda6142..c984299700d 100644
--- a/TAO/tao/POA.cpp
+++ b/TAO/tao/POA.cpp
@@ -3699,6 +3699,9 @@ orbkey:
void
TAO_POA::imr_notify_startup (CORBA_Environment &ACE_TRY_ENV)
{
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG, "Notifing IMR of Startup\n"));
+
CORBA::Object_var imr = this->orb_core ().implrepo_service ();
if (CORBA::is_nil (imr.in ()))
@@ -3708,9 +3711,25 @@ TAO_POA::imr_notify_startup (CORBA_Environment &ACE_TRY_ENV)
ServerObject_i (this->orb_core_.orb ()),
CORBA::NO_MEMORY ());
ACE_CHECK;
+
+ // @@ (brunsch) The server should really be in the root poa, but
+ // there are locking issues...
+
+ PortableServer::ObjectId_var id =
+ PortableServer::string_to_ObjectId ("_tao_imr_server_object");
+
+ this->activate_object_with_id_i (id.in (),
+ this->server_object_,
+ ACE_TRY_ENV);
+ ACE_CHECK;
+
+ CORBA::Object_var obj = this->id_to_reference_i (id.in (),
+ ACE_TRY_ENV);
+ ACE_CHECK;
- ImplementationRepository::ServerObject_ptr svr =
- this->server_object_->_this (ACE_TRY_ENV);
+ ImplementationRepository::ServerObject_ptr svr
+ = ImplementationRepository::ServerObject::_narrow (obj.in (),
+ ACE_TRY_ENV);
ACE_CHECK;
if (!svr->_stubobj () || !svr->_stubobj ()->profile_in_use ())
@@ -3745,16 +3764,26 @@ TAO_POA::imr_notify_startup (CORBA_Environment &ACE_TRY_ENV)
ImplementationRepository::Administration::_narrow (imr.in (), ACE_TRY_ENV);
ACE_CHECK;
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG, "Informing IMR that we are running at: %s\n", curr_addr.in ()));
+
imr_admin->server_is_running (this->the_name (),
curr_addr.in (),
svr,
ACE_TRY_ENV);
ACE_CHECK;
+
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG, "Successfully notified IMR of Startup\n"));
+
}
void
TAO_POA::imr_notify_shutdown (void)
{
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG, "Notifing IMR of Shutdown\n"));
+
// Notify the Implementation Repository about shutting down.
CORBA::Object_var imr = this->orb_core ().implrepo_service ();