-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
1.4.0
-
sparc
-
solaris_2.6
Name: aaR10142 Date: 03/20/2002
Official Specifications for CORBA support in J2SE 1.4
http://java.sun.com/j2se/1.4/docs/api/org/omg/CORBA/doc-files/compliance.html
document says:
Section 11.3.7 POAs must preserve all policies.
"
But POA.create_POA() method throws NO_IMPLEMENT exeption
for the SINGLE_THREAD_MODEL policy.
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"));
Policy[] policies = {
rootPOA.create_thread_policy(
ThreadPolicyValue.SINGLE_THREAD_MODEL)
};
POA testPOA = rootPOA.create_POA("Test", null, policies);
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 -----------------
ERROR : org.omg.CORBA.NO_IMPLEMENT: Single threaded model not implemented vmcid: 0x0 minor code: 0 completed: No
org.omg.CORBA.NO_IMPLEMENT: Single threaded model not implemented vmcid: 0x0 minor code: 0 completed: No
at com.sun.corba.se.internal.POA.POAImpl.pre_initialize(POAImpl.java:143)
at com.sun.corba.se.internal.POA.POAImpl.<init>(POAImpl.java:111)
at com.sun.corba.se.internal.POA.POAImpl.makePOA(POAImpl.java:126)
at com.sun.corba.se.internal.POA.POAImpl.create_POA(POAImpl.java:216)
at com.sun.corba.se.internal.POA.POAImpl.create_POA(POAImpl.java:521)
at ORBTest.main(ORBTest.java:17)
---------------------------------------------------------
======================================================================