Exemple #1
0
// Override the disconnect_push_consumer() operation.
void Consumer_i::disconnect_push_consumer()
{
  // Deactivate this object.
  CORBA::Object_var obj = orb_->resolve_initial_references("POACurrent");
  PortableServer::Current_var current = PortableServer::Current::_narrow(obj.in());
  PortableServer::POA_var poa = current->get_POA();
  PortableServer::ObjectId_var objectId = current->get_object_id();
  poa->deactivate_object(objectId.in());
}
void
StructuredEventSupplier_i::disconnect_structured_push_supplier ()
{

  CORBA::Object_var obj = orb_->resolve_initial_references ("POACurrent");
  PortableServer::Current_var current =
    PortableServer::Current::_narrow (obj.in());
  PortableServer::POA_var poa = current->get_POA ();
  PortableServer::ObjectId_var objectId = current->get_object_id ();
  poa->deactivate_object (objectId.in());

}
void  PushSupplier_impl::disconnect_push_supplier (
)
{

    reactor_task_.reactor_->end_reactor_event_loop();

    PortableServer::Current_var current =
        resolve_init<PortableServer::Current>(orb_.in(), "POACurrent");

    PortableServer::POA_var poa = current->get_POA();

    PortableServer::ObjectId_var oid = current->get_object_id();

    poa->deactivate_object (oid.in ());
}
Exemple #4
0
void UpdateableHandler::dispatch(UpdateableHandler::Handler handler)
{
    PortableServer::Current_var current =
        resolve_init<PortableServer::Current>(strategy_->orb(),
                "POACurrent");

    PortableServer::ObjectId_var object_id =
        current->get_object_id();

    Update_Manager* mgr;
    int id;

    ACE_OS::memcpy(&mgr, object_id->get_buffer(), sizeof(mgr));
    ACE_OS::memcpy(&id, object_id->get_buffer()+sizeof(mgr), sizeof(id));

    ORBSVCS_DEBUG((LM_DEBUG, "%d\n", id));

    (mgr->*handler)(id);

    strategy_->poa()->deactivate_object(object_id.in());
}