JavaEEWeb 配置文件与 JavaEE 全平台

JavaEEWeb 档案认证服务器(如 JOnAS)和 JavaEE 全平台认证服务器(如 JBoss AS)之间的区别是什么?

41731 次浏览

这是一张很好的图片,可以解释这一点。Web 配置文件是 JavaEE 的一个子集,其目的是允许开发人员创建更轻量级的应用程序,这些应用程序可以在简单的 servlet 容器(如 Tomcat 或 Jetty)中使用。

enter image description here

JavaEE6规范(JSR 316)包含以下列表:

完整的 JavaEE 产品要求

需要以下技术:

  • EJB 3.1
  • Servlet 3.0
  • JSP 2.2
  • EL 2.2
  • JMS 1.1
  • JTA 1.1
  • JavaMail 1.4
  • 连接器1.6
  • Web 服务1.3
  • JAX-RPC 1.1
  • JAX-WS 2.2
  • JAX-RS 1.1
  • JAXB 2.2
  • JAXR 1.0
  • Java EE 管理1.1
  • JavaEE 部署1.2
  • JACC 1.4
  • JASPIC 1.0
  • JSP 调试1.0
  • JSTL 1.2
  • Web 服务元数据2.1
  • JSF 2.0
  • 通用注释1.1
  • Java 持久性2.0
  • Bean 验证1.0
  • ManagedBeans 1.0
  • Java EE 1.0的上下文和依赖注入
  • Java 1.0依赖注入

没有可选的技术。

Web 个人资料定义

以下技术是网络简介的必要组成部分:

  • Servlet 3.0
  • JSP (JSP)2.2
  • 表达式语言(EL)2.2
  • 对其他语言的调试支持(JSR-45)1.0
  • JSP 标准标签库(JSTL)1.2
  • JavaServer Faces (JSF)2.0
  • Java 平台的通用注释(JSR-250)1.1
  • EJB (EJB)3.1简化版
  • Java 事务 API (JTA)1.1
  • Java持久化API (JPA)2.0
  • Bean 验证1.0
  • ManagedBeans 1.0
  • 拦截机1.1
  • JavaEE 平台1.0的上下文和依赖注入
  • Java 1.06依赖注入

Web 配置文件中没有可选组件。

对于 JavaEE7,有一个包含所有 EE 技术的 名单,也显示了 Web 概要文件中包含的技术。以前只能在 Full Profile 中使用的一些技术现在包含在 Web Profile 中,例如 JAX-RS。

博士

雅加达电子电气平台配置文件 实现了十多个更多的 < a href = “ https://jakarta.ee/speciferr/”rel = “ noReferrer”> specifer 兼容的应用程序服务器,它执行与 雅加达电子工程师网络简介兼容的应用程序服务器。

换句话说,符合 网页简介的服务器提供由符合 站台配置文件的服务器提供的 特征的子集:

平台 profile = 网页简介 + 更多内容

甲骨文公司过渡到 Eclipse基金会

2017年底,神使Java EE的责任交给了 Eclipse基金会。JavaEE8之后的未来版本将被称为 < em > Eclipse Enterprise For Java (EE4J) 。或者 Project EE4J。或者是 下一个。或者 Jakarta EE。品牌一直在变化。

Impact of changes to Java SE

在 JavaSE11中,删除了一些模块。JavaEE 相关部分正在迁移到 JakartaEE 项目的新家。其他如 CORBA已经提供给任何感兴趣的组织采用。见 JEP 320

Jakarta EE 10

目前正在规划雅加达 EE 10 (2021-09)。在从甲骨文公司到 Eclipse基金会的所有过渡阶段之后,该平台现在可以通过重大改进、新功能和删除不需要的功能来取得进展。

为了促进创新,版本10可能会在兼容性方面出现一些中断。但是一切都还没有定论。如果你有兴趣/担心/建议/贡献,现在就参与到开放过程中来。

Java SE 11 will become the minimum runtime supported by Jakarta EE compatible implementations.

有关更多信息,请参见:

Platform Profile in Jakarta EE 10

有关对 Platform Profile的拟议更改的概述,请参见 Define Jakarta EE Platform 10 #364

Core Profile in Jakarta EE 10

Jakarta EE 10 may gain a new profile, Core Profile, besides the current Web Profile and (full) Platform Profile.

Core Platform 的目标是适用于 microservicesahead-of-time compilation的较小运行时间。

Web Profile in Jakarta EE 10

Ivar Grimstad has proposed changes to the Web Profile in Java EE 10 listed on Define Jakarta EE Web Profile 10 #363.

Proposed new additions

Major updates

Minor updates

No updates

  • Jakarta Debugging Support for Other Languages 2.0
  • Jakarta Annotations 2.0
  • Jakarta Enterprise Beans 4.0 Lite
  • Jakarta Transactions 2.0
  • Jakarta Bean Validation 3.0
  • Jakarta Managed Beans 2.0
  • Jakarta Interceptors 2.0
  • Jakarta Dependency Injection 2.0

Jakarta EE 9.1

Jakarta EE 9.1 was released 2021-05.

See:

Version 9.1 makes Jakarta EE compatible with Java SE 11. This is the only significant change. Few API changes, nothing incompatible. Version 9.1 is functionally equivalent to Jakarta EE 9.

Jakarta EE 9

Jakarta EE Platform 9 was released 2020-12.

The focus is on removing the trademarked Java name from the various specifications. This includes moving to a new package name of jakarta.*. In that one specific sense, this is a breaking release, as projects must be updated to the new package to run on EE 9 servers. After changing package name, existing apps will run well with few or no other changes.

