[jbosstools-issues] [JBoss JIRA] Created: (JBIDE-9354) Stopping JBoss 5.1 server Fails in about 3 different ways!

Rob Stryker (JIRA) jira-events at lists.jboss.org
Mon Jul 18 01:05:24 EDT 2011


Stopping JBoss 5.1 server Fails in about 3 different ways!
----------------------------------------------------------

                 Key: JBIDE-9354
                 URL: https://issues.jboss.org/browse/JBIDE-9354
             Project: Tools (JBoss Tools)
          Issue Type: Bug
          Components: JBossAS
    Affects Versions: 3.3.0.M3
            Reporter: Rob Stryker
            Assignee: Andre Dietisheim
             Fix For: 3.3.0.M3


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. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list