应用程序服务器(带有 EJB)是 Java EE 客户端/服务器通信的唯一方式吗?

发布于 2024-07-10 20:10:58 字数 377 浏览 14 评论 0原文

想象一下一个 Java 客户端/服务器 ERP 应用程序为多达 100 个并发用户(包括 Web 客户端和 swing 客户端)提供服务。 对于持久性,我们可以使用 Persistence API 和 Hibernate。 但是,当涉及到客户端/服务器通信时,我们真的有其他选择可以使用带有 EJB 的 AS 来降低远程通信的编程成本吗?

加入 EJB 和应用程序服务器似乎是一个非常重量级的解决方案,仅用于远程处理。 还有使用 RMI 的标准方法,但是如今谁想要自己编写所有代码......

我知道除了远程处理部分之外,您还可以通过 AS 免费获得很多功能。 而且,也许这就是要走的路。 但是,是否真的有任何其他(低编程成本)替代 AS 来为企业应用程序进行客户端/服务器通信?

Imagine a Java client/server ERP application serving up to 100 concurrent users, both web and swing clients. For persistence we can use Persistence API and Hibernate.
But when it comes to client/server communication, do we really have an alternative to using an AS with EJBs to keep down the programming costs of remote communication?

It seems a very heavyweight solution to throw in EJBs and an application server, just for remoting stuff. There is also the standard way using RMI, but who wants nowadays to code everything on his own...

I know that you'll get a lot of features for free with an AS in addition to the remoting part. And, maybe it's the way to go. But, are there really any other (low programming cost) alternatives to an AS for doing client/server communication for an enterprise application?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

恋竹姑娘 2024-07-17 20:10:58

就我个人而言,我认为 Seam 是解决我没有的问题的最终解决方案,但除此之外,还有很多选择,其中大多数都使用 Spring:

基于 HTTP 的远程处理方法的优点是它们可以轻松插入到 Spring 的安全模型中。 另外,你还可以访问拦截器之类的东西。

Personally I consider Seam to be the ultimate solution to the problem I don't have but that aside, there are lots of options and Spring is used for most of them:

The advantage of the HTTP based remoting methods is that they easily plug into Spring's security models. Plus then you get access to things like interceptors.

萌酱 2024-07-17 20:10:58

您可以使用轻量级远程处理框架。 Spring 在这一部分有很多选项。

如果你问我用一个词来形容两者,我会建议用两个词。 接缝或弹簧。 我自己喜欢 Seam,但对于轻量级远程处理 Spring有更可行的解决方案和支持。 同样,如果您的 AS 是 JBoss,请考虑 接缝

You can use light weight remoting frameworks. Spring is having a number of options in this section.

If you ask me one word for both, I will suggest two. Seam or Spring. I myself like Seam, but for lightweight remoting Spring has more viable solutions and support. Again if your AS is JBoss, give a thought to Seam.

二智少女猫性小仙女 2024-07-17 20:10:58

应用程序服务器是一个相当重量级的解决方案。 根据您的要求,我会尝试确保您可以在简单的 servlet 容器(如 Tomcat)上运行。 我发现使用 Spring-remoting 进行远程处理要容易得多完整的 EJB。 Spring-remoting 提供了对实际使用的远程技术的抽象。 Hessian 作为轻量级协议享有盛誉。

拥有某种服务器框架(AS 或 servlet 容器)是一件好事,因为您不需要过多考虑所有低级问题(连接建立、线程处理……)。

An application server is a pretty heavyweight solution. Depending on your requirements, I would try to make sure that you can run on a simple servlet container (like Tomcat). I find remoting much easier with Spring-remoting instead of full EJB. Spring-remoting provides an abstraction on the actual remoting technique used. Hessian has a good reputation as a lightweigth protocol.

Having some sort of a server framework (AS or servlet container) is a good thing as you wont need to think as much about all the low level problems (connection establishment, threading, ...).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文