geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcco...@apache.org
Subject svn commit: r796960 - in /geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core: Activator.java GeronimoServerBehaviourDelegate.java
Date Thu, 23 Jul 2009 06:24:45 GMT
Author: mcconne
Date: Thu Jul 23 06:24:45 2009
New Revision: 796960

URL: http://svn.apache.org/viewvc?rev=796960&view=rev
Log:
GERONIMODEVTOOLS-575 Handle the scenario where an exception occurs on the GEP side when stopping
the server -- Thanks to Delos Dai for this patch !!

Modified:
    geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/Activator.java
    geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoServerBehaviourDelegate.java

Modified: geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/Activator.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/Activator.java?rev=796960&r1=796959&r2=796960&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/Activator.java
(original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/Activator.java
Thu Jul 23 06:24:45 2009
@@ -68,6 +68,16 @@
         }
     }
 
+
+    /** 
+     * <b>triggerStartUpdateServerTask</b> is invoked from:
+     * <ul> 
+     * <li>The WTP ResourceManager after a new server has been defined (via the WTP
NewServerWizard)
+     * <li>When a server lifecycle listener has been added (see above)
+     * </ul>
+     * 
+     * @param server 
+     */
     private void triggerStartUpdateServerTask(IServer server) {
         GeronimoServerBehaviourDelegate delegate = (GeronimoServerBehaviourDelegate) server.getAdapter(GeronimoServerBehaviourDelegate.class);
         if (delegate == null) {
@@ -78,6 +88,7 @@
         }
     }
 
+
     /*
      * (non-Javadoc)
      *

Modified: geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoServerBehaviourDelegate.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoServerBehaviourDelegate.java?rev=796960&r1=796959&r2=796960&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoServerBehaviourDelegate.java
(original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoServerBehaviourDelegate.java
Thu Jul 23 06:24:45 2009
@@ -315,16 +315,21 @@
         Trace.tracePoint("Exit ", "GeronimoServerBehaviourDelegate.publishFinish");
     }
 
-    /*
-     * (non-Javadoc)
+
+    /**
+     * Initializes the Geronimo server delegate. This method is called by the server core
framework 
+     * to give delegates a chance to do their own initialization. As such, the GEP proper
should 
+     * never call this method.
      * 
-     * @see org.eclipse.wst.server.core.model.ServerBehaviourDelegate#initialize(org.eclipse.core.runtime.IProgressMonitor)
+     * @param monitor a progress monitor, or <code>null</code> if progress reporting
and cancellation 
+     * are not desired
      */
     protected void initialize(IProgressMonitor monitor) {
         Trace.tracePoint("Entry", "GeronimoServerBehaviourDelegate.initialize", monitor);
         Trace.tracePoint("Exit ", "GeronimoServerBehaviourDelegate.initialize");
     }
 
+
     /*
      * (non-Javadoc)
      * 
@@ -350,6 +355,7 @@
         return (IGeronimoServer) getServer().loadAdapter(IGeronimoServer.class, null);
     }
 
+
     protected void terminate() {
         Trace.tracePoint("Entry", "GeronimoServerBehaviourDelegate.terminate");
 
@@ -366,11 +372,16 @@
             stopImpl();
         } catch (Exception e) {
             Trace.trace(Trace.SEVERE, "Error killing the geronimo server process", e); //$NON-NLS-1$
+            // 
+            // WTP does not allow a CoreException to be thrown in this case 
+            // 
+            throw new RuntimeException(Messages.STOP_FAIL);
         }
 
         Trace.tracePoint("Exit ", "GeronimoServerBehaviourDelegate.terminate");
     }
 
+
     protected void stopImpl() {
         if (process != null) {
             process = null;



Mime
View raw message