为什么Jboss比Tomcat“更好”?

时间:2021-05-03 16:55:49

I'm currently starting a new app development. The app architect insists we use JBoss5 because its "better". Do anyone has a wider definition of "better" (if its the case)?

我目前正在开始一个新的应用程序开发。应用程序架构师坚持认为我们使用JBoss5因为它“更好”。有没有人对“更好”有更广泛的定义(如果是这样的话)?

I have experience using Tomcat5 and 6 in large scale applications with big user loads and it handles pretty well (IMHO). Both would be running over a RedHat6 in identical hardware conditions (in case the implementation matters).

我有使用Tomcat5和6在大用户负载的大规模应用程序的经验,它处理得很好(恕我直言)。两者都将在相同的硬件条件下运行RedHat6(如果实现很重要)。

Thanks in advance

提前致谢

7 个解决方案

#1


67  

To say that any tool or framework is just 'better' is ridiculous. It always depends on the situation, architecture, etc. You don't necessarily want to use a hammer to drive a screw.

要说任何工具或框架只是'更好'是荒谬的。它总是取决于情况,建筑等。你不一定要用锤子来驱动螺丝。

I wrote JBoss in Action, so I obviously like the JBoss technology, but I'll be the first to say that JBoss can be overkill in many situations. For example, for the last two sites I've developed, it made more sense to build with Grails and deploy on a standalone Tomcat instance.

我在Action中编写了JBoss,所以我显然喜欢JBoss技术,但我会第一个说JBoss在许多情况下可能会过度杀伤。例如,对于我开发的最后两个站点,使用Grails构建并在独立的Tomcat实例上部署更有意义。

Its a bit unfair to say that all you get when using JBoss is EJB and JMS. JBoss offers many services and features, including:

说使用JBoss时得到的只是EJB和JMS,这有点不公平。 JBoss提供许多服务和功能,包括:

  • Servlet/JSP container
  • Servlet / JSP容器
  • JNDI
  • JNDI
  • EJB
  • EJB
  • JTA
  • JTA
  • clustering
  • 集群
  • caching
  • 高速缓存
  • JMS
  • JMS
  • Datasource / Resource management
  • 数据源/资源管理
  • JMX integration
  • JMX集成
  • OSGi support
  • OSGi支持
  • web services
  • 网页服务
  • portals
  • 门户
  • Web Beans (Seam)
  • Web豆(Seam)
  • Some administrative consoles
  • 一些管理控制台
  • an IoC container
  • 一个IoC容器
  • etc.
  • 等等

The thing that attracts many architects to JBoss is its flexibility. It uses a plugin architecture that allows you to add and remove services. As other have said, in uses Tomcat as its Servlet container, so you can literally whittle JBoss down to where it is practically just a Tomcat server. What is the benefit of doing this? Future proofing if you think that you're going to utilize other features of JBoss.

吸引许多建筑师加入JBoss的是它的灵活性。它使用插件架构,允许您添加和删除服务。正如其他人所说,在使用Tomcat作为其Servlet容器时,您可以将JBoss简化为几乎只是Tomcat服务器的地方。这样做有什么好处?如果你认为你将利用JBoss的其他功能,那么未来的证明。

These services in JBoss come pre-integrated and strive to provide a consistent deployment model that minimizes your effort in writing application logic or configuration to integrate them yourself. That being said, other frameworks like Spring also do a great job of supporting a uniform ways of integrating many popular libraries and frameworks. But since they focus on integrating 3rd party libraries, the interoperability between services is up to you. Because JBoss is building the services and the integration platform, they spend time developing (and providing support) for interoperability.

JBoss中的这些服务是预先集成的,旨在提供一致的部署模型,最大限度地减少您编写应用程序逻辑或配置以自行集成它们的工作量。话虽如此,像Spring这样的其他框架在支持统一集成许多流行库和框架的方法方面也做得很好。但由于他们专注于集成第三方库,因此服务之间的互操作性取决于您。由于JBoss正在构建服务和集成平台,因此他们花时间开发(并提供支持)互操作性。

Some questions to ask when making a choice are:

