EAR 文件和“WebSphere 增强型 EAR”之间有什么区别?

发布于 2024-08-17 23:06:38 字数 215 浏览 3 评论 0原文

假设我有一个标准 EAR 文件(以及用于生成它的源文件),需要执行哪些额外处理才能将其转换为 IBM WebSphere“增强型 EAR”?

提出此问题的另一种方式是问“增强型 EAR 和标准 EAR 之间有什么区别?”

我非常清楚 Rational 开发工具(RAD 和 RSA)中有工具。但是,出于这个问题的目的,我需要在自动构建中完成相同的任务(通过 Ant 或 Maven)。

Supposing that I have a standard EAR file (and the source files that were used to generated it,) what additional processing needs to be done to convert it to an IBM WebSphere "Enhanced EAR"?

Another way to ask this question would be to ask, "What is the difference between an Enhanced EAR and a standard EAR?"

I'm very aware that there is tooling in the Rational development tools (RAD and RSA.) But, for the purpose of this question, I need to accomplish the same task in an automated build (via either Ant or Maven.)

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

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

发布评论

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

评论(3

琉璃梦幻 2024-08-24 23:06:38

提出这个问题的另一种方式是问“增强型 EAR 和标准 EAR 之间有什么区别?”

增强型 EAR 是在 META-INF 目录中添加了一些 XML 文件的 EAR,用于在应用程序、服务器或单元级别配置特定资源(请参阅 IBM 红皮书 WebSphere Application Server V7:打包应用程序以进行部署 了解更多详细信息)。

J2EE 打包、增强型 EAR 和应用程序服务器工具包的表 23-1 (pdf) 列出了这些文件:

替代文本 http://img46.imageshack.us/img46 /6751/table231.png

这些文件位于 META-INF 目录下,将它们嵌入到 Ant 或 Maven 的标准 EAR 中应该非常简单,只需在打包之前将它们放入 META-INF 中即可。

如果您必须从头开始生成这些文件(恕我直言,这没有意义),那么这实际上是另一个故事,我不确定这些文件的结构是否公开可用。

说真的,如果您想使用该功能,请找到一种从 WebSphere 增强型 EAR 编辑器生成文件的方法。也许获得 RAD 的试用版来评估此功能>:) 或者联系 IBM,我相信他们会很乐意帮助向您出售一些东西,甚至是单个许可证。

更新: IBM 提供 Ant Tasks for WebSphere,您也可以使用 antrun 插件从 Maven 使用(这似乎是首选方式)但我不认为 wsDefaultBindings 正是您正在寻找的内容,默认 IBM WebSphere Bindings 不提供与增强型 EAR 具有相同的功能 - 但它们可能很有用并且足够了。以防万一,如果您决定使用 wsadmin 任务而不是增强型 EAR,这里是一个

Another way to ask this question would be to ask, "What is the difference between an Enhanced EAR and a standard EAR?"

An enhanced EAR is an EAR with some XML files added to the META-INF directory to configure specific resources at the application, server or cell level (see the IBM Redbook WebSphere Application Server V7: Packaging Applications for Deployment for more details on this).

Table 23-1 of J2EE Packaging, Enhanced EARs, and the Application Server Toolkit (pdf) lists these files:

alt text http://img46.imageshack.us/img46/6751/table231.png

The files being located under the META-INF directory, embedding them in a standard EAR from Ant or Maven should be pretty straight forward, just put them in the META-INF before packaging.

If you have to generate these files from scratch (this wouldn't make sense IMHO), then it's really another story and I'm not sure that the structure of these files is publicly available.

Seriously, if you want to use that feature, find a way to generate the files from the WebSphere Enhanced EAR editor. Maybe get a trial version of RAD to evaluate this feature >:) Or contact IBM, I'm sure they will be happy to helpsell you something, even a single license.

UPDATE: IBM provides Ant Tasks for WebSphere that you could also use from Maven using the antrun plugin (this seems to be the preferred way) but I don't think that wsDefaultBindings is exactly what you're looking for, default IBM WebSphere Bindings don't offer the same features than Enhanced EAR - but they might be useful and enough though. Just in case, if you ever decide to use the wsadmin task instead of Enhanced EAR, here is a list of options.

雪若未夕 2024-08-24 23:06:38

来自他们的文档:

您在此编辑器中指定的服务器配置数据将嵌入到应用程序本身中。

听起来他们将通常通过管理控制台添加的内容(例如,用于数据源和消息传递的 JNDI、用于安全性的 JAAS)嵌入到 EAR 本身中,以提高服务器之间的可移植性。

From their docs:

The server configuration data that you specify in this editor gets embedded within the application itself.

Sounds like they embed the stuff that's usually added via the admin console (e.g., JNDI for data sources and messaging, JAAS for security) into the EAR itself for greater portabililty between servers.

挽心 2024-08-24 23:06:38

您可以使用 wsDefaultBindings Ant 任务向 EAR 填充所需的部署信息。示例脚本此处

You can populate the EAR with the required deployment information using the wsDefaultBindings Ant task. Sample scripts here.

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