Java 11 - Remove the Java EE and CORBA Modules (JEP 320)
The Java EE modules are a web services stack that have been available in the JDK since the release of Java SE 6 as a convenience for Java developers:
- JAX-WS: Java API for XML-Based Web Services (JSR-224)
- JAXB: Java Architecture for XML Binding (JSR-222)
- JAF: JavaBeans activation Framework (JSR-925)
- Common Annotations for the Java Platform (JSR-250)
It was determined that the JDK no longer needed to support these modules as they have evolved over the past 12 years and are readily available in third-party sites (such as Maven Central).
The first step already done in the release of Java 9. The Java SE modules that contain Java EE technologies have been annotated as deprecated for removal, which already indicated the intent to remove them in a future release (which is now in Java 11, based on JEP 320).
List of module-level APIs being removed in Java 11:
Name | Module | Description |
---|---|---|
Java API for XML Web Services (JAX-WS) | java.xml.ws | Defines the Java API for XML-Based Web Services (JAX-WS), and the Web Services Metadata API. |
jdk.xml.ws | Tools for JAX-WS | |
Java Architecture for XML Binding (JAXB) | java.xml.bind | Defines the Java Architecture for XML Binding (JAXB) API. |
jdk.xml.bind | Tools for JAXB | |
JavaBeans Activation Framework (JAF) | java.activation | Defines the JavaBeans Activation Framework (JAF) API. |
Common Annotations | java.xml.ws.annotation | Defines a subset of the Common Annotations API to support programs running on the Java SE Platform. |
Common Object Request Broker Architecture (CORBA) | java.corba | Defines the Java binding of the OMG CORBA APIs, and the RMI-IIOP API. |
Java Transaction API (JTA) | java.transaction | Defines a subset of the Java Transaction API (JTA) to support CORBA interoperation. |
Aggregator module for the all modules above | java.se.ee | Defines the full API of the Java SE Platform. |
Removing these modules is not without risks, as documented in JEP 320, for Java EE modules in particular:
The risk of removing the Java EE modules is that applications will not compile or run if they rely on "out of the box" support in the JDK for Java EE APIs and tools. These applications will experience binary and source incompatibilities when migrating from JDK 6, 7, or 8, to JDK 9 or a later release.
Another risk of removing the Java EE modules is that applications which already migrated from JDK 6, 7, or 8, to JDK 9, will not start if they use the command line flag --add-modules java.se.ee, --add-modules java.xml.bind, etc.
Developers who wish to compile or run applications on the latest JDK can find and deploy alternate versions of the Java EE technologies. The Reference Implementations (RIs) of JAX-WS and JAXB are a good starting point because they are complete replacements for the java.xml.ws and java.xml.bindmodules in JDK 9. The RIs are available as Maven artifacts:
JAX-WS: Java API for XML Web Services (java.xml.ws)
Open source Reference Implementation of JSR-224: Java API for XML Web Services Distribution Bundle (available on Maven Central)
<!-- https://mvnrepository.com/artifact/com.sun.xml.ws/jaxws-ri --> <dependency> <groupId>com.sun.xml.ws</groupId> <artifactId>jaxws-ri</artifactId> <version>2.3.2</version> <type>pom</type> </dependency>
wsgen and wsimport: com.sun.xml.ws : jaxws-tools, plus tool scripts (JEP 320)
JAXB: Java Architecture for XML Binding (java.xml.bind)
Reference implementation (RI) and old JAXB Runtime module.
<!-- Java 6 = JAXB version 2.0 --> <!-- Java 7 = JAXB version 2.2.3 --> <!-- Java 8 = JAXB version 2.2.8 --> <!-- Java 9 = JAXB version 2.3.0 --> <!-- https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api --> <dependency> <groupId>javax.xml.bind</groupId> <artifactId>jaxb-api</artifactId> <version>2.3.0</version> </dependency> <!-- https://mvnrepository.com/artifact/com.sun.xml.bind/jaxb-core --> <dependency> <groupId>com.sun.xml.bind</groupId> <artifactId>jaxb-core</artifactId> <version>2.3.0</version> </dependency> <!-- https://mvnrepository.com/artifact/com.sun.xml.bind/jaxb-impl --> <dependency> <groupId>com.sun.xml.bind</groupId> <artifactId>jaxb-impl</artifactId> <version>2.3.0</version> </dependency>
schemagen and xjc:com.sun.xml.bind : jaxb-jxc and com.sun.xml.bind : jaxb-xjc, plus tool scripts
JAF: JavaBeans Activation Framework (java.activation)
JavaBeans Activiation Framework is a standalone technology (available on Maven Central):
<!-- https://mvnrepository.com/artifact/com.sun.activation/javax.activation --> <dependency> <groupId>com.sun.activation</groupId> <artifactId>javax.activation</artifactId> <version>1.2.0</version> </dependency>
Common Annotations (java.xml.ws.annotation)
Common Annotations for the JavaTM Platform API (available on Maven Central):
<!-- https://mvnrepository.com/artifact/javax.annotation/javax.annotation-api --> <dependency> <groupId>javax.annotation</groupId> <artifactId>javax.annotation-api</artifactId> <version>1.3.2</version> </dependency>
CORBA: Common Object Request Broker Architecture (java.corba)
From JEP 320:
There will not be a standalone version of CORBA unless third parties take over maintenance of the CORBA APIs, ORB implementation, CosNaming provider, etc. Third party maintenance is possible because the Java SE Platform endorses independent implementations of CORBA. In contrast, the API for RMI-IIOP is defined and implemented solely within Java SE. There will not be a standalone version of RMI-IIOP unless a dedicated JSR is started to maintain it, or stewardship of the API is taken over by the Eclipse Foundation. The transition of stewardship of Java EE from the JCP to the Eclipse Foundation includes the GlassFish implementation of CORBA and RMI-IIOP.
Anyway, CORBA considered as legacy, and the projects that using CORBA either stay as per status quo or upgrade to newer "distributed" solution/framework.
JTA: Java Transaction API (java.transaction)
A standalone version of JTA is available as the Maven artifact javax.transaction : javax.transaction-api (Project GlassFish Java Transaction API).
<!-- https://mvnrepository.com/artifact/javax.transaction/javax.transaction-api --> <dependency> <groupId>javax.transaction</groupId> <artifactId>javax.transaction-api</artifactId> <version>1.3</version> </dependency>