EAR包结构
我正在创建一个带有 1 个 war 文件(appWeb.war 是我的 Web 模块)和几个 jar 文件的 EAR。 这些 jar 文件不是 EJB。我们选择根据应用程序的逻辑分离创建不同的 jar 文件,例如 model.jar(包含所有模型类、DAO、DTO 和 hibernate 文件)、BO.jar(包含业务逻辑)等...
我想知道我的 EAR 的正确打包结构
application.ear
.
.
....lib (folder created by us)
.
.
...strus.jar
...spring3.jar (all the spring library files)
...BO.jar
...model.jar
我将 appWeb.war 作为 Web 模块添加到 IDE 中的 EAR (RAD 7.5) 中创建条目
这会在 application.ear/META-INF/application.xml环境详细信息 : 应用程序服务器:Websphere应用程序服务器7.0 集成开发环境:RAD 7.5 这是一个 Struts 2、Spring 3 和 Hibernate 3.6 应用程序
问题: 1. 这种做法正确吗?应用程序特定的 jar 文件保存在 EAR 中的什么位置? 2. 我们要将库文件移动到 application.ear/lib 文件夹。
对此的任何指示/帮助/最佳实践将不胜感激。
谢谢
I am creating an EAR with 1 war file (appWeb.war is my web module) and several jar files.
These jar files are NOT EJBs. We have choosen to create different jar files based on logical separation of application like the model.jar (containing all model classes, DAO, DTO and hibernate files), BO.jar (containing business logic)etc...
I wanted to know the correct packaging structure for my EAR
application.ear
.
.
....lib (folder created by us)
.
.
...strus.jar
...spring3.jar (all the spring library files)
...BO.jar
...model.jar
I am adding appWeb.war as the web module to my EAR in the IDE (RAD 7.5)
Which creates the entry in application.ear/META-INF/application.xml
Environment details:
App server: Websphere app server 7.0
IDE: RAD 7.5
It's a Struts 2, Spring 3 and Hibernate 3.6 application
Questions:
1. Is this approach correct? Where does the application specific jar files kept in an EAR?
2. We want to move the library files to application.ear/lib folder.
Any dierctions/help/best practices on this will be appreciated.
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您上面概述的就是可用的选择之一。文件夹名称(在本例中为“lib”)几乎由您决定,只要您从 WAR 文件的 MANIFEST 类路径设置中正确引用它即可。就我个人而言,我更喜欢该解决方案,因为它可以防止您修改容器设置并使您的文件“分散”在容器树中。我想这只是我的偏好。
对于 IBM 推荐的设置:
http://www-01.ibm.com/support/docview。 wss?uid=swg27006159
以及来自社区:
将第 3 方 jar 包含在核心中的最佳实践图书馆?
The one you've outlined above is one of the choices available. The folder name -- in this case, "lib", is pretty much up to you, as long as you properly reference it from the MANIFEST classpath settings of the WAR file. Personally, I prefer that solution as it keeps you from tinkering with container settings and having your files "scattered" across the container tree. Just my preference, I guess.
For IBM recommended settings:
http://www-01.ibm.com/support/docview.wss?uid=swg27006159
and from the community:
Best Practice for including 3rd party jars in a core library?