Author: rob.stryker(a)jboss.com
Date: 2011-05-19 10:54:06 -0400 (Thu, 19 May 2011)
New Revision: 31382
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/ProcessTerminatedPoller.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossBehaviorDelegate.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7Server.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7ServerBehavior.java
Log:
JBIDE-8959 - fixes for as7,
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/ProcessTerminatedPoller.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/ProcessTerminatedPoller.java 2011-05-19
14:43:08 UTC (rev 31381)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/ProcessTerminatedPoller.java 2011-05-19
14:54:06 UTC (rev 31382)
@@ -61,12 +61,13 @@
}
public boolean isComplete() throws PollingException {
- JBossBehaviourDelegate del = server.getDelegate();
- if( del instanceof IProcessProvider ) {
- IProcess p = ((IProcessProvider)del).getProcess();
- return p == null || p.isTerminated();
- }
- return true;
+// JBossBehaviourDelegate del = server.getDelegate();
+// if( del instanceof IProcessProvider ) {
+// IProcess p = ((IProcessProvider)del).getProcess();
+// boolean b = p == null || p.isTerminated();
+// System.out.println(p + " " + b); //$NON-NLS-1$
+// }
+ return false;
}
public void failureHandled(Properties properties) {
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossBehaviorDelegate.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossBehaviorDelegate.java 2011-05-19
14:43:08 UTC (rev 31381)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossBehaviorDelegate.java 2011-05-19
14:54:06 UTC (rev 31382)
@@ -136,6 +136,8 @@
for (int i = 0; i < size; i++) {
if (process != null && process.equals(events[i].getSource()) &&
events[i].getKind() == DebugEvent.TERMINATE) {
DebugPlugin.getDefault().removeDebugEventListener(this);
+ if( pollThread != null )
+ pollThread.cancel();
forceStop();
addProcessTerminatedEvent();
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7Server.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7Server.java 2011-05-19
14:43:08 UTC (rev 31381)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7Server.java 2011-05-19
14:54:06 UTC (rev 31382)
@@ -27,6 +27,7 @@
setAttribute(DEPLOY_DIRECTORY_TYPE, DEPLOY_SERVER);
setAttribute(IJBossToolingConstants.WEB_PORT_DETECT, false);
setAttribute(IJBossToolingConstants.WEB_PORT,
IJBossToolingConstants.JBOSS_WEB_DEFAULT_PORT);
+ setAttribute(IJBossToolingConstants.STARTUP_POLLER_KEY,
JBoss7ManagerServicePoller.POLLER_ID);
}
public boolean hasJMXProvider() {
return false;
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7ServerBehavior.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7ServerBehavior.java 2011-05-19
14:43:08 UTC (rev 31381)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7ServerBehavior.java 2011-05-19
14:54:06 UTC (rev 31382)
@@ -87,24 +87,12 @@
if( pollThread != null ) {
pollThread.cancel();
}
- IServerStatePoller poller =
PollThreadUtils.getPoller(JBoss7ManagerServicePoller.POLLER_ID, expectedState,
getServer());
+ //IServerStatePoller poller =
PollThreadUtils.getPoller(JBoss7ManagerServicePoller.POLLER_ID, expectedState,
getServer());
+ IServerStatePoller poller = PollThreadUtils.getPoller(expectedState, getServer());
this.pollThread = new PollThread(expectedState, poller, this);
pollThread.start();
}
- @Override
- public void serverStarting() {
- //super.serverStarting();
- setServerStarting();
- pollServer(IServerStatePoller.SERVER_UP);
- }
-
- @Override
- public void serverStopping() {
- super.serverStopping();
- pollServer(IServerStatePoller.SERVER_DOWN);
- }
-
private void initDebugListener(IProcess process) {
DebugPlugin.getDefault().addDebugEventListener(serverProcessListener = new
JBossServerLifecycleListener());
}
@@ -113,6 +101,8 @@
if( serverProcessListener != null ) {
DebugPlugin.getDefault().removeDebugEventListener(serverProcessListener);
serverProcess = null;
+ if( pollThread != null )
+ pollThread.cancel();
}
}
Show replies by date