EJB 项目通常只包含一个 Enterprise JavaBean 还是它们的集合?

发布于 2024-09-09 16:26:01 字数 369 浏览 1 评论 0原文

我正在使用 IBM Rational Application Developer for WebSphere;它基于 Eclipse,但我不确定它与 Eclipse 的 Java EE 功能有何不同。

我想要两个 Enterprise JavaBean。我是否应该创建两个单独的 EJB 项目(每个 JavaBean 一个),还是将它们作为不同的类放在一个项目中?

假设其中任何一个在技术上都是可行的,那么在这两者之间做出决定时需要考虑哪些因素?将它们分开或放在一个项目中的原因是什么?

I'm working with IBM Rational Application Developer for WebSphere; it is based on Eclipse, though I'm not sure of its differences from Eclipse's Java EE features.

I want to have two Enterprise JavaBeans. Do I create two separate EJB projects, one per JavaBean, or do I put them as different classes in one project?

What are the considerations when deciding between these, assuming that either is technically possible? What are the reasons to separate them or put them together in one project?

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

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

发布评论

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

评论(1

墨小沫ゞ 2024-09-16 16:26:01

我想要两个 Enterprise JavaBean。我是否应该创建两个单独的 EJB 项目(每个 JavaBean 一个),还是将它们作为不同的类放在一个项目中?

每个 EJB 模块可以有多个 EJB(感谢上帝)。

假设其中任何一个在技术上都是可行的,那么在这两者之间做出决定时需要考虑哪些因素?

我想说的是打包/部署考虑因素。如果出于某种原因您希望能够在企业应用程序中仅组装和部署这些 EJB 之一,那么请提供单独的模块。

经验法则是将事物逻辑地重新组合到同一个可部署单元中。仅当出现特殊部署需要时(罕见),才将逻辑组拆分为更细粒度的模块。

另请参阅

I want to have two Enterprise JavaBeans. Do I create two separate EJB projects, one per JavaBean, or do I put them as different classes in one project?

You can have several EJBs per EJB module (thanks god).

What are the considerations when deciding between these, assuming that either is technically possible?

I would say packaging/deployment considerations. If for whatever reason you want to be able to assemble and deploy only one of these EJB in an Enterprise App, then provide separate modules.

The rule of thumb is to regroup things logically into a same deployable unit. Split a logical group into finer grained modules only if special deployment needs arise (rare).

See also

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