12.07.2015 Views

VisiBroker Edition

VisiBroker Edition

VisiBroker Edition

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

服 务 器 实 现rootPOA->create_request_processing_policy(PortableServer::USE_DEFAULT_SERVANT);accountPolicies[(CORBA::ULong)2] =rootPOA->create_id_uniqueness_policy(PortableServer::MULTIPLE_ID);PortableServer::POA_var accountPOA =rootPOA->create_POA("bank_account_poa",poaManager,accountPolicies);// 创 建 帐 户 默 认 服 务 对 象PortableServer::Current_var current =PortableServer::Current::_instance();AccountImpl accountServant(current, accountPOA);accountPOA->set_servant(&accountServant);// 用 正 确 的 策 略 创 建 manager POACORBA::PolicyList managerPolicies;managerPolicies.length(3);managerPolicies[(CORBA::ULong)0] = rootPOA->create_lifespan_policy(PortableServer::PERSISTENT);managerPolicies[(CORBA::ULong)1] =rootPOA->create_request_processing_policy(PortableServer::USE_DEFAULT_SERVANT);managerPolicies[(CORBA::ULong)2] =rootPOA->create_id_uniqueness_policy(PortableServer::MULTIPLE_ID);PortableServer::POA_var managerPOA = rootPOA->create_POA("bank_agent_poa",poaManager,managerPolicies);// 创 建 管 理 器 默 认 服 务 对 象AccountManagerImpl managerServant(&accountServant);managerPOA->set_servant(&managerServant);// 激 活 POA 管 理 器poaManager->activate();cout

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!