JDK 11 有CORBA的替代库吗

Is there a replacement library for CORBA in JDK 11

JDK-11 将删除 JDK (JEP-320) 的许多旧部分。 其中一些(例如 JAXB)功能将作为常规库提供。您只需添加另一个依赖项,一切都会再次正常工作。

但 CORBA 不是这样,因为

There is no significant interest in developing modern applications with CORBA in Java

然而,我处于痛苦的境地,需要维护仍然需要 CORBA 的旧应用程序,同时仍想更新到 JDK-11。

是否有替代库或其他迁移到 JDK-11 且不删除这些应用程序的 CORBA 功能的好方法?

你绝对可以看看 javaee/glassfish-corba. The documented home page 读 -

The GlassFish ORB complies with the CORBA 2.3.1 specification, and with the CORBA 3.0 specifications for the Interoperable Name Service and Portable Interceptors. It includes both IDL and RMI-IIOP support. The GlassFish ORB has an open, extensible architecture that supports flexible configuration and extension through an open SPI.

JEP 本身也应该引起开发人员的兴趣 -

The risks of removing the java.corba module are:

1. CORBA implementations will not compile or run if they include only a subset of the "endorsed" CORBA APIs and expect the JDK to provide the remainder.

2. Applications and CORBA implementations that use RMI-IIOP will not compile or run. The RMI-IIOP packages (javax.rmi and javax.rmi.CORBA) are located in the java.corba module and tied to the CORBA implementation therein, so there will be no RMI-IIOP support in Java SE once java.corba is removed.

3. Applications and CORBA implementations that use the javax.activity package will not compile or run. This package is located in the java.corba module and tied to the CORBA implementation therein, so there will be no support in Java SE once java.corba is removed.

再往下

  • The transition of stewardship of Java EE from the JCP to the Eclipse

Foundation includes the GlassFish implementation of CORBA and RMI-IIOP.

此外,

我还没有转到 Java 11,但我总是遇到 Java CORBA 实现的问题,因为它不完整并且不支持标准中定义的所有对象方法,不支持 ssliop 等。我总是通过将 JacORB OMG jar 放在认可的目录中并将系统 属性 设置为连接到 JacORB orb 来替换它:

-Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB -Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORB单例

顺便说一句。我不同意“"There is no significant interest in developing modern applications with CORBA in Java" J2EE 究竟基于什么?

这个依赖可以在 JDK11 中使用

        <dependency>
            <groupId>org.glassfish.corba</groupId>
            <artifactId>glassfish-corba-omgapi</artifactId>
            <version>4.2.1</version>
        </dependency>

JDK Micro Focus 提供的所有 ORB 都完全支持 11。