directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r380697 - in /directory/trunks/apacheds: server-installers/pom.xml server-tools/src/main/java/org/apache/directory/server/tools/GracefulShutdownCommand.java
Date Fri, 24 Feb 2006 16:02:27 GMT
Author: akarasulu
Date: Fri Feb 24 08:02:25 2006
New Revision: 380697

URL: http://svn.apache.org/viewcvs?rev=380697&view=rev
Log:
fixing broken installer settings and issue with graceful shutdown client showing false failure
messages

Modified:
    directory/trunks/apacheds/server-installers/pom.xml
    directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/GracefulShutdownCommand.java

Modified: directory/trunks/apacheds/server-installers/pom.xml
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/server-installers/pom.xml?rev=380697&r1=380696&r2=380697&view=diff
==============================================================================
--- directory/trunks/apacheds/server-installers/pom.xml (original)
+++ directory/trunks/apacheds/server-installers/pom.xml Fri Feb 24 08:02:25 2006
@@ -183,7 +183,7 @@
                 </packagedFile>
               </packagedFiles>
               <id>linux-jsvc</id>
-              <izPackInstallFile>izpack-unix.xml</izPackInstallFile>
+              <izPackInstallFile>src/main/installers/izpack-unix.xml</izPackInstallFile>
               <finalName>
                 apacheds-${pom.version}-linux-i386-setup.jar
               </finalName>
@@ -206,7 +206,7 @@
                 apacheds-${pom.version}-solaris-sparc-setup.jar
               </finalName>
               <id>solaris-jsvc-sparc</id>
-              <izPackInstallFile>izpack-unix.xml</izPackInstallFile>
+              <izPackInstallFile>src/main/installers/izpack-unix.xml</izPackInstallFile>
               <osName>sunos</osName>
               <osFamily>unix</osFamily>
               <osArch>sparc</osArch>
@@ -223,7 +223,7 @@
                 </packagedFile>
               </packagedFiles>
               <id>solaris-jsvc-i386</id>
-              <izPackInstallFile>izpack-unix.xml</izPackInstallFile>
+              <izPackInstallFile>src/main/installers/izpack-unix.xml</izPackInstallFile>
               <finalName>
                 apacheds-${pom.version}-solaris-i386-setup.jar
               </finalName>
@@ -243,7 +243,7 @@
                 </packagedFile>
               </packagedFiles>
               <id>macosx-jsvc</id>
-              <izPackInstallFile>izpack-mac.xml</izPackInstallFile>
+              <izPackInstallFile>src/main/installers/izpack-mac.xml</izPackInstallFile>
               <finalName>
                 apacheds-${pom.version}-macosx-ppc-setup.jar
               </finalName>

Modified: directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/GracefulShutdownCommand.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/GracefulShutdownCommand.java?rev=380697&r1=380696&r2=380697&view=diff
==============================================================================
--- directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/GracefulShutdownCommand.java
(original)
+++ directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/GracefulShutdownCommand.java
Fri Feb 24 08:02:25 2006
@@ -18,6 +18,8 @@
 
 
 import java.util.Hashtable;
+
+import javax.naming.CommunicationException;
 import javax.naming.ldap.InitialLdapContext;
 import javax.naming.ldap.LdapContext;
 
@@ -101,8 +103,21 @@
         }
         catch ( Throwable t )
         {
-            isSuccess = false;
-            System.err.print( "failed with error: " + t.getMessage() );
+            /*
+             * Sometimes because of timing issues we show a failure when the 
+             * shutdown has succeeded so we should check if the server is up
+             * before we set success to false.
+             */
+            try
+            {
+                new InitialLdapContext( env, null );
+                isSuccess = false;
+                System.err.print( "shutdown request failed with error: " + t.getMessage()
);
+            }
+            catch( CommunicationException e )
+            {
+                isSuccess = true;
+            }
         }
         isWaiting = false;
         ctx.close();



Mime
View raw message