1

I am trying to understand what does JBoss AS can bring into the project, comparing to standalone architecture?

My model application is a solid thing, starting, running and stopping as a whole and solely at the host. It has a database storage, and communicates to user and other servers, clustering required. It has web-part. It's just a standard big application.

JBoss for me is a shell for (in general) multiple applications, providing my application with some standard services. This shell is also a solid thing - "get all or nothing", something can be turned on/off (influencing your app unpredictably, or influencing other part of the JBoss) or replaced (very hard and is already kind a hack) with different version or other module.

Standalone application for me is something combined of pieces with glue among them (Spring if you like) with IoC wiring. We can get everything we could have with JBoss, but separately. Spring or other glue serves here like an application server, but it's thinner and we still can replace parts or even Spring itself (IoC wiring is straightforward from coding point of view).

For me, standalone, AS-free approach gives more control and flexibility. And further more, last versions of JBoss AS are purely documented, some features (most interested) are not documented at all.

So, why somebody still choose JBoss - what are benefits?

I favors more standalone application approach, but need more facts to understand better and convince others.

4

3 回答 3

2

在我看来,您所描述的似乎是同类最佳(收集所有部件并将它们自己粘合在一起)与集成堆栈(JBoss 编写所有部件并为您集成它们)之间的经典选择。这是一场永恒的争论。如果最好的品种适合你,那就坚持下去。

JBoss 是一个 J2EE 容器。如果您不熟悉 J2EE 规范,请查看它。基本上,Sun 的社区流程提出了一个开发框架,其中包含您在创建大型应用程序时可能感兴趣的组件。J2EE 包含多个子规范,例如 Servlet、EJB、JTA、JMS 和一大堆其他字母汤技术。如果您不使用任何这些技术,那么您不需要 J2EE 容器。如果您只是对使用 Servlet 和 JSP 感兴趣,那么您最好使用 Tomcat、Jetty、Resin 等 servlet 容器。

提供诸如可扩展性、事务支持、联合用户管理等企业特性是困难的。J2EE 容器提供了这些特性的标准级别。如果您可以在其他地方找到它们,达到您满意的水平,那么您将拥有更多的力量。

于 2010-06-29T19:05:29.743 回答
1

您还可以选择是否在 JBoss 中运行。如果您对 JBoss 服务感到满意,您可以使用它们或部署其他一些服务,如果您不喜欢 JBoss 为您提供的服务。

从 JBoss 最小配置开始并构建您自己的配置应该会给您一个设置,您不需要运行您不需要的服务。就个人而言,我想知道我的 AS 正在运行什么,所以我更喜欢从最小配置开始,只添加必要的部分。

于 2010-07-16T10:45:07.043 回答
0

我想说使用 JBoss 的唯一原因是如果您需要访问 Java EE 服务(如消息传递、容器管理的事务等)。

请记住,JBoss 是(粗略描述的)Tomcat 加 Java EE 服务(是的,是的,我知道,这是一种非常简化的方法,请耐心等待)。我提到这一点,因为我会说你的决定是:

  • 如果你只需要 IoC 和其他一些你可以通过 Spring 和 Tomcat 获得的能力,那就去吧
  • 如果您的应用程序需要 Java EE 服务,请使用 JBoss

请记住,您始终可以从基本系统(Spring + Tomcat)开始,如果以后需要,可以迁移到 JBoss。没有什么可以禁止的。从这种方法开始可能会告诉您您是否真的需要 Java EE 服务,或者您是否过度设计了解决方案。

于 2010-07-09T08:49:13.877 回答