## Portable Object Adaptor in Allegro CL

We make no attempt to explain POA here. We only mention aspects of our implementation that affect an application's use of ORBLink with POA.

### User-visible changes:

- The _mark attribute of servant objects is no longer used to provide an object id. User-supplied object ids are mediated by the POA system.
- A reference unmartialed from an incoming request that refers to a servant in the processing ORBLink is no longer unmartialed as a servant object. It is unmartialed as a proxy, so operations on it will satisfy the POA rules.
- There is a new package containing the POA components, per the mapping rules:
  - package name: omg.org/PortableServer
  - package nicknames: PortableServer, poa, omg.poa, orblink.poa
- (op:resolve_initial_references corba:orb "RootPOA") returns the root POA. This POA can be used to register objects, but is not the default POA.
- (op:resolve_initial_references corba:orb "POACurrent") returns an instance of the poa:current class to use in context operations.
- There are three predefined POA's in ORBLink, sharing a single poamanager. See the poa:default-poa function for more information.

### New conditions, as defined by POA spec.

- `poa:poa-exception` -- superclass of all the poa exceptions
- `poa:forwardrequest`
- `poa:current/nocontext`
- `poa:poamanager/adapterinactive`
- `poa:adapteralreadyexists`
- `poa:adapternonexistent`
- `poa:invalidpolicy`
- `poa:noservant`
- `poa:objectalreadyactive`
- `poa:objectnotactive`
- `poa:servantalreadyactive`
- `poa:servantnotactive`
- `poa:wrongadapter`
- `poa:wrongpolicy`

### New classes

Policy classes:

- `poa:threadpolicy`
- `poa:lifespanpolicy`
- `poa:iduniquenesspolicy`
- `poa:idassignmentpolicy`
- `poa:implicitactivationpolicy`
- `poa:servantretentionpolicy`
- `poa:requestprocessingpolicy`

Other classes

- `poa:poa`
- `poa:userid` -- a mixin class. A method for poa:default-poa is specialized on this class returns a particular (predefined) poa that supports user-specified object id's. See the discussion of the default-poa function.
- `poa:poamanager`
- `poa:adapteractivater` -- to be subclassed to provide for method specialization
- `poa:servantmanager` -- superclass of poa:servantactivator and poa:servantlocator
- `poa:servantactivator` -- to be subclassed to provide for method specialization
- `poa:servantlocator` -- to be subclassed to provide for method specialization
- `poa:current`

### New type names

- `poa:threadpolicyvalue-type` = `(member :orb_ctrl_model :single_thread_model)`
- `poa:lifespanpolicyvalue-type` = `(member :transient :persistent)`
- `poa:iduniquenesspolicyvalue-type` = `(member :unique_id :multiple_id)`
- `poa:idassignmentpolicyvalue-type` = `(member :user_id :system_id)`
- `poa:implicitactivationpolicyvalue-type` = `(member :implicit_activation :no_implicit_activation)`
- `poa:servantretentionpolicyvalue-type` = `(member :retain :non_retain)`
- `poa:requestprocessingpolicyvalue-type` = `(member :use_active_object_map_only :use_default_servant :use_servant_manager)`

### New functions

- (poa:default-poa object)

  A generic function. A method specialized on corba:servant returns a particular :retain :system_id :transient :implicit_activation :use_active_object_map_only POA that approximates the semantics of pre-POA ORBLink.

  A second POA, with :no_implicit_activation and :user_id policies, is returned by a method specialized on poa:user-id. This allows an application to mix the poa:user-id class in to an implementation to get a default user_id POA for instances of that class.

  Applications can provide methods specialized on any implementation classes to use specific POAs.

- Predicates to test policy values
  - (poa:threadpolicyvalue-type-predicate x) == `(typep x 'poa:threadpolicyvalue-type)`
  - (poa:lifespanpolicyvalue-type-predicate x) == `(typep x 'poa:lifespanpolicyvalue-type)`
  - (poa:iduniquenesspolicyvalue-type-predicate x) == `(typep x 'poa:iduniquenesspolicyvalue-type)`
  - (poa:idassignmentpolicyvalue-type-predicate x) == `(typep x 'poa:idassignmentpolicyvalue-type)`
  - (poa:implicitactivationpolicyvalue-type-predicate x) == `(typep x 'poa:implicitactivationpolicyvalue-type)`
  - (poa:servantretentionpolicyvalue-type-predicate x) == `(typep x 'poa:servantretentionpolicyvalue-type)`
  - (poa:requestprocessingpolicyvalue-type-predicate x) == `(typep x 'poa:requestprocessingpolicyvalue-type)`
- Other functions
  - (poa:proxy-from-reference reference) -- returns a proxy object (of the correct type) to allow access to the object reference.
  - (poa:poa-has-policy poa keyword) -- returns true if and only if the keyword is a POA policy value and the POA has a policy with that value.
  - (poa:poa-policies &rest keys) -- useful for generating a sequence of policy objects with the specified values. Such a sequence is needed when creating POAs.