在做出选择时要问的一些问题是:

  • Are you going to use standard JavaEE architectural components like EJB?
    • BTW, EJB can be run in standalone Tomcat using the JBoss embedded container, so if EJB is all you're using, then you still don't have to use JBoss
    • 顺便说一句,EJB可以使用JBoss嵌入式容器在独立的Tomcat中运行,所以如果你正在使用EJB,那么你仍然不必使用JBoss
  • 您打算使用像EJB这样的标准JavaEE架构组件吗?顺便说一句,EJB可以使用JBoss嵌入式容器在独立的Tomcat中运行,所以如果你正在使用EJB,那么你仍然不必使用JBoss
  • Are you going to utilize Web Services, Portals, JMS?
  • 你打算利用Web服务,门户,JMS吗?
  • Are you looking into building with Web Beans or Seam?
  • 您是否正在考虑使用Web Bean或Seam进行构建?
  • What deployment platforms (Tomcat, JBoss, etc) does your IT, support, and development staff currently use? If you are going to use something new, you will incur additional cost to learn the new platform.
  • 您的IT,支持和开发人员目前使用哪些部署平台(Tomcat,JBoss等)?如果您打算使用新的东西,学习新平台将产生额外费用。
  • If you're selling a product that customers will deploy, what impact will it have on the customers' IT organization.
  • 如果您正在销售客户将部署的产品,那么它将对客户的IT组织产生什么影响。
  • Are you going to need paid support?
    • You can find support for Tomcat through many companies (including Red Hat I believe).
    • 您可以通过许多公司(包括我相信的Red Hat)找到对Tomcat的支持。
    • You'll need to compare the costs, because I don't think JBoss support is cheap, though I haven't looked up prices lately.
    • 你需要比较成本,因为我认为JBoss的支持并不便宜,尽管我最近没有查询价格。
  • 你需要有偿支持吗?您可以通过许多公司(包括我相信的Red Hat)找到对Tomcat的支持。你需要比较成本,因为我认为JBoss的支持并不便宜,尽管我最近没有查询价格。
  • Will you need to do any sophisticated clustering?
    • JBoss has some wonderful clustering capabilities, and you'll probably get good clustering support through Red Hat. Though, for full disclosure, I've never done any complex clustering with any other frameworks to be able to compare.
    • JBoss有一些很棒的集群功能,你可能会通过Red Hat获得良好的集群支持。但是,为了完全公开,我从未与任何其他框架进行任何复杂的聚类以便能够进行比较。
  • 你需要做任何复杂的聚类吗? JBoss有一些很棒的集群功能,你可能会通过Red Hat获得良好的集群支持。但是,为了完全公开,我从未与任何其他框架进行任何复杂的聚类以便能够进行比较。
  • Are you going to need advanced transaction management (distributed transactions, 2-phase commits, etc)
  • 您是否需要高级事务管理(分布式事务,两阶段提交等)

Not to sound like a shameless plug, but the first chapter of JBoss in Action is available for free on the Manning website. Though we don't do a direct comparison between JBoss and other applications servers and deployment environments in the chapter, we do talk about the architectural differences a bit, which is relevant to your question.

不要听起来像一个无耻的插件,但JBoss in Action的第一章可以在Manning网站上免费获得。虽然我们在本章中没有对JBoss与其他应用程序服务器和部署环境进行直接比较,但我们确实讨论了与您的问题相关的架构差异。

#2


36  

I'm currently starting a new app development. The app architect insists we use JBoss5 because it's "better". Do anyone has a wider definition of "better" (if its the case)?

我目前正在开始一个新的应用程序开发。应用程序架构师坚持认为我们使用JBoss5因为它“更好”。有没有人对“更好”有更广泛的定义(如果是这样的话)?

Funny, because JBOSS uses Tomcat as its servlet/JSP engine.

有趣,因为JBOSS使用Tomcat作为其servlet / JSP引擎。

Sounds like "better" means "supports EJBs and JMS", because Tomcat out of the box has neither.

听起来像“更好”意味着“支持EJB和JMS”,因为开箱即用的Tomcat都没有。

But that's not an issue if your application doesn't use EJBs or JMS.

