3 Replies Latest reply on Mar 10, 2009 10:31 AM by wolfgangknauf

    stop or re-deploy a web application in JBoss 5.0?

      Hi all,

      I am new to JBoss and study to use it. Suppose, I have several web applications in a JBoss AS 5.0.

      1. If I want to stop one web application temporary for maintenance or other some reason, how can I do that? As I know, I can use admin-console to delete that web application that will be removed/deleted physically. I do not want to delete it and I just stop that web service/application for a short period of time.

      2. Also, if any user browse that web page in the stopped web application, they will 404 page not found. Is there other method/handling better to show the specific stopped web application is not available ( a message page )?

      3. If I want to re-deploy the web application, I know that I just put the new war file in the "depl0y" folder. It can re-deploy itself. My question is how about the transaction is handled during the deployment. Does JBoss AS 5.0 will wait all connection/request to finish first and then stop the new request; then do deployment. Please help to clarify the deployment flow.

      Thanks for any help.

        • 1. Re: stop or re-deploy a web application in JBoss 5.0?
          wolfgangknauf

          Hi,

          1) I think the "MainDeployer" could help. It can undeploy/deploy web applications without having to delete/add the WAR file. You will find it in the jmx-console.
          The jmx-console should also contain a service representing your web app, and there you should find start/stop methods.

          For 2 and 3 I cannot help.

          Wolfgang

          • 2. Re: stop or re-deploy a web application in JBoss 5.0?

            Hi wolfgang,

            Thanks for your help.

            As I use "jmx-console", it is not easy to find that "MainDeployer". Also not every web application has this service. Click on "jboss.system" on the left menu, there is a "service=MainDeployer" on the right menu. When I click on the url of "service=MainDeployer", there is several "stop", "deploy", "undeploy", ... with "invoke" button. I have no idea which "stop" will stop which web application. Really confuse.

            Finally, I think "jmx-console" is not a user-friend GUI at all. Also, it cannot help me to do manage the JBoss As or web application.

            • 3. Re: stop or re-deploy a web application in JBoss 5.0?
              wolfgangknauf

              Hi,

              you were quite near to it ;-). The "deploy" and "undeploy" methods are the right ones. The parameters for them are URLs of deployed files (e.g. in your "deploy" directory).
              Unfortunately, at least in some Betas of JBoss 5, they were not working as expected ( https://jira.jboss.org/jira/browse/JBAS-5643 ). So, if you are interested in using them, you should ask in the "AS5" forum about the state of it.
              The "stop"/"start" methods will stop/start the MainDeployer service, so I don't advice to click them ;-).

              I think you should also find some service which is named like your web app, and this service should contain start/stop methods. So, maybe you can start/stop your web app this way.

              Best regards

              Wolfgang