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) {
double Seconds
Seconds are stored as a double precision float.
static std::ostream & nl(std::ostream &__os)
Insert a newline ' ' in the ostream.
#define CORBA_EXCEPTION_INFO(x)
static RTT_CORBA_API bool InitOrb(int argc, char *argv[], Seconds orb_timeout=0)
Invoke this method once to initialise the Orb which will run the task servers.
static PortableServer::POA_var rootPOA
The root POA of this process.
static Logger & log()
As Instance(), but more userfriendly.
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
static CORBA::ORB_var orb
The orb of this process.