directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r981879 - in /directory/studio/trunk/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs: StartLdapServerRunnable.java StopLdapServerRunnable.java
Date Tue, 03 Aug 2010 13:50:53 GMT
Author: pamarcelot
Date: Tue Aug  3 13:50:53 2010
New Revision: 981879

URL: http://svn.apache.org/viewvc?rev=981879&view=rev
Log:
Reporting the exception correctly to the ProgressMonitor.

Modified:
    directory/studio/trunk/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/StartLdapServerRunnable.java
    directory/studio/trunk/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/StopLdapServerRunnable.java

Modified: directory/studio/trunk/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/StartLdapServerRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/StartLdapServerRunnable.java?rev=981879&r1=981878&r2=981879&view=diff
==============================================================================
--- directory/studio/trunk/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/StartLdapServerRunnable.java
(original)
+++ directory/studio/trunk/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/StartLdapServerRunnable.java
Tue Aug  3 13:50:53 2010
@@ -90,10 +90,6 @@ public class StartLdapServerRunnable imp
      */
     public void run( StudioProgressMonitor monitor )
     {
-        // Creating a Studio Progress Monitor
-        //        StudioProgressMonitor studioConnectionProgressMonitor = new StudioProgressMonitor(
-        //            LdapServersPluginConstants.PLUGIN_ID, monitor ); // TODO remove this?
-
         // Setting the status on the server to 'starting'
         server.setStatus( LdapServerStatus.STARTING );
 
@@ -118,7 +114,6 @@ public class StartLdapServerRunnable imp
 
                     // Reporting the error to the monitor
                     monitor.reportError( e );
-
                 }
             }
         }

Modified: directory/studio/trunk/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/StopLdapServerRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/StopLdapServerRunnable.java?rev=981879&r1=981878&r2=981879&view=diff
==============================================================================
--- directory/studio/trunk/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/StopLdapServerRunnable.java
(original)
+++ directory/studio/trunk/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/StopLdapServerRunnable.java
Tue Aug  3 13:50:53 2010
@@ -23,7 +23,6 @@ package org.apache.directory.studio.ldap
 
 import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.common.core.jobs.StudioRunnableWithProgress;
-import org.apache.directory.studio.ldapservers.LdapServersPluginConstants;
 import org.apache.directory.studio.ldapservers.model.LdapServer;
 import org.apache.directory.studio.ldapservers.model.LdapServerAdapter;
 import org.apache.directory.studio.ldapservers.model.LdapServerAdapterExtension;
@@ -95,7 +94,7 @@ public class StopLdapServerRunnable impl
         // Starting a new watchdog thread
         StopLdapServerWatchDogThread.runNewWatchDogThread( server );
 
-        // Launching the 'stop()' of the LDAP Server Adapter
+        // Launching the 'stop()' method of the LDAP Server Adapter
         LdapServerAdapterExtension ldapServerAdapterExtension = server.getLdapServerAdapterExtension();
         if ( ldapServerAdapterExtension != null )
         {
@@ -104,13 +103,15 @@ public class StopLdapServerRunnable impl
             {
                 try
                 {
-                    ldapServerAdapter.stop( server, new StudioProgressMonitor( LdapServersPluginConstants.PLUGIN_ID,
-                        monitor ) ); // TODO
+                    ldapServerAdapter.stop( server, monitor );
                 }
                 catch ( Exception e )
                 {
-                    // TODO Auto-generated catch block
-                    e.printStackTrace();
+                    // Setting the server as started
+                    server.setStatus( LdapServerStatus.STARTED );
+
+                    // Reporting the error to the monitor
+                    monitor.reportError( e );
                 }
             }
         }



Mime
View raw message