2 #include "Client_Task.h"
5 Client_Task::Client_Task (Test::Big_Reply_ptr reply_gen
,
7 ACE_Thread_Manager
*thr_mgr
)
8 : ACE_Task_Base (thr_mgr
)
9 , reply_gen_ (Test::Big_Reply::_duplicate (reply_gen
))
10 , event_count_ (event_count
)
18 ACE_DEBUG ((LM_DEBUG
, "(%P|%t) Starting client task\n"));
20 // Make the connections ..
21 this->validate_connection ();
23 ACE_DEBUG ((LM_DEBUG
, "(%P|%t) Starting big reply\n"));
26 // Now get the big replies..
29 for (int i
= 0; i
!= this->event_count_
; ++i
)
31 Test::Octet_Seq_var dummy
=
32 this->reply_gen_
->get_big_reply ();
35 catch (const CORBA::Exception
& ex
)
37 ex
._tao_print_exception ("Exception Caught\n");
41 ACE_DEBUG ((LM_DEBUG
, "(%P|%t) Client task finished\n"));
46 Client_Task::validate_connection ()
48 ACE_DEBUG ((LM_DEBUG
, "(%P|%t) Validating connection ..\n"));
51 // Try to setup a connection to the remote server, ignoring all the
52 // exceptions that are expected (see bug 189 on why it is so). We
53 // could use a a validate_connection for it . But we want this test
54 // to work with Minimum CORBA builds too..
55 for (int i
= 0; i
!= 100; ++i
)
59 this->reply_gen_
->ping ();
61 catch (const CORBA::Exception
&)