但是,如果您的应用程序不使用EJB或JMS,那么这不是问题。

And if you do need them, you can add them to Tomcat with OpenEJB and RabbitMQ or ActiveMQ.

如果确实需要它们,可以使用OpenEJB和RabbitMQ或ActiveMQ将它们添加到Tomcat。

I'd ask your app arch when the last time they wrote something besides Power Point slides or UML documents. The response might surprise you.

当他们最后一次写Powerpoint幻灯片或UML文档之外的东西时,我会问你的app arch。回应可能会让你大吃一惊。

#3


15  

JBoss is an Application Server while Tomcat is a Servlet container

JBoss是一个Application Server,而Tomcat是一个Servlet容器

So JBoss may be better than Tomcat in the sense it contains it, plus other components. That's it.

因此,JBoss在包含它的意义上可能比Tomcat更好,还有其他组件。而已。

If you're not going to use those other components, you're wasting resources. If you need those other components then Tomcat is not enough.

如果您不打算使用其他组件,那么您就是在浪费资源。如果你需要那些其他组件,那么Tomcat是不够的。

It depends, probably your Architect has something else in mind.

这取决于您的建筑师可能还有其他想法。

I wonder what would he say if you ask him directly?

我想知道如果你直接问他会怎么说?

#4


6  

It's not better, it's just more. JBoss includes Tomcat.

它并不是更好,它只是更多。 JBoss包括Tomcat。

#5


5  

As @duffymo points out, JBoss uses Tomcat for its web container so better makes not much sense if we compare equivalent things (i.e. Tomcat and the web container part of JBoss). And if you are not going to use JTA, EJBs, JMS, JMX, etc, there is no real advantage at using JBoss, especially during development (Tomcat is lighter and starts faster, this is often appreciated by development teams).

正如@duffymo指出的那样,JBoss使用Tomcat作为其Web容器,因此如果我们比较相同的东西(即Tomcat和JBoss的Web容器部分),那么更好。如果你不打算使用JTA,EJB,JMS,JMX等,那么使用JBoss没有什么优势,特别是在开发过程中(Tomcat更轻,启动速度更快,开发团队经常会对此感兴趣)。

There are some cases where you could prefer JBoss for production though (I'm still assuming you're not using EJBs, etc):

在某些情况下,您可能更喜欢JBoss进行生产(我仍假设您不使用EJB等):

  • The production team is trained or used to use JBoss in production, tools (deployment, monitoring, etc) are tailored for JBoss.
  • 生产团队经过培训或习惯于在生产中使用JBoss,工具(部署,监控等)是为JBoss量身定制的。
  • The company has a support contract for JBoss (although you can also get support for Tomcat).
  • 该公司与JBoss签订了支持合同(尽管您也可以获得Tomcat的支持)。

But I'm not sure this is what the app architect meant. I would try to discuss this choice with the architect, maybe he has a rationale explanation. And if really JBoss has to be used in production, you can always use Tomcat or Jetty during development.

但我不确定这是应用程序架构师的意思。我会尝试与建筑师讨论这个选择,也许他有一个理由解释。如果真的必须在生产中使用JBoss,您可以在开发期间始终使用Tomcat或Jetty。

#6


2  

If you use JBoss, you can pay Jboss.org for support. But it is not the case with Tomcat.

如果您使用JBoss,您可以向Jboss.org支付费用。但Tomcat的情况并非如此。

This is true, however RedHat (who bought out Jboss.org) will require you to change to one of their supported versions of JBoss

这是事实,但RedHat(谁收购了Jboss.org)将要求你改为他们支持的JBoss版本之一

#7


1  

JBoss is J2EE specification compliant, it supports J2EE specification very well, such as EJB, JTA,JMS, JNDI and etc. Tomcat is only a servlet container, although it also supports a bit J2ee specification. When you want to use J2EE component, you should consider JBoss first.

JBoss符合J2EE规范,它非常支持J2EE规范,例如EJB,JTA,JMS,JNDI等.Tomcat只是一个servlet容器,虽然它也支持一点J2ee规范。当您想使用J2EE组件时,您应该首先考虑JBoss。

