简体   繁体   English

Tomcat或JBoss for JSF,Hibernate项目

[英]Tomcat or JBoss for JSF, Hibernate project


I am working on academic project, which is supposed to be as small as possible without useless features, covering only its initial requirements, which also are not too broad. 我正在研究学术项目,该项目应尽可能小,没有无用的功能,仅涵盖其初始要求,也不是太宽泛。
Two main technologies, which I have chosen to work with is JavaServer Faces 2 (probably with CDI) and Hibernate. 我选择使用的两个主要技术是JavaServer Faces 2(可能带有CDI)和Hibernate。 I don't need anything more. 我不需要任何其他东西。
I need some server to deploy my application on. 我需要一些服务器来部署我的应用程序。 My first thought was Tomcat, but as far I know it only serves Java Servlets API and JSP. 我的第一个想法是Tomcat,但据我所知,它只提供Java Servlets API和JSP。
My question is which of the following solutions are better, easier to develop and less troublemaking in cooperation with my small project? 我的问题是,与我的小项目合作,以下哪种解决方案更好,更容易开发,更少麻烦?

  1. Use Tomcat and try to extend it with JSF and Hibernate libraries 使用Tomcat并尝试使用JSF和Hibernate库扩展它
  2. Use JBoss Application Server 使用JBoss Application Server

The reason that I haven't chosen JBoss first is that I have no experience with it at all. 我之前没有选择JBoss的原因是我根本没有经验。 Till know, I worked only with Tomcat. 直到知道,我只与Tomcat合作。 I have also wondered if it isn't shooting from cannon to mosquito. 我也想知道它是不是从大炮射到蚊子。
Please help mi with decision. 请帮助mi决定。

If you have no other constraints, use Tomcat. 如果没有其他约束,请使用Tomcat。 It's open source and free. 它是开源的,免费的。 JSF works perfectly well with it. JSF与它完美配合。 I don't know about CDI, but there doesn't seem to be any reason not to use Tomcat. 我不知道CDI,但似乎没有任何理由不使用Tomcat。

If, however, you require functionality which is in JBoss (advanced security features for example) but not in Tomcat, then use that. 但是,如果您需要JBoss中的功能(例如高级安全功能)而不是Tomcat中的功能,那么请使用它。

Personally, I'd just go for the simple solution (ie Tomcat) and only if necessary switch to JBoss. 就个人而言,我只是寻求简单的解决方案(即Tomcat),并且只在必要时切换到JBoss。 If you write code for Tomcat, in general it will work with JBoss, but not necessarily the other way around, because JBoss has more functionality. 如果您为Tomcat编写代码,通常它将与JBoss一起使用,但不一定相反,因为JBoss具有更多功能。

IMO NetBeans + Glassfish combination is more suitable for beginners b/c of tight integration and stability. IMO NetBeans + Glassfish组合更适合初学者b / c的紧密集成和稳定性。

Oracle is targeting this combination specifically for educational purposes to promote JavaEE, so there are lots of tutorials and samples that work right away. Oracle将这种组合专门用于教育目的,以推广JavaEE,因此有很多教程和示例可以立即使用。

If using EclipseLink instead of Hibernate would be OK for your project, of course... 如果使用EclipseLink而不是Hibernate对你的项目来说没问题,当然......

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

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