4 Replies Latest reply on Sep 3, 2009 6:59 PM by negora

    Stopping and starting EARs from the JMX console

    negora

      Hello:

      I've been checking the Wiki documentation and also searching these forums in order to find information about this issue, but every answer seemed to be more general and didn't focused on EARs in concrete.

      Checking the documentation of the JMX console I've been able to restart web applications (contained into WARs) and also independent EJBs. Everything worked fine. However, playing for an hour with the JMX console I haven't been able to find anything related restart whole EARs (and thus, remap entity classes, etc.)

      I've always performed the reload operation either hiding and un-hiding the EAR file/folder (making a batch file which renamed it with one point as first character and then removed it) or using the GNU program "touch" on the descriptor file of the EAR, updating its timestamp (on Windows too, thanks to the GnuWin32 project). Basically I forced the hot redeployment in both cases. However I believe that using the JMX console is more... Convenient and elegant.

      Thanks to JBoss 5 I've recently tested the new Administration Console, which allows me to perform this task. However, I still wanna know if the JMX console can do the same, since I use JBoss 4 on production.

      Can anyone help me? Thank you very much in advance.

      PD: On the Wiki I read http://www.jboss.org/community/wiki/RedeployFromTheJMXConsole, but the list appears to be empty in my case.

        • 1. Re: Stopping and starting EARs from the JMX console
          wolfgangknauf

          Hi,

          some time ago, I filed a JIRA issue about problems with the MainDeployer: https://jira.jboss.org/jira/browse/JBAS-5643 . It was closed without being fixed.

          Maybe things as "listDeployed" only work for apps which were deployed the the MainDeployer MBean, but not for those apps which were copied to the "deploy" folder.

          Best regards

          Wolfgang

          • 2. Re: Stopping and starting EARs from the JMX console
            negora

            Wolfgang: Ummm... Very interesting. If they closed the JIRA I guess that's the normal behaviour, as you state.

            In the end I decided to continue with my manual deployment instead of using the console (be it the JMX console or the administration console). Basically because during the development of my applications I always prefer to use directories instead of pure JAR, WAR or EAR files (because of matter of speed) and, although I only used the "start" and "stop" operations in the console, some times my applications got deleted.

            I still don't know why, because as far as I know even re-deploying an application the original source (the JAR file for example) isn't deleted, but the files which were extracted from it, Right?

            Whatever it's the cause I think that I'll continue using my OS-dependent batch files for quick start and stop operations during the development.

            Thank you very much for your answer, Wolfgang ;) .

            • 3. Re: Stopping and starting EARs from the JMX console
              wolfgangknauf

              Hi,

              if you want to deploy only for development purposes, you might take a look at JSR88 deployment: http://www.jboss.org/community/wiki/JSR88Client
              This works for JBoss 4.x and 5.x. The only limitation: deployment is not persistent. After a server restart, the app is gone.

              Wolfgang

              • 4. Re: Stopping and starting EARs from the JMX console
                negora

                Wolfgang: I'll take a look when I've more free time. It sounds interesting. Thank you a lot again :) .