在Websphere中部署战争有更好的方法吗?

发布于 2024-08-14 01:19:29 字数 433 浏览 3 评论 0原文

目前我正在使用 Websphere 管理控制台来更新战争。我执行以下三个步骤

  1. 停止应用程序
  2. 更新
  3. 启动应用程序

作为第二步的一部分,我使用以下选项。我从本地文件系统中选择战争。此步骤大约需要 10 分钟才能完成。

替代文本

我想知道是文件传输(http 传输到服务器)花费时间还是实际部署花费时间。要查看哪些日志才能获取该信息?

PS:我计划稍后编写一些 Jython 脚本来自动执行此任务。

Currently I am using Websphere Admin console to update a war. I do the following three steps

  1. stop the application
  2. update
  3. start the application

As a part of the second step I am using the following option. I select the war from the local file system. This step takes around 10 minutes to complete.

alt text

I wanted to know weather it is the file transfer (http transfer to the server) which is taking time or the actual deployment that is taking time. Which logs to see to get that information?

PS: I have plans to write some Jython scripts to automate this task later.

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

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

发布评论

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

评论(4

眼睛会笑 2024-08-21 01:19:29

大多数时候,WebSphere 会从 WEB-INF 文件夹中扫描您的 war 和 jar 文件以获取注释(例如 Java EE 5 和 JAX-WS 内容)。您可以通过获取 WebSphere 进程的线程转储来看到这一点。

为了加快速度,您可以通过将 Ignore-Scanning-Archives 属性添加到 war 中的 META-INF/manifest.mf 文件来排除大型第 3 方 jar(您也需要最新的修复包)。例如:

Ignore-Scanning-Archives: spring-2.5.6.jar, log4j-1.2.14.jar

Most of the time WebSphere is scanning your war and jars from WEB-INF folder for annotations (e.g. Java EE 5 and JAX-WS stuff). You can see that by taking a thread dump of the WebSphere process.

To speed things up you can exclude large 3rd party jars from scanning by adding Ignore-Scanning-Archives attrribute to META-INF/manifest.mf file in your war (you'll need latest fixpack too). For example:

Ignore-Scanning-Archives: spring-2.5.6.jar, log4j-1.2.14.jar
醉生梦死 2024-08-21 01:19:29

我怀疑实际部署需要很长时间。当我在 EJB 1.0 时代使用 Websphere 时,它​​有一个相当复杂的部署过程,涉及生成和编译代码。它有可能为您的 JSP 执行此操作吗?对我来说,在 JBoss 上部署一个 war 文件需要几分钟的时间,其中大部分时间都花在访问数据库的特定于应用程序的启动代码上。我们可以通过我们的日志框架看到这一点,该框架记录所有数据库命令和执行时间。

I suspect the actual deployment is what takes a long time. When I used Websphere back in the EJB 1.0 days it had a fairly complicated deployment procedure that involved generating and compiling code. Is it possible that it's doing that for your JSPs? For me deploying a war file on JBoss takes a couple minutes, and a lot of that time is in application-specific startup code which goes to the database. We can see this through our logging framework which logs all database-commands and the execution time.

一笔一画续写前缘 2024-08-21 01:19:29

是的,如果您的应用程序不在生产中,您可以重新部署,而无需停止和启动您的应用程序。在WebModule 下的WebSphere Administration 中,输入您现有的war 文件名,然后单击Update WebModule。

Yes you can redeploy the without stopping and starting your application if your application is not in production.In the the WebSphere Administration under WebModule type your existed war file name and click on Update WebModule.

秋日私语 2024-08-21 01:19:29

您可以从 WAR 文件创建 RPM 包并将其部署在 WebSphere 上。

You can create an RPM package from your WAR file and deploy it on WebSphere.

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