将 EAR 的多个实例(代表版本)部署到 Glassfish

发布于 2024-08-25 18:56:27 字数 786 浏览 10 评论 0原文

我基本上希望能够将同一 EAR 文件的多个版本部署到同一服务器(Glassfish 实例?),并且每个版本都有一个唯一的路径来分隔它们。

从我对此的阅读看来,多个 EAR 部署到 Web 服务器命名空间的根目录,这样,如果它们没有冲突的 WAR 上下文根目录,它们就可以共存。

就我而言,我宁愿将所有内容都放在“/”下,而是希望能够将给定的 EAR 文件构建打上品牌,以便始终部署在给定路径下,例如“/foo-20100319”或“/ foo-CUSTOMER-20010101”。只需重命名单个 WAR 文件即可轻松完成此操作。我不需要也不希望他们互相打扰。

据我了解,此重新映射超出了 application.xml 文件的范围,因此我发现 http://docs.sun.com/app/docs/doc/820-7693/beayr?a=view 说我可以指定 web-uri 和 context- root,但我不确定我想要做什么,可以在 Glassfish 中用这些来指定。

我应该如何处理这个问题?我可以完全控制构建过程。

(我发现 将多个 Java Web 应用程序部署到 Glassfish一次尝试,但我不确定如何将其应用到我需要的地方)。

I basically want to be able to deploy multiple versions of the same EAR file to the same server (Glassfish instance?) , and have a unique path to each version separating them.

From my reading on this it appears that multiple EARs deploy to the root of the web server namespace so that they can coexist if they do not have colliding context-root's of WAR's.

In my case I'd rather have that instead of everything going under "/", I'd like to be able to brand a given EAR-file build to ALWAYS deploy under a given path like "/foo-20100319" or "/foo-CUSTOMER-20010101". This can easily be done with a single WAR file just by renaming it. I do not need or want them to disturb each other.

It is my understanding that this remapping is outside the scope of the application.xml file, so I found that http://docs.sun.com/app/docs/doc/820-7693/beayr?a=view says that I can specify web-uri and context-root, but I am not certain that what I wish to do, can be specified with these in Glassfish.

How should I approach this? I have full control over the build process.

(I have found Deploying multiple Java web apps to Glassfish in one go but I am not certain how to apply this to what I need).

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

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

发布评论

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

评论(1

迷鸟归林 2024-09-01 18:56:27

应用程序.xml 允许您将耳朵中包含的 Web 应用程序映射到您选择的上下文根。您还可以使用 sun-application.xml 执行此操作

由于您可以完全控制构建过程,因此选择权就在您手中。

您可能需要了解 --deploymentplan 选项GlassFish 的 asadmin 实用程序的部署子命令。它允许您在部署处理之前将其他文件混合到已部署的存档中...因此,您可以创建一个“通用”ear 文件和许多较短的部署计划文件,“混合”sun-application.xml 文件创建自定义部署所必需的。

The application.xml allows you to map a web app that is enclosed in an ear to the context root of your choice. You can also do this with the sun-application.xml.

Since you have full control over the build process, the choice is yours.

You may want to read about the --deploymentplan option of the deploy subcommand of GlassFish's asadmin utility. It allows you to mix additional files into the deployed archive before deployment processing... So, you can create a single 'generic' ear file and a number of shorter deploymentplan files, that 'mix-in' the sun-application.xml file necessary to create a customized deployment.

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