directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r899224 - in /directory/apacheds/branches/apacheds-cidit: core/src/main/java/org/apache/directory/server/core/journal/DefaultJournal.java default-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java
Date Thu, 14 Jan 2010 14:45:08 GMT
Author: kayyagari
Date: Thu Jan 14 14:45:07 2010
New Revision: 899224

URL: http://svn.apache.org/viewvc?rev=899224&view=rev
Log:
o fixed the setters and the init method in defaultjournal
o uncommented the code which sets some properties of journal's store

Modified:
    directory/apacheds/branches/apacheds-cidit/core/src/main/java/org/apache/directory/server/core/journal/DefaultJournal.java
    directory/apacheds/branches/apacheds-cidit/default-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java

Modified: directory/apacheds/branches/apacheds-cidit/core/src/main/java/org/apache/directory/server/core/journal/DefaultJournal.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-cidit/core/src/main/java/org/apache/directory/server/core/journal/DefaultJournal.java?rev=899224&r1=899223&r2=899224&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-cidit/core/src/main/java/org/apache/directory/server/core/journal/DefaultJournal.java
(original)
+++ directory/apacheds/branches/apacheds-cidit/core/src/main/java/org/apache/directory/server/core/journal/DefaultJournal.java
Thu Jan 14 14:45:07 2010
@@ -81,7 +81,11 @@
     {
         LOG.debug( "Starting the journal" );
 
-        store = new DefaultJournalStore();
+        if( store == null )
+        {
+            store = new DefaultJournalStore();
+        }
+
         store.init( directoryService );
 
         LOG.debug( "The Journal service has been initialized" );
@@ -144,12 +148,12 @@
     
     public void setEnabled( boolean enabled )
     {
-        // TODO Auto-generated method stub
+        this.enabled = enabled; 
     }
 
 
     public void setJournalStore( JournalStore store )
     {
-        // TODO Auto-generated method stub
+        this.store = store;
     }
 }

Modified: directory/apacheds/branches/apacheds-cidit/default-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-cidit/default-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java?rev=899224&r1=899223&r2=899224&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-cidit/default-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java
(original)
+++ directory/apacheds/branches/apacheds-cidit/default-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java
Thu Jan 14 14:45:07 2010
@@ -40,7 +40,9 @@
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.interceptor.Interceptor;
 import org.apache.directory.server.core.journal.DefaultJournal;
+import org.apache.directory.server.core.journal.DefaultJournalStore;
 import org.apache.directory.server.core.journal.Journal;
+import org.apache.directory.server.core.journal.JournalStore;
 import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
@@ -562,14 +564,14 @@
         Entry jlEntry = configPartition.lookup( id );
 
         Journal journal = new DefaultJournal();
-        //FIXME the setFileName is part of the JournalStore API
-        // but there is currently no way to set the JournalStore in Journal
-        //jl.setFileName( getString( "ads-journalFileName", jlEntry ) );
+        JournalStore store = new DefaultJournalStore();
+        
+        store.setFileName( getString( "ads-journalFileName", jlEntry ) );
         
         EntryAttribute jlWorkDirAttr = jlEntry.get( "ads-journalWorkingDir" );
         if( jlWorkDirAttr != null )
         {
-            //jl.setWorkDir( jlWorkDirAttr.getString() );
+            store.setWorkingDirectory( jlWorkDirAttr.getString() );
         }
         
         EntryAttribute jlRotAttr = jlEntry.get( "ads-journalRotation" );
@@ -584,6 +586,7 @@
             journal.setEnabled( Boolean.parseBoolean( jlEnabledAttr.getString() ) );
         }
         
+        journal.setJournalStore( store );
         return journal;
     }
     



Mime
View raw message