directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r770591 - in /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core: DefaultDirectoryService.java journal/DefaultJournal.java journal/DefaultJournalStore.java
Date Fri, 01 May 2009 09:05:10 GMT
Author: elecharny
Date: Fri May  1 09:05:09 2009
New Revision: 770591

URL: http://svn.apache.org/viewvc?rev=770591&view=rev
Log:
o Called the journal destroy method (this was missing)
o Added some javadoc and some comments

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/DefaultJournal.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/DefaultJournalStore.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?rev=770591&r1=770590&r2=770591&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
Fri May  1 09:05:09 2009
@@ -931,18 +931,26 @@
             return;
         }
 
+        // --------------------------------------------------------------------
         // Shutdown the changelog
+        // --------------------------------------------------------------------
         changeLog.sync();
         changeLog.destroy();
         
+        // --------------------------------------------------------------------
         // Shutdown the journal
+        // --------------------------------------------------------------------
         journal.destroy();
 
+        // --------------------------------------------------------------------
         // Shutdown the partition
+        // --------------------------------------------------------------------
         partitionNexus.sync();
         partitionNexus.destroy();
         
+        // --------------------------------------------------------------------
         // And shutdown the server
+        // --------------------------------------------------------------------
         interceptorChain.destroy();
         started = false;
         setDefaultInterceptorConfigurations();
@@ -1362,6 +1370,7 @@
 
         File schemaDirectory = new File( workingDirectory, "schema" );
         SchemaPartitionExtractor extractor;
+        
         if ( ! schemaDirectory.exists() )
         {
             try
@@ -1483,13 +1492,17 @@
         partitionNexus.init( this );
         partitionNexus.addContextPartition( new AddContextPartitionOperationContext( adminSession,
schemaPartition ) );
 
+        // --------------------------------------------------------------------
         // Create all the bootstrap entries before initializing chain
+        // --------------------------------------------------------------------
         firstStart = createBootstrapEntries();
 
         interceptorChain = new InterceptorChain();
         interceptorChain.init( this );
 
+        // --------------------------------------------------------------------
         // Initialize the changeLog if it's enabled
+        // --------------------------------------------------------------------
         if ( changeLog.isEnabled() )
         {
             changeLog.init( this );
@@ -1501,8 +1514,10 @@
             }
         }
         
+        // --------------------------------------------------------------------
         // Initialize the journal if it's enabled
-        //if ( journal.isEnabled() )
+        // --------------------------------------------------------------------
+        if ( journal.isEnabled() )
         {
             journal.init( this );
         }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/DefaultJournal.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/DefaultJournal.java?rev=770591&r1=770590&r2=770591&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/DefaultJournal.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/DefaultJournal.java
Fri May  1 09:05:09 2009
@@ -50,6 +50,10 @@
     public void destroy() throws Exception
     {
         LOG.debug( "Stopping the journal" );
+        
+        // We have to release the file, otherwise Windows won't be able
+        // to stop the server
+        store.destroy();
     }
 
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/DefaultJournalStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/DefaultJournalStore.java?rev=770591&r1=770590&r2=770591&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/DefaultJournalStore.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/DefaultJournalStore.java
Fri May  1 09:05:09 2009
@@ -57,13 +57,15 @@
     private Writer writer;
 
     
+    /**
+     * {@inheritDoc}
+     */
     public void destroy() throws Exception
     {
         if ( writer != null )
         {
             writer.close();
         }
-        
     }
     
     



Mime
View raw message