简体   繁体   English

Jboss或Tomcat

[英]Jboss or Tomcat

I'm working in an infrastructure team(Jboss 4.02/Tomcat 5.5/Weblogic 8.1 servers)in my company...some of the weblogic java applications are moving to jboss/tomcat servers.So what are the criterias we need to consider whether we need to go for jboss or tomcat? 我在公司的基础架构团队(Jboss 4.02 / Tomcat 5.5 / Weblogic 8.1服务器)中工作...一些Weblogic Java应用程序正在迁移到jboss / tomcat服务器,因此我们需要考虑哪些标准?需要去jboss或tomcat吗? which is the best option? 哪个是最好的选择?

Thanks in Advance, Rakhesh 在此先感谢,拉赫什

The main difference is certainly the fact that JBoss is an application server and supports the full Java EE stack, while Tomcat is a servlet engine and supports only a small fraction of the APIs which are defined in Java EE. 当然,主要区别在于JBoss是应用程序服务器并支持完整的Java EE堆栈,而Tomcat是servlet引擎,并且仅支持Java EE中定义的API的一小部分。

So, your main criteria should be: Which APIs (Frontend, Business Logic, Persistence, Third-Party, ...) do you need? 因此,您的主要标准应该是:您需要哪些API(前端,业务逻辑,持久性,第三方...)?

You should not make this an easy decision. 您不应该轻易做出这个决定。 The fact that you are asking the question indicates that you probably did not have the chance to play around with both and familiarize yourself with the concepts behind Java Enterprise stacks (Java EE vs. Spring vs. DIY). 您所提出的问题表明您可能没有机会同时使用这两种方法并熟悉Java Enterprise堆栈背后的概念(Java EE,Spring,DIY)。

My advice would be to take the time to evaluate both system - it looks like you are able to use both. 我的建议是花时间评估这两个系统-看来您可以同时使用这两个系统。

  • If you don't need much, you're probably better off with Tomcat, which is small and easy to use, but can be a nightmare to configure if you need advanced functionality. 如果您不需要太多,则使用Tomcat可能会更好,后者虽然小巧易用,但如果需要高级功能,可能会成为配置的噩梦。
  • JBoss AS comes with a full and mature stack. JBoss AS带有完整且成熟的堆栈。 Everything is just right in place and works fine - the price you'll have to pay is that it way bigger and will take longer to start / stop / redeploy. 一切的一切都在正确的地方和工作得很好-你必须要付出的代价是,它的方式做大,将需要更长的时间来启动/停止/重新部署。

But again: That's a serious decision with a high impact on pretty much everything... 但是再次:这是一个严肃的决定,对几乎所有事物都有很大影响...

Both Tomcat and JBoss are very easy to install - simply unzip a file, and start it with a script. Tomcat和JBoss都非常易于安装-只需解压缩文件,然后使用脚本启动它即可。 Both Tomcat and JBoss have great support for products like IDE's, monitoring tools, and such. Tomcat和JBoss都对IDE,监视工具等产品提供了很好的支持。

But in your migration case, JBoss is a better choice. 但是在您的迁移案例中,JBoss是一个更好的选择。 Chances are your Web apps need JNDI data sources and JTA transactions - these things come built in to JBoss 4+, whereas you would have to graft them on to Tomcat 5.x, with much effort. 您的Web应用程序很可能需要JNDI数据源和JTA事务-这些东西内置在JBoss 4+中,而您则必须花费很多精力将它们移植到Tomcat 5.x中。 You old WAR's will find JTA and JNDI data sources with no trouble on JBoss. 您的老WAR会在JBoss上找到JTA和JNDI数据源,而不会遇到麻烦。 Tomcat can indeed add these features, but JBoss packages them nicely into the system nicely. Tomcat确实可以添加这些功能,但是JBoss可以将它们很好地打包到系统中。 So even if you have no EJBs or JMS, then JBoss is still a good choice because many apps do need JTA and JNDI. 因此,即使您没有EJB或JMS,JBoss仍然是一个不错的选择,因为许多应用程序确实需要JTA和JNDI。

But of course if you find EAR files for your apps, then Tomcat will not work. 但是,当然,如果您为应用程序找到EAR文件,那么Tomcat将无法工作。 And then JBoss will deploy the EAR files nicely. 然后,JBoss将很好地部署EAR文件。

JBOSS uses Tomcat as its servlet/JSP engine, so it's JBOSS and Tomcat or WebLogic. JBOSS使用Tomcat作为其Servlet / JSP引擎,因此它是JBOSS Tomcat或WebLogic。

The answer depends on whether the original apps use EJBs or JMS services. 答案取决于原始应用程序是使用EJB还是JMS服务。 If they do, you have to use JBOSS, because Tomcat doesn't support EJBs (unless you add OpenEJB) or JMS (unless you add something like RabbitMQ or OpenJMS). 如果这样做,则必须使用JBOSS,因为Tomcat不支持EJB(除非添加OpenEJB)或JMS(除非添加类似RabbitMQ或OpenJMS的东西)。

If you don't use EJBs, and only have JSPs, JNDI data sources, and JDBC, then you can deploy your apps as WAR files on Tomcat and pass on the full Java EE stack altogether. 如果您不使用EJB,而仅具有JSP,JNDI数据源和JDBC,则可以将应用程序作为WAR文件部署在Tomcat上,并完全传递完整的Java EE堆栈。

I think you should consider starting with different input data: 我认为您应该考虑从不同的输入数据开始:

  • what are the applications requirements ? 有哪些应用要求?
  • what are the production constraints ? 有哪些生产限制?
  • which product suits well to the administration team? 哪种产品最适合管理团队?

Just write a matrix with the 2 products and those criteria and your choice will be done!!! 只需编写一个包含2个产品的矩阵,这些条件和标准就可以完成!!! Jboss is far more heavy than Tomcat but could offer some value added while putting the application in place ? Jboss比Tomcat重得多,但是在放置应用程序时可以提供一些附加值吗? Do you have some Nagios/Tivoli or any other SNMP management infrastructure ? 您是否有Nagios / Tivoli或任何其他SNMP管理基础结构? in this case you can finnd easily SNMP adaptors providing proprietray MIBs to manage your JBoss server...JMX Beans in old releases are a very conveniant way to administer such tool 在这种情况下,您可以轻松找到提供专有MIB来管理JBoss服务器的SNMP适配器...旧版本中的JMX Bean是管理此类工具的一种非常方便的方法

HTH Jerome 杰罗姆HTH

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM