1 #include "SharedIntf_i.h"
5 Chatter::Chatter (CORBA::ORB_ptr orb
, const ACE_TCHAR
*ior
, ACE_Condition
<ACE_Mutex
>& cond
)
17 return this->nreplies_
;
23 return this->nrequests_
;
34 // get server ior from file
35 CORBA::Object_var rawObject
= orb_
->string_to_object(ior_
);
37 Test_Idl::SharedIntf_var intf_var
=
38 Test_Idl::SharedIntf::_narrow(rawObject
.in());
40 if (CORBA::is_nil (intf_var
.in ()))
41 ACE_ERROR_RETURN ((LM_ERROR
, "Nil reference <%s>\n", ior_
), -1);
43 // make call on server
45 ACE_GUARD_RETURN (TAO_SYNCH_MUTEX
, guard
, request_reply_count_mutex_
, -1);
49 ACE_DEBUG((LM_INFO
,"(%P|%t) Chatter[%d] started for %s\n", nrq
, ior_
));
52 ACE_GUARD_RETURN (TAO_SYNCH_MUTEX
, guard
, request_reply_count_mutex_
, -1);
56 ACE_DEBUG((LM_INFO
,"(%P|%t) Chatter[%d,%d,%d] completed for %s\n", nrq
, nrequests_
, nreplies_
, ior_
));
60 catch (const CORBA::Exception
& ex
)
62 ex
._tao_print_exception ("Exception caught:");
63 ACE_DEBUG((LM_INFO
,"(%P|%t) Chatter[%d] %p for %s\n", nrq
, "failed", ior_
));
73 ACE_DEBUG((LM_INFO
,"(%P|%t) Farewell requested for %s\n", ior_
));
75 // get server ior from file
76 CORBA::Object_var rawObject
= orb_
->string_to_object( ior_
);
78 Test_Idl::SharedIntf_var intf_var
=
79 Test_Idl::SharedIntf::_narrow(rawObject
.in());
81 if (CORBA::is_nil (intf_var
.in ()))
82 ACE_ERROR_RETURN ((LM_ERROR
, "Nil reference <%s>\n", ior_
), -1);
84 // make call on server
85 ACE_DEBUG((LM_INFO
,"(%P|%t) farewell START for %s\n", ior_
));
88 ACE_DEBUG((LM_INFO
,"(%P|%t) farewell COMPLETE for %s\n", ior_
));
90 catch (const CORBA::Exception
& ex
)
92 ex
._tao_print_exception ("Exception caught:");
93 ACE_DEBUG((LM_INFO
,"(%P|%t) %p for %s\n", "farewell FAILED", ior_
));