2 #include "ace/Log_Msg.h"
3 #include "ace/Thread.h"
4 #include "ace/os_include/os_pthread.h"
7 #include "ace/Log_Msg.h"
8 #include "tao/AnyTypeCode/Any.h"
9 #include "tao/Policy_Manager.h"
10 #include "tao/TimeBaseC.h"
14 ACE_THR_FUNC_RETURN
main_orb(void*)
20 CORBA::ORB_var orb
= CORBA::ORB_init (argc
, argv
);
22 TimeBase::TimeT CONNECTION_TIMEOUT
= 1000000;
23 TimeBase::TimeT ROUND_TRIP_TIMEOUT
= 1000000;
25 if (!CORBA::is_nil(orb
.in()))
27 ACE_DEBUG((LM_DEBUG
, "ORB not nil\n"));
29 CORBA::Any connection_timeout_as_any
;
30 connection_timeout_as_any
<<= CONNECTION_TIMEOUT
;
32 CORBA::Any rt_timeout_as_any
;
33 rt_timeout_as_any
<<= ROUND_TRIP_TIMEOUT
;
36 ACE_DEBUG((LM_DEBUG
, "Destroyed ORB\n"));
39 catch(const ::CORBA::Exception
& ex
)
42 ex
._tao_print_exception ("Exception caught:");
47 ACE_ERROR ((LM_ERROR
, " (%P|%t) Unknown error\n"));
54 int ACE_TMAIN(int, ACE_TCHAR
*[])
56 ACE_hthread_t thread1
;
57 # if defined (ACE_HAS_PTHREADS)
58 pthread_create(&thread1
, 0, main_orb
, 0);
60 ACE_Thread::spawn (main_orb
, 0, THR_NEW_LWP
|THR_JOINABLE
, 0, &thread1
);
62 ACE_Thread::join( thread1
);