全部。我有一些这样的代码
Properties props = new Properties();
props.put("org.omg.CORBA.ORBInitRef", "NameService=corbaloc::testsrv:2809/NameService");
ORB orb = ORB.init((String[])null, props);
org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);
CommunicatorHdb impl = CommunicatorHdbHelper.narrow(ncRef.resolve_str("TestServiceName"));
System.out.println("My valid impl = " + impl");
它是桌面版本的有效代码。如果我将此代码用于 webapp(使用 Jetty 或 Tomcat 7) - 我看到字符串的异常“BAD_PARAM”
CommunicatorHdb impl = CommunicatorHdbHelper.narrow(ncRef.resolve_str("TestServiceName"));
为什么它不适用于tomcat?