部署WAR或“胖”罐? [英] Deploy WAR or "fat" JAR?

查看:120
本文介绍了部署WAR或“胖”罐?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到许多项目(DropWizard,Grails等)开始接受胖JAR(使用Jetty或Tomcat等嵌入式Web服务器)与传统WAR部署的概念。这两种方法都涉及单个JVM进程(即无论将多少WAR部署到Tomcat,它都是相同的JVM进程)。

I'm noticing a lot of projects (DropWizard, Grails, etc.) starting to embrace the notion of a "fat" JAR (using an embedded web server like Jetty or Tomcat) vs. the traditional WAR deploy. Both methods involve a single JVM process (i.e. no matter how many WARs are deployed to Tomcat, it's all the same JVM process).

在什么情况下部署方法更可取在另一个?

Under what circumstances is either deployment method preferable over the other?

推荐答案

以下是一些原因:

In支持JAR:


  1. 易于构建和部署。

  2. 像Jetty这样的嵌入式服务器很容易操作。

  3. 用户可以轻松启动应用程序,也可以在个人计算机上运行,​​因为它们非常轻便。

  4. 启动和停止应用程序将需要的知识少于管理网络服务器。

  1. Simple to build and deploy.
  2. Embedded servers like Jetty are easy to operate.
  3. Applications are easy for users to start and they can run on their personal computers too, because they are lightweight.
  4. Starting and stopping applications will require less knowledge than managing web servers.

赞成WAR或EAR:


  1. 服务器将同时为多个Web应用程序提供部署,重启,安全等功能。

  2. 也许单独的部署团队可以处理启动和停止应用程序。

  3. 如果您的主管喜欢遵守规则,他们会很高兴地发现您没有违规。

话虽如此,您始终可以提供2种或3种类型的可执行文件以满足所有需求。任何构建工具都可以轻松实现。

Having said this, you can always provide 2 or 3 types of executables to cater to all needs. Any build tool makes this easy.

这篇关于部署WAR或“胖”罐?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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