summaryrefslogtreecommitdiff
path: root/TAO
diff options
context:
space:
mode:
authormcorino <mcorino@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-08-23 09:40:04 +0000
committermcorino <mcorino@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-08-23 09:40:04 +0000
commitdfac30d092fb05b5b3ef475eac40cdc41f938554 (patch)
treeffed19fe4a56d362ca8676baed12b894e72ed425 /TAO
parent4ecb21a775ffbe42826ec5a65465fddfde1d44b1 (diff)
downloadATCD-dfac30d092fb05b5b3ef475eac40cdc41f938554.tar.gz
Mon Aug 23 09:38:41 UTC 2010 Martin Corino <mcorino@remedy.nl>
* tao/PortableServer/Active_Object_Map.cpp: Implements patches from Bugzilla 3655 (with changes).
Diffstat (limited to 'TAO')
-rw-r--r--TAO/ChangeLog5
-rw-r--r--TAO/tao/PortableServer/Active_Object_Map.cpp99
2 files changed, 104 insertions, 0 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 7a1294382c5..a21cf516a56 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,8 @@
+Mon Aug 23 09:38:41 UTC 2010 Martin Corino <mcorino@remedy.nl>
+
+ * tao/PortableServer/Active_Object_Map.cpp:
+ Implements patches from Bugzilla 3655 (with changes).
+
Mon Aug 23 09:31:41 UTC 2010 Martin Corino <mcorino@remedy.nl>
* tao/Transport_Cache_Manager_T.inl:
diff --git a/TAO/tao/PortableServer/Active_Object_Map.cpp b/TAO/tao/PortableServer/Active_Object_Map.cpp
index b6d7ef67b11..d262b6ac40a 100644
--- a/TAO/tao/PortableServer/Active_Object_Map.cpp
+++ b/TAO/tao/PortableServer/Active_Object_Map.cpp
@@ -11,6 +11,8 @@
#include "ace/Auto_Ptr.h"
#include "ace/CORBA_macros.h"
+#include "TAO/tao/debug.h"
+#include "PortableServer_Functions.h"
ACE_RCSID(PortableServer,
Active_Object_Map,
@@ -21,6 +23,21 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL
/* static */
size_t TAO_Active_Object_Map::system_id_size_ = 0;
+static void
+hexstring (ACE_CString& hexstr, const char* s, size_t l)
+{
+ char buf[3] = {0};
+
+ hexstr.fast_resize (2 + l * 2);
+ hexstr.append ("0x", 2);
+ while (--l)
+ {
+ ACE_OS::sprintf (buf, "%02x", (unsigned int)(unsigned char)*s);
+ hexstr.append (buf, 2);
+ ++s;
+ }
+}
+
void
TAO_Active_Object_Map::set_system_id_size (
const TAO_Server_Strategy_Factory::Active_Object_Map_Creation_Parameters &creation_parameters)
@@ -492,6 +509,19 @@ TAO_Unique_Id_Strategy::bind_using_user_id (
}
}
+ if (result == 0 && TAO_debug_level > 7)
+ {
+ CORBA::String_var idstr (PortableServer::ObjectId_to_string (user_id));
+ ACE_CString hex_idstr;
+ hexstring (hex_idstr, idstr.in (), user_id.length ());
+
+ ACE_DEBUG ((LM_DEBUG,
+ "TAO (%P|%t) - TAO_Unique_Id_Strategy::bind_using_user_id: type=%C, id=%C\n",
+ servant ? servant->_repository_id () : "(null)",
+ hex_idstr.c_str()
+ ));
+ }
+
return result;
}
@@ -504,6 +534,19 @@ TAO_Unique_Id_Strategy::unbind_using_user_id (
entry);
if (result == 0)
{
+ if (TAO_debug_level > 7)
+ {
+ CORBA::String_var idstr (
+ PortableServer::ObjectId_to_string (entry->user_id_));
+ ACE_CString hex_idstr;
+ hexstring (hex_idstr, idstr.in (), entry->user_id_.length ());
+
+ ACE_DEBUG ((LM_DEBUG,
+ "TAO (%P|%t) - TAO_Unique_Id_Strategy::unbind_using_user_id: id=%C\n",
+ hex_idstr.c_str()
+ ));
+ }
+
if (entry->servant_ != 0)
{
result =
@@ -658,6 +701,19 @@ TAO_Multiple_Id_Strategy::bind_using_user_id (
}
}
+ if (result == 0 && TAO_debug_level > 7)
+ {
+ CORBA::String_var idstr (PortableServer::ObjectId_to_string (user_id));
+ ACE_CString hex_idstr;
+ hexstring (hex_idstr, idstr.in (), user_id.length ());
+
+ ACE_DEBUG ((LM_DEBUG,
+ "TAO (%P|%t) - TAO_Multiple_Id_Strategy::bind_using_user_id: type=%C, id=%C\n",
+ servant != 0 ? servant->_repository_id () : "(null)",
+ hex_idstr.c_str()
+ ));
+ }
+
return result;
}
@@ -670,6 +726,19 @@ TAO_Multiple_Id_Strategy::unbind_using_user_id (
entry);
if (result == 0)
{
+ if (TAO_debug_level > 7)
+ {
+ CORBA::String_var idstr (
+ PortableServer::ObjectId_to_string (entry->user_id_));
+ ACE_CString hex_idstr;
+ hexstring (hex_idstr, idstr.in (), entry->user_id_.length ());
+
+ ACE_DEBUG ((LM_DEBUG,
+ "TAO (%P|%t) - TAO_Multiple_Id_Strategy::unbind_using_user_id: id=%C\n",
+ hex_idstr.c_str()
+ ));
+ }
+
result = this->active_object_map_->id_hint_strategy_->unbind (*entry);
if (result == 0)
@@ -926,6 +995,21 @@ TAO_System_Id_With_Unique_Id_Strategy::bind_using_system_id (
delete entry;
}
+ if (result == 0 && TAO_debug_level > 7)
+ {
+ CORBA::String_var idstr (
+ PortableServer::ObjectId_to_string (entry->user_id_));
+ ACE_CString hex_idstr;
+ hexstring (hex_idstr, idstr.in (), entry->user_id_.length ());
+
+ ACE_DEBUG ((LM_DEBUG,
+ "TAO (%P|%t) - TAO_System_Id_With_Unique_Id_Strategy::"
+ "bind_using_system_id: type=%C, id=%C\n",
+ servant->_repository_id (),
+ hex_idstr.c_str()
+ ));
+ }
+
return result;
}
@@ -965,6 +1049,21 @@ TAO_System_Id_With_Multiple_Id_Strategy::bind_using_system_id (
delete entry;
}
+ if (result == 0 && TAO_debug_level > 7)
+ {
+ CORBA::String_var idstr (
+ PortableServer::ObjectId_to_string (entry->user_id_));
+ ACE_CString hex_idstr;
+ hexstring (hex_idstr, idstr.in (), entry->user_id_.length ());
+
+ ACE_DEBUG ((LM_DEBUG,
+ "TAO (%P|%t) - TAO_System_Id_With_Multiple_Id_Strategy::"
+ "bind_using_system_id: type=%C, id=%C\n",
+ servant->_repository_id (),
+ hex_idstr.c_str()
+ ));
+ }
+
return result;
}
#endif