Search in sources :

Example 1 with RequestProcessingPolicyValue

use of org.omg.PortableServer.RequestProcessingPolicyValue in project cxf by apache.

the class CorbaDestination method createPOA.

protected POA createPOA(String name, POA parentPOA, POAManager poaManager) {
    List<Policy> policies = new ArrayList<>();
    policies.add(parentPOA.create_thread_policy(ThreadPolicyValue.ORB_CTRL_MODEL));
    if (isPersistent) {
        policies.add(parentPOA.create_lifespan_policy(LifespanPolicyValue.PERSISTENT));
    } else {
        policies.add(parentPOA.create_lifespan_policy(LifespanPolicyValue.TRANSIENT));
    }
    if (serviceId != null) {
        policies.add(parentPOA.create_id_assignment_policy(IdAssignmentPolicyValue.USER_ID));
    }
    policies.add(parentPOA.create_id_uniqueness_policy(IdUniquenessPolicyValue.MULTIPLE_ID));
    RequestProcessingPolicyValue value = RequestProcessingPolicyValue.USE_DEFAULT_SERVANT;
    policies.add(parentPOA.create_request_processing_policy(value));
    orbConfig.addPOAPolicies(orb, name, parentPOA, poaManager, policies);
    Policy[] policyList = policies.toArray(new Policy[0]);
    try {
        return parentPOA.create_POA(name, poaManager, policyList);
    } catch (Exception ex) {
        throw new CorbaBindingException("Could not create POA during activation", ex);
    }
}
Also used : Policy(org.omg.CORBA.Policy) RequestProcessingPolicyValue(org.omg.PortableServer.RequestProcessingPolicyValue) ArrayList(java.util.ArrayList) IOException(java.io.IOException)

Aggregations

IOException (java.io.IOException)1 ArrayList (java.util.ArrayList)1 Policy (org.omg.CORBA.Policy)1 RequestProcessingPolicyValue (org.omg.PortableServer.RequestProcessingPolicyValue)1