JBoss vs Tomcat再次 [英] JBoss vs Tomcat again

查看:111
本文介绍了JBoss vs Tomcat再次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这似乎是一个古老的问题(它是:)),即Tomcat和JBoss之间的哪个服务器更好,但是我还没有找到足够好的答案来解决我的问题.

This will appear to be the age old question (which it is :)) that which server is better between Tomcat and JBoss, but I have not found a good enough answer yet to solve my problem.

我知道Tomcat只是一个servlet引擎,JBoss提供了许多现成的功能,但是我无法理解的是为什么在某些情况下Tomcat比jboss更好用. 我在某处读到JBoss具有可插拔的体系结构,如果需要,您可以从JBoss拔出功能,使其本质上成为一个tomcat servlet容器.如果是这种情况,那么这样做不是为了使用Tomcat而又不使用Tomcat,而是更好的做法.

I know that Tomcat is only a servlet engine and JBoss offers many more functionalities out of the box, but what I fail to understand is why Tomcat is better to use in some situations than jboss. I read somewhere that JBoss has a pluggable architecture and if required, you can unplug features from JBoss to make it essentially a tomcat servlet container. If that is the case, then isn't it better to do so instead of using Tomcat, in order to leave scope for plugging things back.

我发现对Tomcat有利的另一种解释是它是轻量级的,这意味着更少的内存需求,还是也允许更快的响应.再次,我需要知道jboss不会按照要求加载组件,即,如果我仅使用servlet,那么jboss不会跳过其余功能并自动变得轻量级.

Another explanation I find in favour of Tomcat is that it is lightweight, does that mean less memory requirement or does that also allows faster response. Again, I need to know that won't jboss load components as per requirement i.e. if i am using only servlets, then won't jboss skip the rest of the features and become lightweight automatically.

从本质上讲,我的应用程序没有任何Java EE功能,但是由于上述原因,支持Tomcat的轻量级"参数听起来不足以令人信服.

Essentially, my application does not have any Java EE features, but the 'lightweight' arguments in favour of Tomcat does not sound convincing enough because of the above mentioned reasons.

请帮助.

那时我们终于决定使用tomcat,并且已经使用6个月了,并且非常易于使用.实际上,我们发现了一些实际用途,可以很容易地在同一台服务器上为不同的开发人员运行多个tomcat实例,而使用jboss可能很难做到这一点.

We had finally decided to use tomcat back then and we have been using it for more than 6 months now with great ease of use. Infact we found some practical use where we could very easily run multiple tomcat instances on the same server machine for different developers, the same could have been very difficult with jboss.

我发现tomcat可以为我们的工作轻松自如,因此当您不使用太多Java EE功能时,它可能是正确的选择. PS:请注意,我们仍然将Spring和Hibernate与Tomcat结合使用

I have found tomcat to be hassle free for our work and therefore may be the right choice when you are not using much of Java EE features. PS: Please note that we still use Spring and Hibernate with Tomcat

推荐答案

首先,事实并非如此,更好.如您已经提到的,Tomcat提供了一个支持Servlet规范的Servlet容器(Tomcat 7支持Servlet 3.0). JBoss AS是一个完整"的应用程序服务器,当前版本支持Java EE 6(包括Servlet 3.0).

First the facts, neither is better. As you already mentioned, Tomcat provides a servlet container that supports the Servlet specification (Tomcat 7 supports Servlet 3.0). JBoss AS, a 'complete' application server supports Java EE 6 (including Servlet 3.0) in its current version.

Tomcat非常轻巧,如果您需要除Servlet API之外的某些Java EE功能,则可以通过在应用程序中提供所需的库来轻松增强Tomcat.例如,如果您需要JPA功能,则可以包括Hibernate或OpenEJB,而JPA可以几乎开箱即用.

Tomcat is fairly lightweight and in case you need certain Java EE features beyond the Servlet API, you can easily enhance Tomcat by providing the required libraries as part of your application. For example, if you need JPA features you can include Hibernate or OpenEJB and JPA works nearly out of the box.

如何决定是使用Tomcat还是使用完整堆栈Java EE应用程序服务器:

How to decide whether to use Tomcat or a full stack Java EE application server:

启动项目时,您应该了解它的要求.如果您在大型企业环境中,JBoss(或任何其他Java EE服务器)可能是正确的选择,因为它提供了对以下各项的内置支持:

When starting your project you should have an idea what it requires. If you're in a large enterprise environment JBoss (or any other Java EE server) might be the right choice as it provides built-in support for e.g:

  1. 用于异步集成的JMS消息传递
  2. Web服务引擎(JAX-WS和/或JAX-RS)
  3. JMX等管理功能和脚本化的管理界面
  4. 高级安全性,例如与第三方目录的现成集成
  5. EAR文件而不是仅" WAR文件支持
  6. 我不记得所有其他很棒的" Java EE功能:-)

我认为 Tomcat非常适合以网络为中心,面向用户的应用程序.如果后端集成开始发挥作用,则应(至少)考虑使用Java EE应用服务器.最后但并非最不重要的一点是,将为Tomcat开发的WAR迁移到JBoss应该是1天的练习.

In my opinion Tomcat is a very good fit if it comes to web centric, user facing applications. If backend integration comes into play, a Java EE application server should be (at least) considered. Last but not least, migrating a WAR developed for Tomcat to JBoss should be a 1 day excercise.

第二,您还应该考虑环境内部的使用情况.如果您的组织已经运行了1000个JBoss实例,那么无论您有什么具体要求(考虑运营成本或技能提升等方面),都可以始终使用它.当然,反之亦然.

Second, you should also take the usage inside your environment into account. In case your organization already runs say 1,000 JBoss instances, you might always go with that regardless of your concrete requirements (consider aspects like cost for operations or upskilling). Of course, this applies vice versa.

我的2美分

这篇关于JBoss vs Tomcat再次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