コード例 #1
0
ファイル: CosNotify_Service.cpp プロジェクト: CCJY/ATCD
void
TAO_CosNotify_Service::init_i2 (CORBA::ORB_ptr orb, CORBA::ORB_ptr dispatching_orb)
{
  // Obtain the Root POA
  CORBA::Object_var object  =
    orb->resolve_initial_references("RootPOA");

  if (CORBA::is_nil (object.in ()))
    ORBSVCS_ERROR ((LM_ERROR, " (%P|%t) Unable to resolve the RootPOA.\n"));

  PortableServer::POA_var default_poa = PortableServer::POA::_narrow (object.in ());

  // Set the properties
  TAO_Notify_Properties* properties = TAO_Notify_PROPERTIES::instance();

  properties->orb (orb);
  properties->dispatching_orb (dispatching_orb);
  properties->separate_dispatching_orb (true);

  properties->default_poa (default_poa.in ());

  // Init the factory and builder
  this->factory_.reset (this->create_factory ());
  ACE_ASSERT( this->factory_.get() != 0 );
  TAO_Notify_PROPERTIES::instance()->factory (this->factory_.get());

  this->builder_.reset (this->create_builder ());
  ACE_ASSERT( this->builder_.get() != 0 );
  TAO_Notify_PROPERTIES::instance()->builder (this->builder_.get());
}
コード例 #2
0
void
TAO_Notify_EventChannelFactory::destroy (void)
{
    if (this->shutdown () == 1)
        return;

    TAO_Notify_Properties* properties = TAO_Notify_PROPERTIES::instance();

    // Reset references to CORBA objects.
    properties->orb (CORBA::ORB::_nil ());
    properties->default_poa (PortableServer::POA::_nil ());

    ec_container_.reset( 0 );
}