Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-9354

Stopping JBoss 5.1 server Fails in about 3 different ways!

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • 3.3.0.M3
    • 3.3.0.M3
    • server
    • None

    Description

      Stopping a JBoss 5.1 server comes up with the dialog introduced in JBIDE-9243. This dialog was meant to give users the option of what to do in the case of a server STARTUP and the server was already up. This should not be showing during a SHUTDOWN.

      The reason it shows during the shutdown is because StopLaunchConfiguration, a class marked deprecated and unused, is in fact used. This class, StopLaunchConfiguration, EXTENDS a class named AbstractJBossStartLaunchConfiguration, including the new methods for what to do during STARTUP in the even the server is ALREADY STARTED

      Additionally, after correcting the preLaunchCheck for StopLaunchConfiguration, an attempt to stop the server was always receiving a failing dialog, even though the server would eventually shut down. The reason for this is that the stop code in LocalJBossBehaviorDelegate.gracefullStop$Thread.run included the following code:

      if (stopProcess.getExitValue() == 0) {
      if( isProcessRunning())

      { // cancel the stop, say it failed, etc }

      }

      This code will ALWAYS misread a stop as a fail because the process that is launched to initiate the stop will finish in under 1 second, while the actual SERVER process may take 5 or 6 seconds to shut down. Therefore, after the stop process is launched, and finishes, with an exit code of 0 (no error), the process is ALWAYS still running.

      I am correcting the following:
      1) Overriding the preLaunchCheck in StopLaunchCOnfiguration
      2) I am replacing the faulty logic for recognizing a failed stop with proper logic to ONLY respond if the exit code is NOT 0
      3) I am expecting Andre to PROPERLY mark as deprecated or NOT deprecated the class StopLaunchConfiguration. It is currently marked deprecated, but it is still in use, and inherits from AbstractJBossStartLaunchConfiguration. A review will be necessary to see if it makes sense for StopLaunchConfiguration to inherit from a class named AbstractJBossStartLaunchConfiguration.

      And finally, changes that seem like they make no difference and are just code cleanup / re-organization STILL require SMOKE TESTS before commits. This is to make sure you didn't accidentally break something, like startup and shutdown of every server type. A bad build hinders QE's work for a full day and can cause tons of other problems.

      Attachments

        Issue Links

          Activity

            People

              adietish@redhat.com André Dietisheim
              rob.stryker Rob Stryker (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: