Bug 2452

Summary: Problem with SYSTEM_ID, PERSISTENT and activate_object_with_id
Product: TAO Reporter: Johnny Willemsen <jwillemsen>
Component: POAAssignee: DOC Center Support List (internal) <tao-support>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 1.5   
Hardware: All   
OS: All   

Description Johnny Willemsen 2006-03-16 09:01:04 CST
Found a problem using SYTEM_ID, PERSISTENT and activate_object_with_id. See the
diff below as extension for a test. What we now see is the we can activate the
object and when we give the object ref to the client and the client uses it, we
can't demarshal it because the code expects a fixed length part for the poa
name. To my idea the activate_object_with_id should check whether the passed oid
is a system id generated one. After investigation I found that in
TAO_Root_POA::is_poa_generated_id this is normally done, but all code there is
guarded by POA_NAME_IN_POA_GENERATED_ID which is not set so this check is not
done. When this define is removed the activate_object_with_id gives a bad param
exception as I would expect but I want to get some more feedback on this.

RCS file:
/project/cvs-repository/ACE_wrappers-repository/TAO/tests/POA/Persistent_ID/server.cpp,v
retrieving revision 1.12
diff -u -u -w -b -r1.12 server.cpp
--- server.cpp	16 Mar 2006 11:28:49 -0000	1.12
+++ server.cpp	16 Mar 2006 14:27:47 -0000
@@ -145,6 +145,9 @@
 
   PortableServer::ServantBase_var safe_servant (servant);
 
+  ACE_CString id ("MyId");
+  this->oid_ = PortableServer::string_to_ObjectId(id.c_str());
+
   if (this->oid_.ptr () == 0)
     {
       this->oid_ =
Comment 1 Johnny Willemsen 2006-03-16 09:38:02 CST
this seems to work now without change, no idea what happened on my system. but
the question stays why the check whether the id is generated by the poa is not done.
Comment 2 Johnny Willemsen 2006-03-16 09:46:42 CST
ok, found the problem, this only fails when the oid passed is bigger then 20
characters.
Comment 3 Johnny Willemsen 2006-03-21 06:15:25 CST
to normal pool