[omniORB] Problem with Adding corba reference to the STL set

guru.jalsar guru guru.jalsar at gmail.com
Tue Oct 20 12:09:41 BST 2009


Hi,

Servant implementation:

In Method

CORBA::Object_ptr GetReference(const char *name)
{
     //resolve naming service with given name as input parameter
       return ns->resolve(name);
}

Client side implementation:

I am getting reference to above method and accessing it through that
reference

CORBA::Object_var obj = server->GetReference("name");

I am trying to send this "obj" as input parameter to other server side
method as

void AddReference(CORBA::Object_ptr obj)
{
   //i had created a STl set and i am tring to insert this referenc in it
  //typedef set<CORBA::Object_ptr> list_;
//list_ objList_;
objList_.insert(obj);
}

Now from client side i am calling this AddReference passing with same obj
multiple times like

AddReference(obj);
AddReference(obj);

and now with debug messages on server side, when i iterate the STL set,it is
printing twice,but this should not happen beacuse,when we pass same
object_ptr multiple times,it should avoid adding duplication,but this is not
happening in my case.

Please suggest me where i am doing wrong.

guru
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20091020/6d9e66e8/attachment.htm


More information about the omniORB-list mailing list