40 #include "../../Logger.hpp" 42 #if defined( CORBA_IS_TAO ) && defined( CORBA_TAO_HAS_MESSAGING ) 43 #include <tao/TimeBaseC.h> 44 #include <tao/Messaging/Messaging.h> 56 if ( !CORBA::is_nil(
orb) )
62 CORBA::ORB_init (argc, const_cast<char**>(argv),
66 #if defined( CORBA_IS_TAO ) && defined( CORBA_TAO_HAS_MESSAGING ) 69 TimeBase::TimeT relative_rt_timeout = timeout * 1.0e7;
70 CORBA::Any relative_rt_timeout_as_any;
71 relative_rt_timeout_as_any <<= relative_rt_timeout;
74 CORBA::PolicyList policies;
77 orb->create_policy (Messaging::RELATIVE_RT_TIMEOUT_POLICY_TYPE,
78 relative_rt_timeout_as_any);
81 CORBA::Object_var obj =
orb->resolve_initial_references (
"ORBPolicyManager");
82 CORBA::PolicyManager_var policy_manager = CORBA::PolicyManager::_narrow (obj.in());
83 policy_manager->set_policy_overrides (policies, CORBA::SET_OVERRIDE);
85 log(
Error) <<
"Ignoring ORB timeout setting in non-TAO/Messaging build." <<
endlog();
86 #endif // CORBA_IS_TAO 89 CORBA::Object_var poa_object =
90 orb->resolve_initial_references (
"RootPOA");
92 PortableServer::POA::_narrow (poa_object.in ());
93 PortableServer::POAManager_var poa_manager =
95 poa_manager->activate ();
99 catch (CORBA::Exception &e) {
static std::ostream & nl(std::ostream &__os)
#define CORBA_EXCEPTION_INFO(x)
static RTT_CORBA_API bool InitOrb(int argc, char *argv[], Seconds orb_timeout=0)
static PortableServer::POA_var rootPOA
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
static Logger::LogFunction endlog()
static CORBA::ORB_var orb