Forgot a point, JBoss supports JMX very well, especially in version 4.*. I have experienced a project, it doesn't have a web UI, JBoss is used just as a platform and EJB container to integrate all the standalone application on it use MBean.

遗忘了一点,JBoss非常支持JMX,特别是在版本4中。*。我经历过一个项目,它没有Web UI,JBoss仅用作平台和EJB容器来集成所有独立应用程序,使用MBean。

#1


67  

To say that any tool or framework is just 'better' is ridiculous. It always depends on the situation, architecture, etc. You don't necessarily want to use a hammer to drive a screw.

要说任何工具或框架只是'更好'是荒谬的。它总是取决于情况,建筑等。你不一定要用锤子来驱动螺丝。

I wrote JBoss in Action, so I obviously like the JBoss technology, but I'll be the first to say that JBoss can be overkill in many situations. For example, for the last two sites I've developed, it made more sense to build with Grails and deploy on a standalone Tomcat instance.

我在Action中编写了JBoss,所以我显然喜欢JBoss技术,但我会第一个说JBoss在许多情况下可能会过度杀伤。例如,对于我开发的最后两个站点,使用Grails构建并在独立的Tomcat实例上部署更有意义。

Its a bit unfair to say that all you get when using JBoss is EJB and JMS. JBoss offers many services and features, including:

说使用JBoss时得到的只是EJB和JMS,这有点不公平。 JBoss提供许多服务和功能,包括:

  • Servlet/JSP container
  • Servlet / JSP容器
  • JNDI
  • JNDI
  • EJB
  • EJB
  • JTA
  • JTA
  • clustering
  • 集群
  • caching
  • 高速缓存
  • JMS
  • JMS
  • Datasource / Resource management
  • 数据源/资源管理
  • JMX integration
  • JMX集成
  • OSGi support
  • OSGi支持
  • web services
  • 网页服务
  • portals
  • 门户
  • Web Beans (Seam)
  • Web豆(Seam)
  • Some administrative consoles
  • 一些管理控制台
  • an IoC container
  • 一个IoC容器
  • etc.
  • 等等

The thing that attracts many architects to JBoss is its flexibility. It uses a plugin architecture that allows you to add and remove services. As other have said, in uses Tomcat as its Servlet container, so you can literally whittle JBoss down to where it is practically just a Tomcat server. What is the benefit of doing this? Future proofing if you think that you're going to utilize other features of JBoss.

吸引许多建筑师加入JBoss的是它的灵活性。它使用插件架构,允许您添加和删除服务。正如其他人所说,在使用Tomcat作为其Servlet容器时,您可以将JBoss简化为几乎只是Tomcat服务器的地方。这样做有什么好处?如果你认为你将利用JBoss的其他功能,那么未来的证明。

These services in JBoss come pre-integrated and strive to provide a consistent deployment model that minimizes your effort in writing application logic or configuration to integrate them yourself. That being said, other frameworks like Spring also do a great job of supporting a uniform ways of integrating many popular libraries and frameworks. But since they focus on integrating 3rd party libraries, the interoperability between services is up to you. Because JBoss is building the services and the integration platform, they spend time developing (and providing support) for interoperability.

JBoss中的这些服务是预先集成的,旨在提供一致的部署模型,最大限度地减少您编写应用程序逻辑或配置以自行集成它们的工作量。话虽如此,像Spring这样的其他框架在支持统一集成许多流行库和框架的方法方面也做得很好。但由于他们专注于集成第三方库,因此服务之间的互操作性取决于您。由于JBoss正在构建服务和集成平台,因此他们花时间开发(并提供支持)互操作性。

Some questions to ask when making a choice are:

