JBoss 上的交互式应用程序部署

发布于 2024-12-01 09:17:39 字数 1208 浏览 3 评论 0原文

在JBoss AS 7中,有没有一种方法可以交互式地部署应用程序?换句话说,JBoss 有没有办法在部署之前手动创建 JBoss 部署描述符(例如 jboss-web.xml),而提示部署者提供成功部署所需的信息和/或是否有一个 API 可以通过编程方式或通过脚本调用来执行此操作?例如,如果应用程序定义了在代码中注释的资源引用或环境条目 (@Resource),那么部署者如何知道必须在部署时绑定此资源引用?

对于一些背景知识,我一直使用 IBM WebSphere Application Server 作为我的主要 Java EE 应用程序服务器,它在管理控制台中提供 Java API、wsadmin 命令和 GUI 向导,该向导会提示部署者提供部署应用程序所需的部署信息。应用程序并在部署期间生成自己的自定义描述符文件。我希望其他应用程序服务器,特别是 JBoss 7,也提供类似的功能。

目标之一是能够自动部署一组不同的可移植 Java EE 应用程序(即不具有包含部署信息的 JBoss 特定描述符的应用程序),并阻止部署者 >手动执行部署不仅要熟悉应用程序和模块部署描述符,更重要的是,要熟悉代码中包含的所有必须在部署时管理的注释(例如@Resource 注释)。

特别是,我正在寻找 Java EE 规范

EE.2.12.4 部署描述符和注释

Java EE 产品提供商需要提供一个部署工具,用于解释 Java EE 部署描述符和类文件注释,并允许部署者将应用程序组件的需求映射到特定 Java EE 产品和环境的功能。

虽然规范对于这意味着什么以及如何实现它有些模糊,但在我看来,WebSphere Application Server 很好地满足了这一要求,而许多其他应用程序服务器(似乎是 JBoss)需要手动创建自定义描述符在部署之前达不到要求。

另请注意,我已将同样的问题发布到 JBoss 社区论坛(此处 和 < a href="http://community.jboss.org/thread/171141" rel="nofollow">此处),但尚未收到任何回复。

In JBoss AS 7, is there a way to interactively deploy an application? In other words, rather than manually creating JBoss deployment descriptors prior to deployment (e.g. jboss-web.xml), is there a way for JBoss to prompt the deployer for information that it needs in order to successfully deploy and/or is there an API that can be invoked programmatically or via scripting to do this? For example, if an application defines a resource reference or environment entry which is annotated in the code (@Resource), how is a deployer to know that this resource reference must be bound at deployment-time?

For some background, I've been using IBM WebSphere Application Server as my primary Java EE application server and it provides Java APIs, wsadmin commands, and a GUI wizard in the admin console which prompt deployers for the deployment information that it needs to deploy an application and generates its own custom descriptor files during deployment. I'm hoping that other application servers, in particular, JBoss 7, also provide similar functionality.

One of the goals is to be able to automate the deployment of a diverse set of portable Java EE applications (i.e. applications that will not have JBoss-specific descriptors containing deployment information), and to prevent deployers manually performing deployments from being intimately familiar not only with the application and module deployment descriptors, but more importantly, all of the annotations contained in the code that must be managed at deployment-time (such as @Resource annotations).

In particular, I'm looking for the fulfillment of this requirement in the Java EE specification:

EE.2.12.4 Deployment Descriptors and Annotations

The Java EE Product Provider is required to provide a deployment tool that interprets the Java EE deployment descriptors and class file annotations and allows the Deployer to map the application component’s requirements to the capabilities of a specific Java EE product and environment.

While the specification is somewhat ambiguous as to what this means and how it is implemented, in my opinion, WebSphere Application Server fulfills this requirement beautifully, whereas many other application servers (such as JBoss, it seems) that require the manual creation of custom descriptors prior to deployment fall short.

Also note that I've posted this same question to the JBoss Community Forums (here and here), but have not received any responses there.

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

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

发布评论

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

评论(3

不知在何时 2024-12-08 09:17:39

我知道该线程有点旧,但无论如何。我过去曾使用过 Websphere,并且我知道您所描述的部署工具。而且,任何版本的 JBoss 都没有类似的功能。

真的很奇怪,当您考虑规范的措辞时(“...需要提供部署工具”)

The thread is somewhat old, I know, but anyway. I've worked with Websphere in the past and I know the deployment tool you are describing. And, no there isn't anything like that for any version of JBoss.

Odd, really, when you consider the phrasing of the specification ("...is required to provide a deployment tool")

泅人 2024-12-08 09:17:39

我认为您正在寻找 JBoss Web 管理控制台 它提供了一个用于部署 EAR、WAR 和 JAR 文件的 Web 界面。它具有一些管理和维护功能,但不具有您建议的动态依赖关系管理。

I think you're looking for the JBoss Web Management Console which provides a web interface for deploying EAR, WAR, and JAR files. It has some administration and maintenance capabilities but not the dynamic dependency management your suggesting.

城歌 2024-12-08 09:17:39

除了 jpredham 建议的管理控制台之外,还有一个 Maven 插件可以满足您的需求。新版本 7.0.1 已发布,并且有一篇 博客文章 描述了如何添加使用maven插件的资源。

In addition to the management console that jpredham suggests there is also a maven plugin that might do what you are looking for. A new version, 7.0.1, has been released and there is a blog post describing how to add resources using the maven plugin.

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