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());

}
Exemple #3
0
  virtual CORBA::Long get (void)
  {
    ++n_;
    CORBA::Object_var obj = orb_->resolve_initial_references("POACurrent");
    PortableServer::Current_var cur = PortableServer::Current::_narrow(obj.in());
    ACE_ASSERT(! CORBA::is_nil(cur.in()));
    PortableServer::POA_var poa = cur->get_POA();
    CORBA::String_var poaname = poa->the_name();

    ACE_DEBUG((LM_DEBUG, "%s: get() %d\n", poaname.in(), n_));
    return n_;
  }
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 #5
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());
}