本文整理汇总了C++中portableserver::Servant::_remove_ref方法的典型用法代码示例。如果您正苦于以下问题:C++ Servant::_remove_ref方法的具体用法?C++ Servant::_remove_ref怎么用?C++ Servant::_remove_ref使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类portableserver::Servant
的用法示例。
在下文中一共展示了Servant::_remove_ref方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: throw
void TIDNaming::ServantManagerNSImpl::etherealize(const PortableServer::ObjectId& oid,
PortableServer::POA_ptr adapter,
PortableServer::Servant servant,
CORBA::Boolean cleanup_in_progress,
CORBA::Boolean remaining_activations)
throw (CORBA::SystemException)
{
char* oid_str = PortableServer::ObjectId_to_string(oid);
if (m_orb->trace != NULL){
TIDorb::util::StringBuffer msg;
msg << "ServantManagerNSImpl::etherealize OID=" << oid_str;
m_orb->print_trace(TIDorb::util::TR_USER, msg.str().data());
}
delete oid_str;
// Servant could be deleted by destroy() because it calls to deactivate_object(oid)
if (!remaining_activations) {
try {
servant->_remove_ref();
} catch (...) {
if (m_orb->trace != NULL){
TIDorb::util::StringBuffer msg;
msg << "ServantManagerNSImpl::etherealize: unknown exception removing servant ";
m_orb->print_trace(TIDorb::util::TR_ERROR, msg.str().data());
}
}
}
}
示例2:
void
ServantLocator::postinvoke (const PortableServer::ObjectId& oid,
PortableServer::POA_ptr adapter,
const char* operation,
PortableServer::ServantLocator::Cookie the_cookie,
PortableServer::Servant the_servant )
throw (CORBA::SystemException)
{
/*
//
// call services registered for postinvoke
//
if(home_servant_->service_name_.empty())
{
std::vector <Qedo::ComponentInstance> ::iterator iter;
Components::CCMService_ptr service;
for (iter = home_servant_->container_->services_postinvoke_.begin();
iter != home_servant_->container_->services_postinvoke_.end(); iter++)
{
service = dynamic_cast<Components::CCMService_ptr>((*iter).executor_locator_.in());
service->postinvoke((*iter).uuid_.c_str(), operation);
}
}*/
the_servant->_remove_ref();
}
示例3: non_servant_upcall
void
RequestProcessingStrategyAOMOnly::cleanup_servant (
PortableServer::Servant servant,
const PortableServer::ObjectId &user_id)
{
if (servant)
{
// ATTENTION: Trick locking here, see class header for details
Non_Servant_Upcall non_servant_upcall (*this->poa_);
ACE_UNUSED_ARG (non_servant_upcall);
try
{
servant->_remove_ref ();
}
catch (...)
{
// Ignore exceptions from servant cleanup.
}
}
// This operation causes the association of the Object Id specified
// by the oid parameter and its servant to be removed from the
// Active Object Map.
if (this->poa_->unbind_using_user_id (user_id) != 0)
{
throw ::CORBA::OBJ_ADAPTER ();
}
}
示例4: postinvoke
void GCServantLocator::postinvoke(const PortableServer::ObjectId& oid,
PortableServer::POA_ptr adapter,
const char* operation,
PortableServer::ServantLocator::Cookie the_cookie,
PortableServer::Servant the_servant)
{
the_servant->_remove_ref();
}
示例5:
void
Servant_Activator::etherealize (const PortableServer::ObjectId &,
PortableServer::POA_ptr,
PortableServer::Servant servant,
CORBA::Boolean,
CORBA::Boolean)
{
servant->_remove_ref ();
}
示例6:
void
ServantLocator::postinvoke (const PortableServer::ObjectId& oid,
PortableServer::POA_ptr adapter,
const char* operation,
PortableServer::ServantLocator::Cookie the_cookie,
PortableServer::Servant the_servant )
throw (CORBA::SystemException)
{
the_servant->_remove_ref();
}
示例7: etherealize
void ServantActivatorImpl::etherealize(
const PortableServer::ObjectId& oid,
PortableServer::POA_ptr poa,
PortableServer::Servant servant,
CORBA::Boolean cleanup_in_progress,
CORBA::Boolean remaining_activations)
{
printf("------- ServantActivator.etherealize() --------\n");
servant->_remove_ref();
}
示例8: postinvoke
void ServantLocatorImpl::postinvoke(
const PortableServer::ObjectId& oid,
PortableServer::POA_ptr poa,
const char* operation,
PortableServer::ServantLocator::Cookie cookie,
PortableServer::Servant servant)
{
printf("------- ServantLocator.postinvoke(.., op='%s', .. ) "
"--------\n", operation);
servant->_remove_ref();
}
示例9:
void
Servant_Activator::etherealize (const PortableServer::ObjectId &id,
PortableServer::POA_ptr ,
PortableServer::Servant servant,
CORBA::Boolean,
CORBA::Boolean)
{
CORBA::String_var object_name =
PortableServer::ObjectId_to_string (id);
ACE_DEBUG ((LM_DEBUG,
"Etherealize called with id = \"%C\"\n",
object_name.in ()));
if (ACE_OS::strcmp (object_name.in (),
"without reference counting") == 0)
delete servant;
else
{
servant->_remove_ref ();
}
}
示例10: OBJECT_NOT_EXIST
void
TimeServantLocator::postinvoke (const PortableServer::ObjectId & oid,
PortableServer::POA_ptr poa,
const char *operation,
void *cookie,
PortableServer::Servant servant)
throw (CORBA::SystemException)
{
// Check to see if the object ID is valid (CORBA)
CORBA::String_var oidString;
try
{
oidString = PortableServer::ObjectId_to_string (oid);
}
catch (const CORBA::BAD_PARAM&)
{
throw CORBA::OBJECT_NOT_EXIST ();
}
debug ("TimeServantLocator::%s(%s)", __FUNCTION__, oidString.in());
// Decrement servant reference count
servant->_remove_ref ();
}
示例11: non_servant_upcall
void
RequestProcessingStrategyServantActivator::cleanup_servant (
PortableServer::Servant servant,
const PortableServer::ObjectId &user_id
)
{
// If a servant manager is associated with the POA,
// ServantLocator::etherealize will be invoked with the oid and the
// servant. (The deactivate_object operation does not wait for the
// etherealize operation to complete before deactivate_object
// returns.)
//
// Note: If the servant associated with the oid is serving multiple
// Object Ids, ServantLocator::etherealize may be invoked multiple
// times with the same servant when the other objects are
// deactivated. It is the responsibility of the object
// implementation to refrain from destroying the servant while it is
// active with any Id.
// If the POA has no ServantActivator associated with it, the POA
// implementation calls _remove_ref when all operation invocations
// have completed. If there is a ServantActivator, the Servant is
// consumed by the call to ServantActivator::etherealize instead.
// @bala, is this order correct, see 11.3.9.17 of the spec, it
// says first remove from the map, then etherealize. not the
// other way around
// @@ Johnny, you are right! This will not show up until a
// thread is trying to activate the object in another thread
// using activate_object_with_id (). A test case is a must for
// atleast this issue.
if (servant)
{
if (this->etherealize_objects_ &&
!CORBA::is_nil (this->servant_activator_.in ()))
{
this->etherealize_servant (user_id,
servant,
this->poa_->cleanup_in_progress ());
}
else
{
// ATTENTION: Trick locking here, see class header for details
Non_Servant_Upcall non_servant_upcall (*this->poa_);
ACE_UNUSED_ARG (non_servant_upcall);
try
{
servant->_remove_ref ();
}
catch (...)
{
// Ignore exceptions from servant cleanup.
}
}
}
// This operation causes the association of the Object Id specified
// by the oid parameter and its servant to be removed from the
// Active Object Map.
if (this->poa_->unbind_using_user_id (user_id) != 0)
throw ::CORBA::OBJ_ADAPTER ();
}