To quote the Jakarta EE 9 Release Plan page:

The goal of the Jakarta EE 9 release is to deliver a set of specifications functionally similar to Jakarta EE 8 but in the new Jakarta EE 9 namespace jakarta.*.

In addition, the Jakarta EE 9 release removes specifications from Jakarta EE 8 that were old, optional, or deprecated in order to reduce the surface area of the APIs to ensure that it is easier for new vendors to enter the ecosystem – as well as reduce the burden on implementation, migration, and maintenance of these old APIs.

Predominantly, the project team sees Jakarta EE 9 as a tooling release…

Even though you will likely be able to expect upward compatibility in behavior, the naming changes means version 9 and later are not be a drop-in binary replacement. Not the end of the world. This may mean as little as you changing the import package names in your various class files. Read this and this for details and links.

Jakarta EE 8

Jakarta EE Platform 8 is practically identical to Java EE 8.

As part of the transition from Oracle, the Eclipse team re-released Java EE 8 as Jakarta EE 8 using their new infrastructure for housing code and making builds. Same EE behavior, same internal naming and package structure. So the issues discussed below about Java EE Web Profile versus Java EE Full Platform still apply.

Jakarta EE 8 uses the javax.* package naming, borrowed from Oracle Corp. Version 9 changes the package naming to jakarta.*.

Java EE 8

Java EE 8 was released 2017. See history of versions.

See JSR 366: Java Platform, Enterprise Edition 8 (Java EE 8) Specification for details.

Java EE is a superset of Java Standard Edition (Java SE). Any Java EE 8 implementation is also an implementation of Java SE 8 or later.

See a list of Java EE 8 technologies published by Oracle, with links to JSRs and specs.

All profiles

The following technologies are required to be present in all Java EE profiles:

Java SE version 8 (or later)

• Resource and component lifecycle annotations defined by the Common Annotations specification (Resource, Resources, PostConstruct, PreDestroy)

JNDI “java:” naming context

• Java Transaction API (JTA)

Web Profile

The Web Profile is a specific subset of the full Java EE platform, focusing on commonly used elements. Implemented by products such as Apache TomEE or nearly so with Eclipse Jetty plus add-ons.

• Base level items required by all Java EE profiles ( listed above: Java SE 8, lifecycle annotations, JNDI java: context, and JTA )

• Servlet 4.0 (JSR 369)

• JavaServer Pages (JSP) 2.3

• Expression Language (EL) 3.0 (JSR 341)

• Debugging Support for Other Languages (JSR-45) 1.0

• Standard Tag Library for JavaServer Pages (JSTL) 1.2

• JavaServer Faces (JSF) 2.3 (JSR 372)

• Java API for RESTful Web Services (JAX-RS) 2.1

• Java API for WebSocket (WebSocket) 1.1 (JSR 356)

• Java API for JSON Processing (JSON-P) 1.1 (JSR 374)

• Java API for JSON Binding (JSON-B) 1.0 (JSR 367)

• Common Annotations for the Java Platform (JSR-250) 1.3 • Enterprise JavaBeans (EJB) 3.2 Lite

• Java Transaction API (JTA) 1.2

• Java Persistence API (JPA) 2.2

Bean Validation 2.0 (JSR 380)

• Managed Beans 1.0

• Interceptors 1.2

• Contexts and Dependency Injection for the Java EE Platform 2.0

• Dependency Injection for Java 1.0

• Java EE Security API 1.0

• Java Authentication Service Provider Interface for Containers (JASPIC) 1.1

Servlet-oriented (Tomcat & Jetty)

As a lighter alternative to using a Web Profile implementation, you could start with a Java Servlet/JSP implementation such as Apache Tomcat or Eclipse Jetty. While not official as a profile, this approach is very popular. Sometimes known as a web container.

IMHO, this should have long ago been formalized as a JavaEE / Jakarta EE profile. Given the huge popularity of Tomcat & Jetty, the need and benefit of a formal profile seems obvious to me.

When using this setup, you may selectively add independent libraries to benefit selectively from the various Java EE technologies. For example, for my own work building web apps using Vaadin Flow, I use Java SE with Tomcat. Sometimes I add a Bean Validation implementation library manually as that is all I need from the Java EE list of technologies.

A few of the Jakarta EE specifications have been re-engineered to work directly with Java SE based apps without a Jakarta EE server. And more such re-engineering is being planned. Implementations of such specs could be used with Tomcat or Jetty.

Of course, at some point rather than keeping adding more Jakarta EE oriented libraries to your Tomcat/Jetty project, it might make more sense to just switch to using a server compliant with one of the wider Jakarta EE profiles.

Full Java EE

The following technologies are required:

• All the items in Web Profile

• EJB 3.2 (except for EJB entity beans and associated EJBQL, which have been made optional)

• JMS 2.0

• JavaMail 1.6

• Connector 1.7

• WebServices 1.4

• Concurrency Utilities 1.0

• Batch1.0

• Java EE Management 1.1

• JACC 1.5

• JSP Debugging 1.0

• Web Services Metadata 2.1

The following technologies are optional:

• EJB 3.2 and earlier entity beans and associated EJB QL

• JAX-RPC 1.1

• JAXR 1.0

• Java EE Deployment 1.2

Diagram

Here is a diagram to show the nested groups of requirements.

diagram of nested groups of various technologies required by Java SE 8, web containers, Java EE 8 Web Profile, Java EE 8 Required, and Java EE 8 Optional

The list above this diagram may be more accurate; this diagram has not been double-checked.