使用 EJB、JSF 和 JAX-RS 的企业应用程序

发布于 2024-09-26 09:27:43 字数 110 浏览 7 评论 0原文

考虑到在不久的将来我将不得不在 JSF2 中制作一个前端,用作与 JAX-RS 一起使用的后端 EJB,那么在使用 EJB 和 JAX-RS 的 java 企业应用程序上使用的最佳 Maven 原型是什么?

What is the best Maven archetype to use on enterprise application in java using EJB and JAX-RS, considering that in a near future i will have to make a front-end in JSF2 using as the backend EJBs used with the JAX-RS?

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

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

发布评论

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

评论(1

痴者 2024-10-03 09:27:43

首先,我个人认为不存在完美的原型,原型只是一个起点,需要记住这一点很重要:使用它们作为起点。

然后,选择其中之一取决于目标打包结构(不要忘记您可以将 EJB 打包在 WAR 中)、您计划使用的内容等。

在您的情况下,您可能对以下原型感兴趣(来自codehaus):

  • ear-javaee6(用于创建 Java EE 6 EAR 的原型)
  • ejb-javaee6(Java EE 6 ejb jar 原型)
  • webapp-javaee6< /code> (Java EE 6 Web 应用程序原型)

或以下内容(来自 Knappsack项目)

  • jee6-basic (仅包含一个将消息返回到 JSF 页面的 Bean 的空应用程序)
  • jee6-minimal (包括用于测试 JPA、JSF 和验证的示例页面)
  • jee6-sandbox (附带预先填充数据的 JPA 模型,以便您可以在沙箱环境中进行实验)
  • jee6-sandbox-demo (一个有效的 CRUD 应用程序项目,展示了 Java EE 6 的功能)
  • jee6-servlet-basic(空应用程序,用于验证 JSF 是否已配置并且可以从命令行与嵌入式 Tomcat 或 Jetty 实例一起运行)
  • jee6- servlet-minimal (验证 JSF、JPA、CDI 和验证是否正常工作的小型应用程序,并且可以通过命令行使用嵌入式 Tomcat 或 Jetty 实例运行)

或者甚至是以下 JBoss 原型:

  • jboss- javaee6-webapp (生成 Java EE 6 webapp 入门项目的原型)
  • weld-jsf-jee (使用 JSF 2.0、CDI 1.0、EJB 创建 Java EE 6 应用程序的 Weld 原型3.1 和 JPA 2.0(包括持久性单元))
  • weld-jsf-jee-minimal(使用 JSF 2.0、CDI 1.0 和 EJB 3.1 创建最小 Java EE 6 应用程序的 Weld 原型(不包括持久性单元) )
  • weld-jsf-servlet-minimal (使用 JSF 2.0 和 CDI 1.0 for Servlet 容器(Tomcat 6 / Jetty 6)创建应用程序的 Weld 原型)

抱歉,但没有关于您的要求的更多详细信息,我不能更精确了。但至少,这会给你一个概述。

First of all, I personally think that there is no perfect archetype, archetypes are only a starting point and this is something important to keep in mind: use them as starting point.

Then, picking one or the other depends on the targeted packaging structure (and don't forget you can package EJBs in a WAR), what you plan to use, etc.

In your case, you might be interested by the following archetypes (from codehaus):

  • the ear-javaee6 (Archetype for creating Java EE 6 EAR)
  • the ejb-javaee6 (Java EE 6 ejb jar archetype)
  • the webapp-javaee6 (Java EE 6 web application archetype)

Or the following (from the Knappsack project)

  • jee6-basic (Empty application with just a bean that returns a message to a JSF page)
  • jee6-minimal (Includes a sample page to test JPA, JSF and validation)
  • jee6-sandbox (Comes with a JPA model pre-populated with data so you can experiment in a sandbox environment)
  • jee6-sandbox-demo (A working CRUD application project that shows off features of Java EE 6)
  • jee6-servlet-basic (Empty application that verifies that JSF is configured and can be run with an embedded Tomcat or Jetty instance from the command line)
  • jee6-servlet-minimal (Small application that verifies that JSF, JPA, CDI and validation is working and can be run with an embedded Tomcat or Jetty instance from the command line)

Or even the following JBoss archetypes:

  • jboss-javaee6-webapp (An archetype that generates a starter Java EE 6 webapp project)
  • weld-jsf-jee (Weld archetype for creating a Java EE 6 application using JSF 2.0, CDI 1.0, EJB 3.1 and JPA 2.0 (persistence unit included))
  • weld-jsf-jee-minimal (Weld archetype for creating a minimal Java EE 6 application using JSF 2.0, CDI 1.0 and EJB 3.1 (persistence unit not included))
  • weld-jsf-servlet-minimal (Weld archetype for creating an application using JSF 2.0 and CDI 1.0 for Servlet Containers (Tomcat 6 / Jetty 6))

Sorry, but without more details on your requirements, I can't be more precise. But at least, this will give you an overview.

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