Search code examples
javaservletswebweblogic

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


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

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:

 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?


Solution

  • 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".

    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.

    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.

    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, delete is basically undeploying the application. Stop does not undeploy your application. It simply stops servicing requests. The app is still deployed as shown in the deployment screen.