Author: rob.stryker(a)jboss.com
Date: 2009-01-21 03:52:19 -0500 (Wed, 21 Jan 2009)
New Revision: 13158
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java
Log:
JBIDE-3461 - thread.yield and a sleep(100) should fix this issue.
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java 2009-01-21
05:54:33 UTC (rev 13157)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java 2009-01-21
08:52:19 UTC (rev 13158)
@@ -58,10 +58,12 @@
ILaunchConfigurationWorkingCopy wc = createLaunchConfiguration(server);
ILaunch launch = wc.launch(ILaunchManager.RUN_MODE, new NullProgressMonitor());
IProcess stopProcess = launch.getProcesses()[0];
- while( !stopProcess.isTerminated() && server.getServerState() ==
IServer.STATE_STOPPING) {}
- if( !stopProcess.isTerminated()) {
- stopProcess.terminate();
- return false;
+ while( !stopProcess.isTerminated()) {
+ try {
+ Thread.yield();
+ Thread.sleep(100);
+ } catch(InterruptedException ie) {
+ }
}
return stopProcess.getExitValue() == 0 ? true : false;
} catch( CoreException ce ) {
Show replies by date