34 namespace OmniEvents {
42 const PortableServer::ObjectId& oid,
43 PortableServer::POA_ptr adapter,
44 PortableServer::Servant serv,
45 CORBA::Boolean cleanup_in_progress,
46 CORBA::Boolean remaining_activations
49 auto_ptr<Proxy> narrowed( dynamic_cast<Proxy*>(serv) );
50 assert(narrowed.get()!=NULL);
51 set<Proxy*>::iterator pos =
_servants.find(narrowed.get());
55 DB(1,
"\t\teh? - POA attempted to etherealize unknown servant.");
63 for(map<string,PersistNode*>::const_iterator i=node.
_child.begin();
67 assert(i->second!=NULL);
68 PortableServer::Servant serv =
69 this->incarnate(PortableServer::ObjectId(),
_managedPoa);
76 catch(CORBA::BAD_PARAM& ex)
79 DB(5,
"Failed to reincarnate proxy: "<<i->first.c_str());
99 _managedPoa(PortableServer::POA::_nil())
105 using namespace PortableServer;
116 CORBA::PolicyList policies;
118 policies[0]=
_poa->create_lifespan_policy(PERSISTENT);
119 policies[1]=
_poa->create_id_assignment_policy(USER_ID);
120 policies[2]=
_poa->create_implicit_activation_policy(NO_IMPLICIT_ACTIVATION);
121 policies[3]=
_poa->create_request_processing_policy(USE_SERVANT_MANAGER);
122 policies[4]=
_poa->create_thread_policy(SINGLE_THREAD_MODEL);
127 CORBA::String_var parentName =
_poa->the_name();
128 string poaName =string(parentName.in())+
"."+name;
129 POAManager_var parentManager =
_poa->the_POAManager();
130 _managedPoa=
_poa->create_POA(poaName.c_str(),parentManager.in(),policies);
132 catch(POA::AdapterAlreadyExists& ex)
134 DB(0,
"ProxyManager::ProxyManager() - POA::AdapterAlreadyExists")
136 catch(POA::InvalidPolicy& ex)
138 DB(0,
"ProxyManager::ProxyManager() - POA::InvalidPolicy: "<<ex.index)
142 for(CORBA::ULong i=0; i<policies.length(); ++i)
143 policies[i]->destroy();
145 string oidStr =string(name)+
"Manager";
147 PortableServer::ServantManager_var manager(_this());
165 if(!CORBA::is_nil(_req))
168 _req=CORBA::Request::_nil();
174 _req(CORBA::Request::_nil())
181 PortableServer::POA_var parentPoa=
_poa->the_parent();
182 CORBA::String_var channelName=parentPoa->the_name();
184 PortableServer::ObjectId_var oid=
_poa->servant_to_id(
this);
185 CORBA::String_var oidStr =PortableServer::ObjectId_to_string(oid.in());
186 os<<
"ecf/"<<channelName.in()<<
"/"<<name<<
"/"<<oidStr.in();
204 CORBA::Object_ptr target,
205 const char* extraAttributes
209 if(!CORBA::is_nil(target))
211 CORBA::String_var iorstr =
Orb::inst().
_orb->object_to_string(target);
212 os<<
" IOR="<<iorstr.in();