在做出选择时要问的一些问题是:

  • Are you going to use standard JavaEE architectural components like EJB?
    • BTW, EJB can be run in standalone Tomcat using the JBoss embedded container, so if EJB is all you're using, then you still don't have to use JBoss
    • 顺便说一句,EJB可以使用JBoss嵌入式容器在独立的Tomcat中运行,所以如果你正在使用EJB,那么你仍然不必使用JBoss
  • 您打算使用像EJB这样的标准JavaEE架构组件吗?顺便说一句,EJB可以使用JBoss嵌入式容器在独立的Tomcat中运行,所以如果你正在使用EJB,那么你仍然不必使用JBoss
  • Are you going to utilize Web Services, Portals, JMS?
  • 你打算利用Web服务,门户,JMS吗?
  • Are you looking into building with Web Beans or Seam?
  • 您是否正在考虑使用Web Bean或Seam进行构建?
  • What deployment platforms (Tomcat, JBoss, etc) does your IT, support, and development staff currently use? If you are going to use something new, you will incur additional cost to learn the new platform.
  • 您的IT,支持和开发人员目前使用哪些部署平台(Tomcat,JBoss等)?如果您打算使用新的东西,学习新平台将产生额外费用。
  • If you're selling a product that customers will deploy, what impact will it have on the customers' IT organization.
  • 如果您正在销售客户将部署的产品,那么它将对客户的IT组织产生什么影响。
  • Are you going to need paid support?
    • You can find support for Tomcat through many companies (including Red Hat I believe).
    • 您可以通过许多公司(包括我相信的Red Hat)找到对Tomcat的支持。
    • You'll need to compare the costs, because I don't think JBoss support is cheap, though I haven't looked up prices lately.
    • 你需要比较成本,因为我认为JBoss的支持并不便宜,尽管我最近没有查询价格。
  • 你需要有偿支持吗?您可以通过许多公司(包括我相信的Red Hat)找到对Tomcat的支持。你需要比较成本,因为我认为JBoss的支持并不便宜,尽管我最近没有查询价格。
  • Will you need to do any sophisticated clustering?
    • JBoss has some wonderful clustering capabilities, and you'll probably get good clustering support through Red Hat. Though, for full disclosure, I've never done any complex clustering with any other frameworks to be able to compare.
    • JBoss有一些很棒的集群功能,你可能会通过Red Hat获得良好的集群支持。但是,为了完全公开,我从未与任何其他框架进行任何复杂的聚类以便能够进行比较。
  • 你需要做任何复杂的聚类吗? JBoss有一些很棒的集群功能,你可能会通过Red Hat获得良好的集群支持。但是,为了完全公开,我从未与任何其他框架进行任何复杂的聚类以便能够进行比较。
  • Are you going to need advanced transaction management (distributed transactions, 2-phase commits, etc)
  • 您是否需要高级事务管理(分布式事务,两阶段提交等)

Not to sound like a shameless plug, but the first chapter of JBoss in Action is available for free on the Manning website. Though we don't do a direct comparison between JBoss and other applications servers and deployment environments in the chapter, we do talk about the architectural differences a bit, which is relevant to your question.

不要听起来像一个无耻的插件,但JBoss in Action的第一章可以在Manning网站上免费获得。虽然我们在本章中没有对JBoss与其他应用程序服务器和部署环境进行直接比较,但我们确实讨论了与您的问题相关的架构差异。

#2


36  

I'm currently starting a new app development. The app architect insists we use JBoss5 because it's "better". Do anyone has a wider definition of "better" (if its the case)?

我目前正在开始一个新的应用程序开发。应用程序架构师坚持认为我们使用JBoss5因为它“更好”。有没有人对“更好”有更广泛的定义(如果是这样的话)?

Funny, because JBOSS uses Tomcat as its servlet/JSP engine.

有趣,因为JBOSS使用Tomcat作为其servlet / JSP引擎。

Sounds like "better" means "supports EJBs and JMS", because Tomcat out of the box has neither.

听起来像“更好”意味着“支持EJB和JMS”,因为开箱即用的Tomcat都没有。

But that's not an issue if your application doesn't use EJBs or JMS.

但是,如果您的应用程序不使用EJB或JMS,那么这不是问题。

And if you do need them, you can add them to Tomcat with OpenEJB and RabbitMQ or ActiveMQ.

如果确实需要它们,可以使用OpenEJB和RabbitMQ或ActiveMQ将它们添加到Tomcat。

I'd ask your app arch when the last time they wrote something besides Power Point slides or UML documents. The response might surprise you.

