directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r372722 - in /directory/trunks/apacheds/standalone: daemon/src/main/java/org/apache/directory/server/standalone/daemon/Bootstrapper.java installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/inno/install.iss
Date Fri, 27 Jan 2006 04:25:34 GMT
Author: akarasulu
Date: Thu Jan 26 20:25:22 2006
New Revision: 372722

URL: http://svn.apache.org/viewcvs?rev=372722&view=rev
Log:
changes ...

 o added more debugging to the bootstrapper
 o added directive to inno to create the lib\ext directory
 o realized how we need to refactor this to make it work
   right across different daemon frameworks ... notes in file
 o removed some useless code in main for param handling


Modified:
    directory/trunks/apacheds/standalone/daemon/src/main/java/org/apache/directory/server/standalone/daemon/Bootstrapper.java
    directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/inno/install.iss

Modified: directory/trunks/apacheds/standalone/daemon/src/main/java/org/apache/directory/server/standalone/daemon/Bootstrapper.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/standalone/daemon/src/main/java/org/apache/directory/server/standalone/daemon/Bootstrapper.java?rev=372722&r1=372721&r2=372722&view=diff
==============================================================================
--- directory/trunks/apacheds/standalone/daemon/src/main/java/org/apache/directory/server/standalone/daemon/Bootstrapper.java
(original)
+++ directory/trunks/apacheds/standalone/daemon/src/main/java/org/apache/directory/server/standalone/daemon/Bootstrapper.java
Thu Jan 26 20:25:22 2006
@@ -56,15 +56,25 @@
     
     public void setInstallationLayout( String installationBase )
     {
+    	log.debug( "Setting layout in Bootstrapper using base: " + installationBase );
         install = new InstallationLayout( installationBase );
-        install.verifyInstallation();
+        
+        try
+        {
+        	install.verifyInstallation();
+        }
+        catch( Throwable t )
+        {
+        	log.error( "Installation verification failure!", t );
+        }
+        
         try
         {
             bootstrapProperties.load( new FileInputStream( install.getBootstrapperConfigurationFile()
) );
         }
         catch ( Exception e )
         {
-            log.error( "", e );
+            log.error( "Failed while loading: " + install.getBootstrapperConfigurationFile(),
e );
             System.exit( BOOTSTRAP_PROPLOAD_FAILURE_EXITCODE );
         }
     }
@@ -246,6 +256,13 @@
         }
         
         callInit( bootstrapProperties.getProperty( BOOTSTRAP_START_CLASS_PROP, null ) );
+
+        // This is only needed for procrun but does not harm jsvc or runs 
+        // Leads me to think that we need to differentiate somehow between
+        // different daemon frameworks.  We can do this via command line args,
+        // system properties or by making them call different methods to start
+        // the process.  However not every framework may support calling 
+        // different methods which may also be somewhat error prone.
         
         while( true )
         {
@@ -257,8 +274,6 @@
             {
                 e.printStackTrace();
             }
-
-            log.debug( "tick-tock" );
         }
     }
     
@@ -328,9 +343,11 @@
         {
             if ( instance == null )
             {
+            	log.debug( "main(String[]) initializing Bootstrapper ... )" );
                 instance = new Bootstrapper();
                 instance.setInstallationLayout( args[0] );
                 instance.setParentLoader( Bootstrapper.class.getClassLoader() );
+                log.debug( "Bootstrapper initialized" );
             }
         }
         else
@@ -342,20 +359,7 @@
             System.exit( 1 );
         }
 
-        String command = null;
-        if ( args.length > 0 )
-        {
-            command = args[args.length - 1];
-        }
-        else
-        {
-            String msg = "No command to start or stop was given?";
-            System.err.println( msg );
-            log.error( msg );
-            printHelp();
-            System.exit( 2 );
-        }
-
+        String command = args[args.length - 1];
         try
         {
             if ( command.equalsIgnoreCase( "start" ) )
@@ -381,6 +385,7 @@
         }
         catch ( Throwable t )
         {
+        	log.error( "Encountered error while processing command: " + command );
             t.printStackTrace();
             System.exit( 4 );
         }

Modified: directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/inno/install.iss
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/inno/install.iss?rev=372722&r1=372721&r2=372722&view=diff
==============================================================================
--- directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/inno/install.iss
(original)
+++ directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/inno/install.iss
Thu Jan 26 20:25:22 2006
@@ -56,8 +56,9 @@
 Source: {#SourceBase}\${app.license.name}; DestDir: {app}; DestName: ${app.license.name}
 Source: {#SourceBase}\${app.readme.name}; DestDir: {app}; DestName: ${app.readme.name}
 Source: {#SourceBase}\${app.icon.name}; DestDir: {app}; DestName: ${app.icon.name}
-; empty var directory structure
+; empty var & lib\ext directory structure
 Source: {#SourceBase}\var\*; DestDir: "{app}\var\"; Flags: ignoreversion recursesubdirs createallsubdirs
+Source: {#SourceBase}\lib\ext; DestDir: "{app}\lib"; Flags: ignoreversion recursesubdirs
createallsubdirs
 ; lib directory targets
 ${app.lib.jars}
 



Mime
View raw message