2 #include "Client_Task.h"
6 Client_Task::Client_Task (Test::Big_Reply_ptr reply_gen
,
8 ACE_Thread_Manager
*thr_mgr
)
9 : ACE_Task_Base (thr_mgr
)
10 , reply_gen_ (Test::Big_Reply::_duplicate (reply_gen
))
11 , event_count_ (event_count
)
17 Client_Task::svc (void)
19 ACE_DEBUG ((LM_DEBUG
, "(%P|%t) Starting client task\n"));
21 // Make the connections ..
22 this->validate_connection ();
24 ACE_DEBUG ((LM_DEBUG
, "(%P|%t) Starting big reply\n"));
27 // Now get the big replies..
30 for (int i
= 0; i
!= this->event_count_
; ++i
)
32 Test::Octet_Seq_var dummy
=
33 this->reply_gen_
->get_big_reply ();
36 catch (const CORBA::Exception
& ex
)
38 ex
._tao_print_exception ("Exception Caught\n");
42 ACE_DEBUG ((LM_DEBUG
, "(%P|%t) Client task finished\n"));
47 Client_Task::validate_connection (void)
49 ACE_DEBUG ((LM_DEBUG
, "(%P|%t) Validating connection ..\n"));
52 // Try to setup a connection to the remote server, ignoring all the
53 // exceptions that are expected (see bug 189 on why it is so). We
54 // could use a a validate_connection for it . But we want this test
55 // to work with Minimum CORBA builds too..
56 for (int i
= 0; i
!= 100; ++i
)
60 this->reply_gen_
->ping ();
62 catch (const CORBA::Exception
&)