Author: rob.stryker(a)jboss.com
Date: 2007-08-15 21:16:19 -0400 (Wed, 15 Aug 2007)
New Revision: 3152
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/PollThread.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/attributes/IServerPollingAttributes.java
Log:
Default shutdown poller switched to server process terminated poller, which waits until
the process has finished.
Fixes JBIDE-747
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/PollThread.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/PollThread.java 2007-08-15
17:06:33 UTC (rev 3151)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/PollThread.java 2007-08-16
01:16:19 UTC (rev 3152)
@@ -24,7 +24,6 @@
import java.util.Date;
import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.IServerAttributes;
import org.eclipse.wst.server.core.internal.ServerType;
import org.jboss.ide.eclipse.as.core.ExtensionManager;
import org.jboss.ide.eclipse.as.core.model.EventLogModel;
@@ -81,8 +80,13 @@
protected IServerStatePoller discoverPoller(JBossServerBehavior behavior, boolean
expectedState) {
JBossServer s = ServerConverter.getJBossServer(behavior.getServer());
ServerAttributeHelper helper = s.getAttributeHelper();
- String key = expectedState == IServerStatePoller.SERVER_UP ?
IServerPollingAttributes.STARTUP_POLLER_KEY :
IServerPollingAttributes.SHUTDOWN_POLLER_KEY;
- String pollerId = helper.getAttribute(key, IServerPollingAttributes.DEFAULT_POLLER);
+ String key = expectedState == IServerStatePoller.SERVER_UP ?
+ IServerPollingAttributes.STARTUP_POLLER_KEY :
+ IServerPollingAttributes.SHUTDOWN_POLLER_KEY;
+ String defaultPoller = expectedState == IServerStatePoller.SERVER_UP ?
+ IServerPollingAttributes.DEFAULT_STARTUP_POLLER :
+ IServerPollingAttributes.DEFAULT_SHUTDOWN_POLLER;
+ String pollerId = helper.getAttribute(key, defaultPoller);
ServerStatePollerType type = ExtensionManager.getDefault().getPollerType(pollerId);
return type == null ? null : type.createPoller();
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/attributes/IServerPollingAttributes.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/attributes/IServerPollingAttributes.java 2007-08-15
17:06:33 UTC (rev 3151)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/attributes/IServerPollingAttributes.java 2007-08-16
01:16:19 UTC (rev 3152)
@@ -28,7 +28,8 @@
public static final String TIMEOUT_BEHAVIOR =
"org.jboss.ide.eclipse.as.core.server.attributes.timeoutBehavior";
public static final String STARTUP_POLLER_KEY =
"org.jboss.ide.eclipse.as.core.server.attributes.startupPollerKey";
public static final String SHUTDOWN_POLLER_KEY =
"org.jboss.ide.eclipse.as.core.server.attributes.shutdownPollerKey";
- public static final String DEFAULT_POLLER =
"org.jboss.ide.eclipse.as.core.runtime.server.JMXPoller";
+ public static final String DEFAULT_STARTUP_POLLER =
"org.jboss.ide.eclipse.as.core.runtime.server.JMXPoller";
+ public static final String DEFAULT_SHUTDOWN_POLLER =
"org.jboss.ide.eclipse.as.core.runtime.server.processTerminatedPoller";
public static final boolean TIMEOUT_ABORT = true;
public static final boolean TIMEOUT_IGNORE = false;
Show replies by date