从Eclipse基金接过java EE的接力棒已有两年多了,因为Oracle回绝交出javax名称空间的使用权, Eclipse基金只能新建一个名称空间Jakarta. 从官网的标准来看还是战果累累。Eclipse基金当初实现了Jakarta8,9的release。其关联社区(Redhat,JBoss)的好多框架都实现了适度

Jakarta8(+)

在Java EE版本和最后的Jakarta EE 8版本中,Oracle在驱动标准,GlassFish实现和TCK技术方面起着领导作用,而在Jakarta EE 9中,这些角色由Kevin Sutter(平台标准),Steve Millidge领导。 (GlassFish)和Scott Marlow(TCK)在更宽泛的Jakarta EE社区做出了重大贡献。

Jakarta9(+)

Jakarta EE 9是凋谢的,社区驱动的,与供应商无关的过程的后果。Jakarta EE 9将javax。名称空间的应用转换为jakarta。名称空间,以使标准的将来翻新成为可能。

源文地址:Jakarta EE 9 is Released

A: Servlet容器/EE 应用服务器

1. Tomcat

从Tomcat的官网上看10是应用Jakarta EE,目前还处于beta. 9是javax的版本. 官网地址:

2. Jetty

Eclipse基金自已的Servlet容器。所以曾经实现适度。jetty 11 应用Jakarta EE曾经release. jetty 10是javax的版本。 官网地址: https://www.eclipse.org/jetty/download.php

3. Undertow

Jboss社区开发的Servlet容器,网上流传的是性能目前来看最好的一个。这也是SpringBoot反对的内置容器。从github上公布的版本来看已有Jakarta EE的多个版本。官网地址: https://github.com/undertow-io/undertow

4. GlassFish

开发保护的势力交给了Eclipse基金。这是EE规范的实现参考。javax能用的最初一个版本是:5.0。Jakarta EE曾经有多个版本release。官网地址: https://javaee.github.io/glassfish/

5. WildFly

原名JBoss. 当初是红帽子基金旗下的EE 应用服务器。内置的Servlet容器是Undertow,javax能用的最初一个版本是:20.0.1.Final。Jakarta EE曾经有多个版本release。官网地址: https://www.wildfly.org/downloads/

6. WebLogic(*)

这是Oracle旗下的EE应用服务器。Jakarta EE 8 的release版本:14.1.1.0(https://jakarta.ee/compatibility/download/)。

7. WebSphere(*)

这是IBM旗下的EE应用服务器。Jakarta EE 8 的release版本:20.0.0.3(https://jakarta.ee/compatibility/download/)

总结:

从Servlet容器和应用服务器来看. Jakarta EE的生态已趋残缺。但开发我的项目除了布署的容器和服务器还要看利用框架.

B: 利用框架

1. Spring Framework

从github上spring framework的issues:Support for Jakarta EE 9 (annotations and interfaces in jakarta.* namespace)上看,原文:

We have no immediate plans to make such a switch, and also no plans for an early access branch. Our upcoming Spring Framework 5.3 generation will be compatible with Java 8+ and based on the javax-namespaced EE 8 APIs still, for immediate use in current production environments. Beyond that, Spring Framework 6 is likely to adopt the jakarta namespace at a later point.

The jakarta-namespaced APIs are not final yet and we expect a long time to go by before all major providers support them in production releases. We not only need Tomcat, Jetty and Undertow but also EclipseLink, Hibernate ORM and Hibernate Validator to provide major releases here, plus several special-purpose providers and libraries, before we can consider a version of Spring based on jakarta-namespaced APIs. Since there is no relevant value add in EE 9's namespace change per se, backwards compatibility with existing application servers and persistence providers through the javax namespace is more important to us.

That said, if you have a production-targeting stack scenario where our continued use of the javax namespace is an issue, please elaborate. We are aware that the upcoming Tomcat 10 cannot be supported quite yet and recommend sticking with Tomcat 9.0.x (which is feature-equivalent with Tomcat 10, just still based on the javax namespace) for the time being.

一句话总结:

咱们可能在6反对Jakarta EE. 起因: 咱们等依赖的框架都适度完后咱们才能够来整合

2. Struts

官网的下载地址上没有看到反对Jakarta EE的版本。官网地址: https://struts.apache.org/download.cgi。Jakarta EE反对一个新的标准:Jakarta MVC,让前端这些框架的处境有点难看。

@Path("hello")public class HelloController {    @Inject    private User user;    @GET    @Controller    public String hello(@QueryParam("name") String name) {        user.setName(name);        return "hello.jsp";    }}

Maven依赖:

<dependency>  <groupId>jakarta.mvc</groupId>  <artifactId>jakarta.mvc-api</artifactId>  <version>2.0.0</version></dependency>

3. JPA标准(Jakarta EE8/JPA2.2; Jakarta EE9/JPA3.0):

3.1 Hibernate(*)

对JPA的反对还是应用javax。官网地址:https://github.com/hibernate/hibernate-orm

3.2 EclipseLink

3.0反对Jakarta JPA:jakarta.persistence.EntityManager。官网地址:https://github.com/eclipse-ee4j/eclipselink/releases

4. Bean Validation标准(Jakarta EE9/JPA3.0):

4.1 Hibernate Validator

迁徙到Jakarta EE 9时,才倡议降级到Hibernate Validator 7, 反对Jakarta Bean Validation 3.0。官网地址:http://hibernate.org/validator/releases/7.0/

5. IOC/DI标准(Jakarta EE8/2.0; Jakarta EE9/3.0):

5.1 HK2

jakarta 地址: https://github.com/eclipse-ee4j/glassfish-hk2, javax 地址:https://github.com/javaee/hk2

6. RESTful WebService(Jakarta EE8/2.1; Jakarta EE9/3.0):

6.1 Jersey

3.x反对Jakarta EE9. 2.x及以前还是javax. 官网地址: https://eclipse-ee4j.github.io/jersey/

6.2 Apache CXF(*)

目前只反对javax. 官网地址: https://cxf.apache.org/

7. JMS音讯服务(Jakarta EE8/2.0; Jakarta EE9/3.0):

7.1 ActiveMQ

目前只反对jms 1.1和2.0. 官网地址: https://activemq.apache.org/

7.2 RocketMQ(*)

官网没查到反对JMS的具体版本 官网地址: http://rocketmq.apache.org/

8.JSON Processing(Jakarta EE8/1.1; Jakarta EE9/2.0); JSON Binding(Jakarta EE8/1.0; Jakarta EE9/2.0); XML Binding(Jakarta EE9/3.0)

8.1 Eclipse Yasson

Yasson is a Java framework which provides a standard binding layer between Java classes and JSON documents. This is similar to what JAXB is doing in the XML world. Yasson is an official reference implementation of JSON Binding (JSR-367).
官网地址:https://github.com/eclipse-ee4j/yasson

8.2 Apache Johnzon

Apache Johnzon is a Top Level Project at the Apache Software Foundation (ASF). It fully implements the JSON-P_1.1 (JSR-353) and JSON-B_1.0 (JSR-367) specifications.
Apache Johnzon is a project providing an implementation of JsonProcessing (aka JSR-353) and a set of useful extension for this specification like an Object mapper, some JAX-RS providers and a WebSocket module provides a basic integration with Java WebSocket API (JSR-356).
官网地址:https://johnzon.apache.org/

8.3 EclipseLink MOXy

Enables Java developers to efficiently bind Java classes to XML Schemas. MOXy implements JAXB allowing developers to provide their mapping information through annotations as well as providing support for storing the mappings in XML format. The many advanced mappings enable developers to handle the complex XML structures without having to mirror the schema in their Java class model.
官网地址:https://www.eclipse.org/eclipselink/

8.4 Jackson

https://github.com/FasterXML/jackson

8.5 Gson

https://github.com/google/gson

总结:

Jackson和Gson并不是jsr标准的实现框架。Jackson有个扩大:jackson-datatype-jsr353: support for JSON-P ("Java JSON API") types (specifically its tree model objects)