ImR_Activator_i.cpp File Reference

#include "ImR_Activator_i.h"
#include "Activator_Options.h"
#include "tao/ORB_Core.h"
#include "ace/Reactor.h"
#include "ace/ARGV.h"
#include "ace/OS_NS_unistd.h"
#include "ace/OS_NS_stdio.h"
#include "ace/os_include/os_netdb.h"

Include dependency graph for ImR_Activator_i.cpp:

Go to the source code of this file.

Functions

static ACE_CString getHostName ()
static PortableServer::POA_ptr createPersistentPOA (PortableServer::POA_ptr root_poa, const char *poa_name)


Function Documentation

static PortableServer::POA_ptr createPersistentPOA ( PortableServer::POA_ptr  root_poa,
const char *  poa_name 
) [static]

Definition at line 32 of file ImR_Activator_i.cpp.

References TAO_Objref_Var_T< T >::_retn().

Referenced by ImR_Locator_i::init_with_orb(), and ImR_Activator_i::init_with_orb().

00033 {
00034   PortableServer::LifespanPolicy_var life =
00035     root_poa->create_lifespan_policy (PortableServer::PERSISTENT);
00036 
00037   PortableServer::IdAssignmentPolicy_var assign =
00038     root_poa->create_id_assignment_policy (PortableServer::USER_ID);
00039 
00040   CORBA::PolicyList pols;
00041   pols.length (2);
00042   pols[0] = PortableServer::LifespanPolicy::_duplicate (life.in ());
00043   pols[1] = PortableServer::IdAssignmentPolicy::_duplicate (assign.in ());
00044 
00045   PortableServer::POAManager_var mgr = root_poa->the_POAManager ();
00046   PortableServer::POA_var poa =
00047     root_poa->create_POA(poa_name, mgr.in (), pols);
00048 
00049   life->destroy ();
00050   assign->destroy ();
00051 
00052   return poa._retn ();
00053 }

static ACE_CString getHostName (  )  [static]

Definition at line 15 of file ImR_Activator_i.cpp.

References ACE_OS::hostname(), and MAXHOSTNAMELEN.

00016 {
00017   char host_name[MAXHOSTNAMELEN];
00018   ACE_OS::hostname (host_name, MAXHOSTNAMELEN);
00019   return ACE_CString (host_name);
00020 }


Generated on Tue Feb 2 17:46:57 2010 for TAO_Implementation_Repository by  doxygen 1.4.7