1 #include "SharedIntf_i.h"
2 #include "ace/Log_Priority.h"
3 #include "ace/OS_NS_unistd.h"
5 #include "tao/Messaging/Messaging.h"
6 #include "tao/PolicyC.h"
7 #include "tao/AnyTypeCode/Any.h"
9 Test_Idl_SharedIntf_i::Test_Idl_SharedIntf_i(CORBA::ORB_ptr orb
)
15 Test_Idl_SharedIntf_i::~Test_Idl_SharedIntf_i() {}
18 Test_Idl_SharedIntf_i::set_upper (const char *ior
)
20 this->upper_ior
= CORBA::string_dup (ior
);
24 Test_Idl_SharedIntf_i::do_upcall ()
26 ACE_DEBUG((LM_DEBUG
,"(%P|%t) Test_Idl_SharedIntf::do_upcall called\n"));
28 CORBA::Object_var obj
=
29 orb_
->resolve_initial_references ("ORBPolicyManager");
31 CORBA::PolicyManager_var policy_manager_
=
32 CORBA::PolicyManager::_narrow (obj
.in ());
34 TimeBase::TimeT timeout
= 10000 * 100;
39 CORBA::PolicyList
policy_list (1);
40 policy_list
.length (1);
42 orb_
->create_policy (Messaging::RELATIVE_RT_TIMEOUT_POLICY_TYPE
,
45 policy_manager_
->set_policy_overrides (policy_list
,
49 obj
= this->orb_
->string_to_object (this->upper_ior
.in());
50 Test_Idl::SharedIntf_var upper
= Test_Idl::SharedIntf::_narrow (obj
.in());
52 ACE_DEBUG((LM_DEBUG
,"(%P|%t) Test_Idl_SharedIntf::do_upcall returning\n"));
55 void Test_Idl_SharedIntf_i::ping ()
57 ACE_DEBUG((LM_DEBUG
,"(%P|%t) Test_Idl_SharedIntf::ping - called\n"));
60 void Test_Idl_SharedIntf_i::farewell ()
62 ACE_DEBUG((LM_INFO
,"(%P|%t) farewell begins\n"));
63 // if (!CORBA::is_nil (this->upper_.in ()))
65 // this->upper_->farewell ();
67 this->orb_
->shutdown ();
68 ACE_DEBUG((LM_INFO
,"(%P|%t) farewell completes\n"));