4 #include "tao/PortableServer/ForwardRequestC.h"
6 test_i::test_i (CORBA::Short id
,
9 , orb_ (CORBA::ORB::_duplicate (orb
))
10 , to_ (CORBA::Object::_nil ())
11 , request_pass_count_ (0)
17 test_i::forward (CORBA::Object_ptr to
,
18 CORBA::ULong request_pass_count
)
20 this->to_
= CORBA::Object::_duplicate (to
);
21 this->request_pass_count_
= request_pass_count
;
25 test_i::collocated_call ()
27 this->request_count_
++;
30 "Collocated call is executed in object with id %d.\n",
33 if (!CORBA::is_nil (this->to_
.in ()))
35 if (this->request_count_
== this->request_pass_count_
)
38 "SERVER: Request %d will be forwarded "
39 "to object 'to'\nSERVER: via collocated_call().\n",
40 this->request_count_
));
42 // Throw forward exception
43 throw PortableServer::ForwardRequest (this->to_
.in ());