我应该升级 JBoss 还是完全避开它并迁移到 Tomcat?
我正在使用非常旧的 JBoss 版本 (4.2.3),现在我想升级 (6.0)。我使用了几乎完整的 javaee 堆栈,加上一百万个其他东西,但几乎所有的 jar 都包含在 war 文件本身中。
既然我这样做,我真的需要 JBoss 吗?我尝试将现有的 war 插入新的 JBoss 并看到错误,但我能够将其插入 Tomcat 7,没有任何麻烦。就个人而言,Tomcat 似乎更简单、更轻量级,而且可能更稳定,所以我为什么不应该坚持这样做呢?
如果我已经获取了我需要的所有 jar(实际上包括一些 jboss jar),我真的需要一个完整的 JBoss 服务器吗?我是否犯了一些巨大的错误,试图避免膨胀并只使用 tomcat ?
I'm using a very old version of JBoss (4.2.3) and now I'm looking to upgrade (6.0). I'm using almost the full javaee stack, plus a million other things, but almost all of my jars are included in the war file itself.
Since I'm doing that do I really need JBoss? I tried plugging my existing war into the new JBoss and saw errors, but I was able to plug it into Tomcat 7 without any hassle at all. Personally Tomcat seems much simpler, more lightweight, and probably more stable so why should I not just stick with that?
If I've already fetched all the jars I need (including a few jboss jars actually) do I really need a full JBoss server? Am I making some huge mistake trying to avoid the bloat and going with just tomcat?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不,你没有。您一开始就没有使用 EJB 和 JMS。我猜也是聚类,否则是这样的:
行不通。
我的看法是:如果它可以与 Tomcat 配合使用,就使用 Tomcat。简单的事情就能发挥作用。
No, you're not. You're not using EJBs and JMS for a start. And I guess clustering too, otherwise this:
wouldn't work.
My take on it: if it works with Tomcat, use Tomcat. Simple things work.
看来您没有使用 EJB 之类的东西,因为 Tomcat 没有 EJB 容器,而您对 Tomcat 没问题。
如果您正在使用 JBoss 特定的
jar
,我建议您坚持使用 JBoss。或者,如果您想使用 Tomcat,则应该摆脱 JBoss 特定的jar
。顺便说一句,你有哪些 JBoss 具体的东西?[在评论中收到更多信息后进行编辑]
Hibernate 可以与 Tomcat 配合使用。但如果您使用 JBossMQ,那么 Tomcat 可能不适合您。因为Tomcat不支持JMS的东西。您应该坚持使用 JBoss,或者如果您确实正在寻找一些更简单的替代方案,那么我建议您看看 GlassFish。由于 GlassFish 是一个成熟的 JavaEE 服务器,并提供 EJB、JMS 内容。不过,据我所知,与 GlassFish 相比,JBoss 在业界得到了广泛的应用。
顺便说一句,JBossMQ 在 JBoss 5 中被 JBoss Messaging 取代。然后,JBoss Messaging 在 JBoss 6 中也被 HornetQ 取代。看看这个SO线程。
如果您非常倾向于 Tomcat,那么您可以使用 Tomcat 和 ActiveMQ——用于 JMS 的东西。您需要在 Tomcat 中进行配置,而且如果这不是非常标准的 JMS 事物,您肯定需要更改代码。此外,请彻底测试您的应用程序,尤其是 JMS 部分,因为可能存在一些行为差异。
It seems like you are not using EJB and stuff, as Tomcat doesn't have a EJB container, and you are fine with Tomcat.
In case you are using JBoss specific
jars
, I would suggest you to stick with JBoss. Or if you want to go with Tomcat, you should get rid of JBoss specificjars
. BTW, what JBoss specific things you have?[Edited after receiving more info in comments]
Hibernate would fine with Tomcat. But if you are using JBossMQ, then Tomcat may not be for you. Because Tomcat doesn't support JMS stuff. You should stick to JBoss, or if you are really looking for some simpler alternative, then I would recommend you to take a look at GlassFish. As GlassFish is a full blown JavaEE server, and offers EJB, JMS stuff. However, JBoss is widely used in the industry, as compared to GlassFish, AFAIK.
BTW, JBossMQ is replaced by JBoss Messaging in JBoss 5. And then that, JBoss Messaging, is also replaced in JBoss 6 by HornetQ. Look at this SO Thread.
If you are very much inclined towards Tomcat, then you can go with Tomcat along with ActiveMQ -- for JMS stuff. You need to configure that in your Tomcat, plus you would definitely need to change your code, if that is not very standard JMS thing. Further, do test your application thoroughly, especially JMS part, as there may be some behavioural differences.