我想得到一些关于一只耳朵中多个 ejb-jar 的建议
我想得到一些建议。我有一个由模块组成的应用程序。一个模块被分为 3 个部分,因此每个模块都有: - 库(共享 jar、DTO、bean) - 秋千的东西 - ejb stuffs
整个被打包在一个ear文件中,它可能包含许多ejb jar,目前是3个。我认为,处理我的应用程序特定模块的分离的ejb jar是管理整个的最简单的方法。后来我想使用 OSGi 来处理模块。但是,这就是未来。
每个 ejb jar 都有自己的 persistence.xml 并且它可以工作。我可以部署它,休眠创建表,我可以使用我的应用程序。但我有这样的感觉,这不是处理这种“一只耳朵中有多个 ejb jar”情况的最佳或正确的解决方案。我想知道什么是最好或正确的解决方案或者您的建议是什么。
提前致谢!
I would like to get some advise. I have an application which consist of modules. A module is sliced to 3 parts, so every module has:
- libraries (shared jars, DTOs, beans)
- swing stuffs
- ejb stuffs
The whole is packaged in one ear file and it may contains many ejb jars, currently 3. To handle separated the ejb jars of the particular modules of my application is, I think, the easiest way to manage the whole. Later I would like to use OSGi to handle the modules. But, this is the future.
Every ejb jar has own persistence.xml and it works. I can deploy it, the hibernate creates the tables and I can use my application. But I have that feeling this is not the best or proper solution to handle this "multiple ejb jars in one ear" situation. I would like to know what is the best or proper solution or what is your suggestion.
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你这样做的方式实际上是最好的面向对象解决方案:你分离你的关注点。
此外,在当前情况下您还具有更大的灵活性:您可以省略或更改 ejb jar 文件之一,您的应用程序仍将部署并继续工作。
The way you do it is actually the best OO-solution: you seperate your concerns.
Moreover you also have more flexibility in the current situation: you can leave out or change one of the ejb jar files and your application will still deploy and keep working.