当他们最后一次写Powerpoint幻灯片或UML文档之外的东西时,我会问你的app arch。回应可能会让你大吃一惊。

#3


15  

JBoss is an Application Server while Tomcat is a Servlet container

JBoss是一个Application Server,而Tomcat是一个Servlet容器

So JBoss may be better than Tomcat in the sense it contains it, plus other components. That's it.

因此,JBoss在包含它的意义上可能比Tomcat更好,还有其他组件。而已。

If you're not going to use those other components, you're wasting resources. If you need those other components then Tomcat is not enough.

如果您不打算使用其他组件,那么您就是在浪费资源。如果你需要那些其他组件,那么Tomcat是不够的。

It depends, probably your Architect has something else in mind.

这取决于您的建筑师可能还有其他想法。

I wonder what would he say if you ask him directly?

我想知道如果你直接问他会怎么说?

#4


6  

It's not better, it's just more. JBoss includes Tomcat.

它并不是更好,它只是更多。 JBoss包括Tomcat。

#5


5  

As @duffymo points out, JBoss uses Tomcat for its web container so better makes not much sense if we compare equivalent things (i.e. Tomcat and the web container part of JBoss). And if you are not going to use JTA, EJBs, JMS, JMX, etc, there is no real advantage at using JBoss, especially during development (Tomcat is lighter and starts faster, this is often appreciated by development teams).

正如@duffymo指出的那样,JBoss使用Tomcat作为其Web容器,因此如果我们比较相同的东西(即Tomcat和JBoss的Web容器部分),那么更好。如果你不打算使用JTA,EJB,JMS,JMX等,那么使用JBoss没有什么优势,特别是在开发过程中(Tomcat更轻,启动速度更快,开发团队经常会对此感兴趣)。

There are some cases where you could prefer JBoss for production though (I'm still assuming you're not using EJBs, etc):

在某些情况下,您可能更喜欢JBoss进行生产(我仍假设您不使用EJB等):

  • The production team is trained or used to use JBoss in production, tools (deployment, monitoring, etc) are tailored for JBoss.
  • 生产团队经过培训或习惯于在生产中使用JBoss,工具(部署,监控等)是为JBoss量身定制的。
  • The company has a support contract for JBoss (although you can also get support for Tomcat).
  • 该公司与JBoss签订了支持合同(尽管您也可以获得Tomcat的支持)。

But I'm not sure this is what the app architect meant. I would try to discuss this choice with the architect, maybe he has a rationale explanation. And if really JBoss has to be used in production, you can always use Tomcat or Jetty during development.

但我不确定这是应用程序架构师的意思。我会尝试与建筑师讨论这个选择,也许他有一个理由解释。如果真的必须在生产中使用JBoss,您可以在开发期间始终使用Tomcat或Jetty。

#6


2  

If you use JBoss, you can pay Jboss.org for support. But it is not the case with Tomcat.

如果您使用JBoss,您可以向Jboss.org支付费用。但Tomcat的情况并非如此。

This is true, however RedHat (who bought out Jboss.org) will require you to change to one of their supported versions of JBoss

这是事实,但RedHat(谁收购了Jboss.org)将要求你改为他们支持的JBoss版本之一

#7


1  

JBoss is J2EE specification compliant, it supports J2EE specification very well, such as EJB, JTA,JMS, JNDI and etc. Tomcat is only a servlet container, although it also supports a bit J2ee specification. When you want to use J2EE component, you should consider JBoss first.

JBoss符合J2EE规范,它非常支持J2EE规范,例如EJB,JTA,JMS,JNDI等.Tomcat只是一个servlet容器,虽然它也支持一点J2ee规范。当您想使用J2EE组件时,您应该首先考虑JBoss。

Forgot a point, JBoss supports JMX very well, especially in version 4.*. I have experienced a project, it doesn't have a web UI, JBoss is used just as a platform and EJB container to integrate all the standalone application on it use MBean.

遗忘了一点,JBoss非常支持JMX,特别是在版本4中。*。我经历过一个项目,它没有Web UI,JBoss仅用作平台和EJB容器来集成所有独立应用程序,使用MBean。