如何更改WebLogic中的部署顺序?
根据此文档,可以更改 WebLogic 中的部署顺序: http://download.oracle.com /docs/cd/E12839_01/apirefs.1111/e13952/taskhelp/deployment/ChangeTheServerDeploymentOrder.html
例如,我有两个 Web 应用程序 app1.war 和 app2.ear.
我将 app1.war 的“部署顺序”设置为 1。
app2.ear 的“部署顺序”为 100。 这是否意味着 app1.war 将在 WebLogic 开始启动 app2.ear 之前启动并运行?
不幸的是它对我不起作用。 WebLogic 开始启动 app1.war,但当 app1.war 尚未处于 STATE_ACTIVE 状态时,它开始启动 app2.ear。
According to this documentation it is possible to change deployment order in WebLogic:
http://download.oracle.com/docs/cd/E12839_01/apirefs.1111/e13952/taskhelp/deployment/ChangeTheServerDeploymentOrder.html
For example I have two web applications app1.war and app2.ear.
I set "Deployment order" to 1 for app1.war.
And "Deployment order" 100 for app2.ear.
Does it mean that app1.war will be up and running prior WebLogic starting to launch app2.ear?
Unfortunately it does not work fo me. WebLogic starting to launch app1.war but then it starting to launch app2.ear when app1.war is not in STATE_ACTIVE yet.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我认为它将按照该命令启动并完成启动。我已经在我的服务器上进行了测试
它执行以下顺序。
一个线程运行部署顺序中的所有应用程序,并将所有应用程序转换为 PREPARED,然后转换为 ADMIN,然后转换为 ACTIVE
在下面的示例中,
dms.war
设置为 50,portletapp< /code> 设置为 100 作为部署顺序。
线程 0 运行以使所有内容处于 PREPARED 状态,并且 ADMIN
线程 1 开始运行以使它们处于活动状态
I think it will start and then complete the launching as per that order. I have tested on my server
It performs the following sequence.
One thread runs through all the apps in the deployment order and transitions all of them to PREPARED, then to ADMIN then to ACTIVE
In my example below,
dms.war
is set at 50 andportletapp
is set at 100 as deployment order.Thread 0 runs to make all to PREPARED and ADMIN
Thread 1 starts running to make them ACTIVE
在您的示例中,线程 1 同时将两个应用程序“dms.war”和“portletapp”置于活动状态。如果第二个应用程序确实依赖于第一个应用程序,则第二个应用程序将会失败。也许在你的测试中,碰巧没有这样的依赖关系?
In your example, thread 1 puts two applications "dms.war" and "portletapp" to ACTIVE at the same time. If indeed the 2nd app depends on the 1st app, the 2nd app would fail. Maybe in your testing, it happens there is no such dependency?
如果您尚未执行此操作,请在管理控制台的更改中心中单击锁定和锁定。编辑(请参阅使用更改中心)。
在管理控制台的左窗格中,选择部署。右窗格显示配置为在域中部署的所有模块,并按其当前部署顺序列出。
在右侧窗格中,单击要更改部署顺序的模块的名称。
在显示的“概述”选项卡中,在“部署顺序”字段中输入新值,然后单击“保存”以应用更改。
要更改启动类的部署顺序,请按照配置启动类中的说明进行操作。
要激活这些更改,请在管理控制台的更改中心中单击激活更改。
并非所有更改都会立即生效 - 有些更改需要重新启动(请参阅使用更改中心)。
If you have not already done so, in the Change Center of the Administration Console, click Lock & Edit (see Use the Change Center).
In the left pane of the Administration Console, select Deployments. The right pane displays all modules configured for deployment in the domain, listed in their current deployment order.
In the right pane, click the name of the module for which you want to change the deployment order.
In the Overview tab that displays, enter a new value in the Deployment Order field, and click Save to apply your changes.
To change the deployment order of a Startup class, follow the instructions in Configure startup classes.
To activate these changes, in the Change Center of the Administration Console, click Activate Changes.
Not all changes take effect immediately—some require a restart (see Use the Change Center).