-
Bug
-
Resolution: Fixed
-
P4
-
1.4.0, 5.0
-
beta
-
generic, sparc
-
generic, solaris_2.6
-
Not verified
Name: aaR10142 Date: 03/20/2002
The spec says:
"
11.3.8.2 create_POA
..
If any of the policy objects specified are not valid for the ORB implementation,
if conflicting policy objects are specified,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
or if any of the specified policy objects require
prior administrative action that has not been performed, an InvalidPolicy
exception is raised containing the index in the policies parameter value of
the first offending policy object.
"
POA.create() method doesn't throw InvalidPolicy for conflicting policies,
See example:
------------- ORBTest.java ---------------------
import org.omg.CORBA.*;
import org.omg.PortableServer.*;
import org.omg.PortableServer.POAPackage.InvalidPolicy;
public class ORBTest {
public static void main(String argv[]) {
try {
ORB orb = ORB.init(argv, null);
POA rootPOA = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
try {
Policy[] policies = {
rootPOA.create_implicit_activation_policy(
ImplicitActivationPolicyValue.NO_IMPLICIT_ACTIVATION),
rootPOA.create_implicit_activation_policy(
ImplicitActivationPolicyValue.IMPLICIT_ACTIVATION)
};
POA testPOA = rootPOA.create_POA("Test", null, policies);
System.out.println("Failed. No InvalidPolicy exception");
} catch (InvalidPolicy e){
System.out.println("OKAY");
}
} catch(Exception e) {
System.out.println("ERROR : " + e);
e.printStackTrace(System.out);
}
}
}
------------------- start --------------------
#>javac -classpath . -d . ORBTest.java
#>java -classpath . ORBTest
----------------- 1.4 output -----------------
Failed. No InvalidPolicy exception
---------------------------------------------------------
======================================================================