[Ace-users] old servant is called instead of newly created one

Petra petra.lung at nsn.com
Thu Jan 31 02:01:08 CST 2008


ACE VERSION: 5.5.6
HOST MACHINE and OPERATING SYSTEM:
sun solaris 10
TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
COMPILER NAME AND VERSION (AND PATCHLEVEL):
CC: Sun C++ 5.7 Patch 117830-08 2006/07/12
THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform-
specific file, simply state which one]:
#include "ace/config-sunos5.10.h"
THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE [if you
use a link to a platform-specific file, simply state which one
(unless this isn't used in this case, e.g., with Microsoft Visual
C++)]:
include $(ACE_ROOT)/include/makeinclude/platform_sunos5_sunc++.GNU
CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features
(used by MPC when you generate your own makefiles
ssl=0
qos=0
DOES THE PROBLEM AFFECT:
EXECUTION: yes
DESCRIPTION:

We have two programs A and B on different hosts,
communicating with oneway void CORBA messages.

A creates a servant and a corresponding CORBA object, A_Obj_1, and
sends A_Obj_1  to B (as a parameter of a CORBA method).
B has to send replies calls to the CORBA object A_Obj_1.

>From time to time, a new servant and CORBA object A_Obj_2 is created
and sent to B.

Problem: Replies addressed to A_Obj_2 are received by A_Obj_1
  (respectively the method of the underlying servant 1 is called)!


A creates its objects with the following code (assuming an interface
XYZ and a class XYZ_impl):

     POA_XYZ_tie<XYZ_impl>* objectTieServant = new POA_XYZ_tie<
XYZ_impl>(new XYZ_impl(), childPoa);
     PortableServer::ServantBase_var XYZ_managed = objectTieServant;
     currentObject = objectTieServant->_this();


Does anybody know why this happens?

Thanks in advance for any hint!
  Petra


More information about the Ace-users mailing list