Java EE 6 中的 EJB 模块是什么?

发布于 2024-12-19 07:25:39 字数 161 浏览 1 评论 0原文

当我在 eclipse 中创建一个新的 Java EE 6 项目时,我看到了一堆类型的项目...

  • 企业应用程序
  • EJB 模块
  • 企业应用程序客户端
  • 打包存档

这些不同类型是什么以及它们的含义是什么?

When I go to create a new Java EE 6 project in eclipse I see a bunch of types of projects....

  • Enterprise Application
  • EJB Module
  • Enterprise Application Client
  • Packaged Archive

What are these different types and what do they mean?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

明媚如初 2024-12-26 07:25:39

Java 企业版考虑以下类型的应用程序:

  1. Web 应用程序。它由 Servlet、JSP、HTML、CSS、Images 等组成。主要目的是表示用户界面层。该应用程序运行在 WebContariners(例如 Tomcat)上,完整的 Java EE 应用程序服务器必须提供用于部署此类应用程序的 Web 容器。最后,部署的工具是 WAR 存档。
  2. EJB 应用程序。它由 Enterprise Java Bean(无状态、有状态、消息驱动)组成,为您提供构建业务逻辑层所需的工具。该应用程序在 EJB 容器上运行(Tomcat 无法运行 EJB 应用程序,完整的 Java EE 应用程序服务器必须提供 EJB 容器来部署此类应用程序。最后,用于部署的工件是 JAR 存档
  3. 企业应用程序。这是一种Web 应用程序和 EJB 应用程序的包装器。您可以将它们包含在许多 Web 或 EJB 应用程序中。要部署企业应用程序,您需要完整的 Java EE 应用程序服务器(Glassfish、JBoss、Weblogic 等)。用于部署的工件是 EAR 文件,并且 Netbeans 将 Web 应用程序和 EJB 应用程序作为模块进行管理,以便稍后可以将其分组到企业应用程序中

。最后,在 Java EE 6 规范中定义了应用程序服务器的 Web 配置文件模式。让您将 EJB 包含在 Web 应用程序中(有一些限制),例如 TomEE 项目将 Apache Tomcat 与 Apache OpenEJB 合并,以提供与“Web Profile”兼容的服务器。

Java Enterprise Edition considers the following types of applications:

  1. Web Application. This is composed of Servlet, JSP, HTML, CSS, Images, etc. The main purpose is representing the User Interface layer. This applications runs over WebContariners such as Tomcat, a full Java EE Application Server must provide a Web container for deploy this kind of applications. Finally the artificat for deployment is a WAR archive.
  2. EJB Application. This is composed by Enterprise Java Beans (Stateless, Statefull, Message Driven) which provide to you the tools needed for build the Bussines Logic Layer. This applications runs over EJB Containers (Tomcat can’t run EJB applications, a full Java EE Application Server must provide an EJB container for deploy this kind of applications. Finally the artifact for deployment is a JAR archive
  3. Enterprise Application. This is a kind of wrapper for Web Application and EJB Applications. You can include inside of them to many Web or EJB applications. For deploy an Enterprise Application you need a full Java EE Application Server (Glassfish, JBoss, Weblogic, etc.). The artifact for deployment is a EAR file. Eclipse and Netbeans manage Web Applications and EJB applications as modules so yo later can group it into an Enterprise Applications

Finally in the Java EE 6 specification is defined the Web Profile schema for Applications Servers. This Web Profile let to you include in Web Applications EJB (with some limitations). For example the project TomEE merges Apache Tomcat with Apache OpenEJB in order to provide a server compatible with "Web Profile".

少女七分熟 2024-12-26 07:25:39

EJB 模块生成一个包含所有企业 java bean 的 .JAR

一个EAR文件至少包含一个JavaEE模块,一个EJB是一个JavaEE模块。

EJB module produces a .JAR containing all your enterprise java beans.

An EAR file is to contain at least one JavaEE module, an EJB is a JavaEE module.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文