![]() |
![]() |
e-docs > Tuxedo > Administering a Tuxedo Application at Run Time > CORBA API |
Administering a Tuxedo Application at Run Time
|
PortableServer::POA::create_POA
Synopsis
Creates a new POA as a child of the target POA.
C++ Binding
POA_ptr PortableServer::create_POA (
const char * adapter_name,
POAManager_ptr a_POAManager,
const CORBA::PolicyList & policies)
Arguments
Exceptions
Description
This operation creates a new POA as a child of the target POA. The specified name, which must be unique, identifies the new POA with respect to other POAs with the same parent POA.
If the a_POAManager parameter is NULL, a new PortableServer::POAManager object is created and associated with the new POA. Otherwise, the specified POAManager object is associated with the new POA. The POAManager object can be obtained using the attribute name the_POAManager.
The specified policy objects are associated with the POA and are used to control its behavior. The policy objects are effectively copied before this operation returns, so the application is free to destroy them while the POA is in use. Policies are not inherited from the parent POA.
Note: This function is supported only for joint client/servers.
Return Values
Returns a pointer to the POA that was created.
Examples
Example 1
In this example, the child POA would use the same manager as the parent POA; the child POA would then have the same state as the parent (that is, it would be active if the parent is active).
CORBA::PolicyList policies(2);
policies.length (1);
policies[0] = rootPOA->create_lifespan_policy(
PortableServer::LifespanPolicy::TRANSIENT);
PortableServer::POA_ptr poa =
rootPOA->create_POA("my_little_poa",
rootPOA->the_POAManager, policies);
Example 2
In this example, a new POA is created as a child of the root POA.
CORBA::PolicyList policies(2);
policies.length (1);
policies[0] = rootPOA->create_lifespan_policy(
PortableServer::LifespanPolicy::TRANSIENT);
PortableServer::POA_ptr poa =
rootPOA->create_POA("my_little_poa",
PortableServer::POAManager::_nil(), policies);
![]() |
![]() |
![]() |
![]() |
||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |