1 #include "Client_Worker.h"
4 Client_Worker::Client_Worker (Simple_Server_ptr server
,
5 Another_One_ptr another
,
7 : server_ (Simple_Server::_duplicate(server
)),
8 another_ (Another_One::_duplicate (another
)),
9 niterations_ (niterations
)
14 Client_Worker::validate_connection (void)
16 // Ping the object 100 times, ignoring all exceptions.
17 // It would be better to use validate_connection() but the test must
18 // run on minimum CORBA builds too!
20 for (int j
= 0; j
!= 100; ++j
)
24 this->server_
->test_method (j
);
25 this->another_
->test_method (j
);
26 if(TAO_debug_level
> 0)
27 ACE_DEBUG (( LM_DEBUG
,
28 "******** VALIDATED *******\n"));
30 catch (const CORBA::Exception
&)
37 Client_Worker::svc (void)
42 // Validate connections befire doing any actual work..
43 this->validate_connection ();
45 for (int i
= 0; i
< this->niterations_
; ++i
)
47 this->server_
->test_method (i
);
48 this->another_
->test_method (i
);
50 if (TAO_debug_level
> 0)
52 " (%P|%t) iteration = %d\n",
56 catch (const CORBA::Exception
& ex
)
58 ex
._tao_print_exception ("Client_Worker : Exception Raised");