java 在 weblogic 管理控制台 > 部署中,stop 命令有什么作用?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/15139016/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-31 18:37:22  来源:igfitidea点击:

In the weblogic administration console > deployments, what does stop command do?

javaservletswebweblogic

提问by jon

I am new to weblogic and wondering: In the administration console under deployments you can select a deployment and click on stop (option a: when work completes, b: force stop now, c: stop, but continue servicing administration requests). What does the stop command do? I read http://docs.oracle.com/cd/E15523_01/apirefs.1111/e13952/taskhelp/applications/StopDeployedEnterpriseApplications.html

我是 weblogic 的新手,想知道:在部署下的管理控制台中,您可以选择一个部署并单击停止(选项 a:工作完成后,b:立即强制停止,c:停止,但继续为管理请求提供服务)。停止命令有什么作用?我读了http://docs.oracle.com/cd/E15523_01/apirefs.1111/e13952/taskhelp/applications/StopDeployedEnterpriseApplications.html

But I still do not understand. From other readings I have gathered that stop calls the destroy() method of a servlet, if it exists, and then deletes the container(from the deployments?)? I have a servlet with a destory() method and I want to understand whether I even need to call it, or if it is fine to just delete the deployment. When i try to force stop now and stop when work completes on the deployment I get these messages:

但我还是不明白。从我收集的其他阅读资料中,stop 调用 servlet 的 destroy() 方法(如果存在),然后删除容器(从部署中?)?我有一个带有 destory() 方法的 servlet,我想了解我是否需要调用它,或者是否可以删除部署。当我尝试立即强制停止并在部署工作完成时停止时,我收到以下消息:

 The application _auto_generated_ear_ is in an incompatible state and will not be included in this operation.
 All of the Deployments selected are currently in a state which is incompatible with this operation. No action will be performed.

Does anyone have a link to what is the process carried out for these stop commands?

有没有人有链接到这些停止命令执行的过程?

回答by Lan

First of all, you cannot delete an application if it is running. If you try to do so, you will get the error "The application xxxxx is currently running and may not be deleted".

首先,您不能删除正在运行的应用程序。如果您尝试这样做,您将收到错误“应用程序 xxxxx 当前正在运行,可能无法删除”。

Secondly, if it is a production system, it is better to do a stop- when work is complete. In that case, the application stops servicing new requests, but will keep servicing requests from users with an on-going session. Thus it will be less disruptive for your end users.

其次,如果是生产系统,最好在工作完成时停止。在这种情况下,应用程序将停止为新请求提供服务,但将继续为来自正在进行会话的用户请求提供服务。因此,它对您的最终用户的破坏性较小。

What if you restart the server? Does the message go away after the restart?

如果重启服务器怎么办?重新启动后消息是否消失?

If the application refuses to be stopped/deleted for some weird reasons, you can always shutdown the server, remove the corresponding entry in your config.xml and start the server again.

如果应用程序由于某些奇怪的原因拒绝停止/删除,您可以随时关闭服务器,删除 config.xml 中的相应条目并重新启动服务器。

Edit: based on comments

编辑:基于评论

The auto-generated EAR feature itself is part of an optimization for how OEPE publishes stand-alone WAR modules to WLS. WLS split-source deployment feature requires an EAR, so OEPE generate one for the user as split-source deployment. I suspect your problem might be caused by this auto-generated ear.

自动生成的 EAR 功能本身是 OEPE 如何将独立 WAR 模块发布到 WLS 的优化的一部分。WLS 分源部署功能需要 EAR,因此 OEPE 为用户生成一个作为分源部署。我怀疑您的问题可能是由这个自动生成的耳朵引起的。

However, it looks like it is development environment with split-source deployment. Why do you need to start/stop the application or delete the application through the console? Why cannot you just republish your application to the server through OEPE? It will pick up your new changes in the application. To answer your question, deleteis basically undeploying the application. Stopdoes not undeploy your application. It simply stops servicing requests. The app is still deployed as shown in the deployment screen.

但是,看起来它是具有拆分源部署的开发环境。为什么需要通过控制台启动/停止应用程序或删除应用程序?为什么不能直接通过 OEPE 将应用程序重新发布到服务器?它将在应用程序中获取您的新更改。为了回答您的问题,删除基本上是取消部署应用程序。停止不会取消部署您的应用程序。它只是停止服务请求。该应用程序仍按部署屏幕所示进行部署。