directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1214101 - in /directory/apacheds/branches/apacheds-txns/server-config/src: main/java/org/apache/directory/server/config/ test/java/org/apache/directory/server/config/
Date Wed, 14 Dec 2011 08:15:49 GMT
Author: saya
Date: Wed Dec 14 08:15:48 2011
New Revision: 1214101

URL: http://svn.apache.org/viewvc?rev=1214101&view=rev
Log:
initialized logging and txn systems for tests to pass.

Modified:
    directory/apacheds/branches/apacheds-txns/server-config/src/main/java/org/apache/directory/server/config/ReadOnlyConfigurationPartition.java
    directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/ChangePasswordConfigReaderTest.java
    directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java
    directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/ConfigWriterTest.java
    directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/DhcpServerConfigReaderTest.java
    directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/DnsServerConfigReaderTest.java
    directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/HttpServerConfigReaderTest.java
    directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/KerberosServerConfigReaderTest.java
    directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/LdapServerConfigReaderTest.java
    directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/NtpServerConfigReaderTest.java

Modified: directory/apacheds/branches/apacheds-txns/server-config/src/main/java/org/apache/directory/server/config/ReadOnlyConfigurationPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/server-config/src/main/java/org/apache/directory/server/config/ReadOnlyConfigurationPartition.java?rev=1214101&r1=1214100&r2=1214101&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/server-config/src/main/java/org/apache/directory/server/config/ReadOnlyConfigurationPartition.java
(original)
+++ directory/apacheds/branches/apacheds-txns/server-config/src/main/java/org/apache/directory/server/config/ReadOnlyConfigurationPartition.java
Wed Dec 14 08:15:48 2011
@@ -32,6 +32,8 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.api.interceptor.context.MoveOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.RenameOperationContext;
 import org.apache.directory.server.core.partition.ldif.AbstractLdifPartition;
+import org.apache.directory.server.core.shared.partition.OperationExecutionManagerFactory;
+import org.apache.directory.server.core.shared.txn.TxnManagerFactory;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.model.entry.Entry;
@@ -62,9 +64,10 @@ public class ReadOnlyConfigurationPartit
      * @param schemaManager
      *      the schema manager
      */
-    public ReadOnlyConfigurationPartition( InputStream inputStream, SchemaManager schemaManager
)
+    public ReadOnlyConfigurationPartition( InputStream inputStream, SchemaManager schemaManager,

+        TxnManagerFactory txnManagerFactory, OperationExecutionManagerFactory executionManagerFactory)
     {
-        super( schemaManager );
+        super( schemaManager, txnManagerFactory, executionManagerFactory );
         this.inputStream = inputStream;
         id = "config";
 

Modified: directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/ChangePasswordConfigReaderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/ChangePasswordConfigReaderTest.java?rev=1214101&r1=1214100&r2=1214101&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/ChangePasswordConfigReaderTest.java
(original)
+++ directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/ChangePasswordConfigReaderTest.java
Wed Dec 14 08:15:48 2011
@@ -30,6 +30,8 @@ import org.apache.commons.io.FileUtils;
 import org.apache.directory.server.config.beans.ChangePasswordServerBean;
 import org.apache.directory.server.config.beans.ConfigBean;
 import org.apache.directory.server.core.partition.ldif.SingleFileLdifPartition;
+import org.apache.directory.server.core.shared.partition.OperationExecutionManagerFactory;
+import org.apache.directory.server.core.shared.txn.TxnManagerFactory;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
 import org.apache.directory.shared.ldap.model.schema.registries.SchemaLoader;
@@ -59,6 +61,12 @@ public class ChangePasswordConfigReaderT
     private static File workDir;
 
     private static SchemaManager schemaManager;
+    
+    private static File logDir;
+    
+    /** txn and operation execution manager factories */
+    private static TxnManagerFactory txnManagerFactory;
+    private static OperationExecutionManagerFactory executionManagerFactory;
 
 
     @BeforeClass
@@ -76,6 +84,11 @@ public class ChangePasswordConfigReaderT
         {
             FileUtils.deleteDirectory( schemaRepository );
         }
+        
+        logDir = new File( workingDirectory + File.separatorChar + "txnlog" + File.separatorChar
);
+        logDir.mkdirs();
+        txnManagerFactory = new TxnManagerFactory( logDir.getPath(), 1 << 13, 1 <<
14 );
+        executionManagerFactory = new OperationExecutionManagerFactory( txnManagerFactory
);
 
         SchemaLdifExtractor extractor = new DefaultSchemaLdifExtractor( new File( workingDirectory
) );
         extractor.extractOrCopy();
@@ -110,7 +123,7 @@ public class ChangePasswordConfigReaderT
         File configDir = new File( workDir, "changePasswordServer" ); // could be any directory,
cause the config is now in a single file
         String configFile = LdifConfigExtractor.extractSingleFileConfig( configDir, "changePasswordServer.ldif",
true );
 
-        SingleFileLdifPartition configPartition = new SingleFileLdifPartition( schemaManager
);
+        SingleFileLdifPartition configPartition = new SingleFileLdifPartition( schemaManager,
txnManagerFactory, executionManagerFactory );
         configPartition.setId( "config" );
         configPartition.setPartitionPath( new File( configFile ).toURI() );
         configPartition.setSuffixDn( new Dn( "ou=config" ) );

Modified: directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java?rev=1214101&r1=1214100&r2=1214101&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java
(original)
+++ directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java
Wed Dec 14 08:15:48 2011
@@ -30,6 +30,8 @@ import org.apache.commons.io.FileUtils;
 import org.apache.directory.server.config.beans.ConfigBean;
 import org.apache.directory.server.config.beans.DirectoryServiceBean;
 import org.apache.directory.server.core.partition.ldif.SingleFileLdifPartition;
+import org.apache.directory.server.core.shared.partition.OperationExecutionManagerFactory;
+import org.apache.directory.server.core.shared.txn.TxnManagerFactory;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
 import org.apache.directory.shared.ldap.model.schema.registries.SchemaLoader;
@@ -59,7 +61,10 @@ public class ConfigPartitionReaderTest
 
     private static File workDir = new File( System.getProperty( "java.io.tmpdir" ) + "/server-work"
);
 
-
+    /** txn and operation execution manager factories */
+    private static TxnManagerFactory txnManagerFactory;
+    private static OperationExecutionManagerFactory executionManagerFactory;
+    
     @BeforeClass
     public static void readConfig() throws Exception
     {
@@ -75,6 +80,11 @@ public class ConfigPartitionReaderTest
         {
             FileUtils.deleteDirectory( schemaRepository );
         }
+        
+        File logDir = new File( workingDirectory + File.separatorChar + "txnlog" + File.separatorChar
);
+        logDir.mkdirs();
+        txnManagerFactory = new TxnManagerFactory( logDir.getPath(), 1 << 13, 1 <<
14 );
+        executionManagerFactory = new OperationExecutionManagerFactory( txnManagerFactory
);
 
         SchemaLdifExtractor extractor = new DefaultSchemaLdifExtractor( new File( workingDirectory
) );
         extractor.extractOrCopy();
@@ -103,7 +113,7 @@ public class ConfigPartitionReaderTest
 
         String configFile = LdifConfigExtractor.extractSingleFileConfig( configDir, "config.ldif",
true );
 
-        SingleFileLdifPartition configPartition = new SingleFileLdifPartition( schemaManager
);
+        SingleFileLdifPartition configPartition = new SingleFileLdifPartition( schemaManager,
txnManagerFactory, executionManagerFactory );
         configPartition.setId( "config" );
         configPartition.setPartitionPath( new File( configFile ).toURI() );
         configPartition.setSuffixDn( new Dn( "ou=config" ) );

Modified: directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/ConfigWriterTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/ConfigWriterTest.java?rev=1214101&r1=1214100&r2=1214101&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/ConfigWriterTest.java
(original)
+++ directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/ConfigWriterTest.java
Wed Dec 14 08:15:48 2011
@@ -34,6 +34,8 @@ import java.util.List;
 import org.apache.commons.io.FileUtils;
 import org.apache.directory.server.config.beans.ConfigBean;
 import org.apache.directory.server.core.partition.ldif.SingleFileLdifPartition;
+import org.apache.directory.server.core.shared.partition.OperationExecutionManagerFactory;
+import org.apache.directory.server.core.shared.txn.TxnManagerFactory;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.ldif.LdifEntry;
 import org.apache.directory.shared.ldap.model.ldif.LdifReader;
@@ -66,7 +68,10 @@ public class ConfigWriterTest
 
     private static File workDir = new File( System.getProperty( "java.io.tmpdir" ) + "/server-work"
);
 
-
+    /** txn and operation execution manager factories */
+    private static TxnManagerFactory txnManagerFactory;
+    private static OperationExecutionManagerFactory executionManagerFactory;
+    
     @BeforeClass
     public static void readConfig() throws Exception
     {
@@ -81,6 +86,11 @@ public class ConfigWriterTest
         {
             FileUtils.deleteDirectory( schemaRepository );
         }
+        
+        File logDir = new File( workingDirectory + File.separatorChar + "txnlog" + File.separatorChar
);
+        logDir.mkdirs();
+        txnManagerFactory = new TxnManagerFactory( logDir.getPath(), 1 << 13, 1 <<
14 );
+        executionManagerFactory = new OperationExecutionManagerFactory( txnManagerFactory
);
 
         SchemaLdifExtractor extractor = new DefaultSchemaLdifExtractor( new File( workingDirectory
) );
         extractor.extractOrCopy();
@@ -110,7 +120,7 @@ public class ConfigWriterTest
         String configFile = LdifConfigExtractor.extractSingleFileConfig( configDir, "config.ldif",
true );
 
         // Creating of the config partition
-        SingleFileLdifPartition configPartition = new SingleFileLdifPartition( schemaManager
);
+        SingleFileLdifPartition configPartition = new SingleFileLdifPartition( schemaManager,
txnManagerFactory, executionManagerFactory );
         configPartition.setId( "config" );
         configPartition.setPartitionPath( new File( configFile ).toURI() );
         configPartition.setSuffixDn( new Dn( "ou=config" ) );

Modified: directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/DhcpServerConfigReaderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/DhcpServerConfigReaderTest.java?rev=1214101&r1=1214100&r2=1214101&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/DhcpServerConfigReaderTest.java
(original)
+++ directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/DhcpServerConfigReaderTest.java
Wed Dec 14 08:15:48 2011
@@ -30,6 +30,8 @@ import org.apache.commons.io.FileUtils;
 import org.apache.directory.server.config.beans.ConfigBean;
 import org.apache.directory.server.config.beans.DhcpServerBean;
 import org.apache.directory.server.core.partition.ldif.SingleFileLdifPartition;
+import org.apache.directory.server.core.shared.partition.OperationExecutionManagerFactory;
+import org.apache.directory.server.core.shared.txn.TxnManagerFactory;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
 import org.apache.directory.shared.ldap.model.schema.registries.SchemaLoader;
@@ -60,6 +62,9 @@ public class DhcpServerConfigReaderTest
 
     private static SchemaManager schemaManager;
 
+    /** txn and operation execution manager factories */
+    private static TxnManagerFactory txnManagerFactory;
+    private static OperationExecutionManagerFactory executionManagerFactory;
 
     @BeforeClass
     public static void readConfig() throws Exception
@@ -76,6 +81,11 @@ public class DhcpServerConfigReaderTest
         {
             FileUtils.deleteDirectory( schemaRepository );
         }
+        
+        File logDir = new File( workingDirectory + File.separatorChar + "txnlog" + File.separatorChar
);
+        logDir.mkdirs();
+        txnManagerFactory = new TxnManagerFactory( logDir.getPath(), 1 << 13, 1 <<
14 );
+        executionManagerFactory = new OperationExecutionManagerFactory( txnManagerFactory
);
 
         SchemaLdifExtractor extractor = new DefaultSchemaLdifExtractor( new File( workingDirectory
) );
         extractor.extractOrCopy();
@@ -103,7 +113,7 @@ public class DhcpServerConfigReaderTest
         File configDir = new File( workDir, "dhcpServer" ); // could be any directory, cause
the config is now in a single file
         String configFile = LdifConfigExtractor.extractSingleFileConfig( configDir, "dhcpServer.ldif",
true );
 
-        SingleFileLdifPartition configPartition = new SingleFileLdifPartition( schemaManager
);
+        SingleFileLdifPartition configPartition = new SingleFileLdifPartition( schemaManager,
txnManagerFactory, executionManagerFactory );
         configPartition.setId( "config" );
         configPartition.setPartitionPath( new File( configFile ).toURI() );
         configPartition.setSuffixDn( new Dn( "ou=config" ) );

Modified: directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/DnsServerConfigReaderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/DnsServerConfigReaderTest.java?rev=1214101&r1=1214100&r2=1214101&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/DnsServerConfigReaderTest.java
(original)
+++ directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/DnsServerConfigReaderTest.java
Wed Dec 14 08:15:48 2011
@@ -30,6 +30,8 @@ import org.apache.commons.io.FileUtils;
 import org.apache.directory.server.config.beans.ConfigBean;
 import org.apache.directory.server.config.beans.DnsServerBean;
 import org.apache.directory.server.core.partition.ldif.SingleFileLdifPartition;
+import org.apache.directory.server.core.shared.partition.OperationExecutionManagerFactory;
+import org.apache.directory.server.core.shared.txn.TxnManagerFactory;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
 import org.apache.directory.shared.ldap.model.schema.registries.SchemaLoader;
@@ -59,6 +61,9 @@ public class DnsServerConfigReaderTest
 
     private static File workDir = new File( System.getProperty( "java.io.tmpdir" ) + "/server-work"
);
 
+    /** txn and operation execution manager factories */
+    private static TxnManagerFactory txnManagerFactory;
+    private static OperationExecutionManagerFactory executionManagerFactory;
 
     @BeforeClass
     public static void readConfig() throws Exception
@@ -74,6 +79,11 @@ public class DnsServerConfigReaderTest
         {
             FileUtils.deleteDirectory( schemaRepository );
         }
+        
+        File logDir = new File( workingDirectory + File.separatorChar + "txnlog" + File.separatorChar
);
+        logDir.mkdirs();
+        txnManagerFactory = new TxnManagerFactory( logDir.getPath(), 1 << 13, 1 <<
14 );
+        executionManagerFactory = new OperationExecutionManagerFactory( txnManagerFactory
);
 
         SchemaLdifExtractor extractor = new DefaultSchemaLdifExtractor( new File( workingDirectory
) );
         extractor.extractOrCopy();
@@ -101,7 +111,7 @@ public class DnsServerConfigReaderTest
         File configDir = new File( workDir, "dnsServer" ); // could be any directory, cause
the config is now in a single file
         String configFile = LdifConfigExtractor.extractSingleFileConfig( configDir, "dnsServer.ldif",
true );
 
-        SingleFileLdifPartition configPartition = new SingleFileLdifPartition( schemaManager
);
+        SingleFileLdifPartition configPartition = new SingleFileLdifPartition( schemaManager,
txnManagerFactory, executionManagerFactory );
         configPartition.setId( "config" );
         configPartition.setPartitionPath( new File( configFile ).toURI() );
         configPartition.setSuffixDn( new Dn( "ou=config" ) );

Modified: directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/HttpServerConfigReaderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/HttpServerConfigReaderTest.java?rev=1214101&r1=1214100&r2=1214101&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/HttpServerConfigReaderTest.java
(original)
+++ directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/HttpServerConfigReaderTest.java
Wed Dec 14 08:15:48 2011
@@ -30,6 +30,8 @@ import org.apache.commons.io.FileUtils;
 import org.apache.directory.server.config.beans.ConfigBean;
 import org.apache.directory.server.config.beans.HttpServerBean;
 import org.apache.directory.server.core.partition.ldif.SingleFileLdifPartition;
+import org.apache.directory.server.core.shared.partition.OperationExecutionManagerFactory;
+import org.apache.directory.server.core.shared.txn.TxnManagerFactory;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
 import org.apache.directory.shared.ldap.model.schema.registries.SchemaLoader;
@@ -59,7 +61,11 @@ public class HttpServerConfigReaderTest
 
     private static File workDir = new File( System.getProperty( "java.io.tmpdir" ) + "/server-work"
);
 
-
+    /** txn and operation execution manager factories */
+    private static TxnManagerFactory txnManagerFactory;
+    private static OperationExecutionManagerFactory executionManagerFactory;
+    
+    
     @BeforeClass
     public static void readConfig() throws Exception
     {
@@ -74,6 +80,11 @@ public class HttpServerConfigReaderTest
         {
             FileUtils.deleteDirectory( schemaRepository );
         }
+        
+        File logDir = new File( workingDirectory + File.separatorChar + "txnlog" + File.separatorChar
);
+        logDir.mkdirs();
+        txnManagerFactory = new TxnManagerFactory( logDir.getPath(), 1 << 13, 1 <<
14 );
+        executionManagerFactory = new OperationExecutionManagerFactory( txnManagerFactory
);
 
         SchemaLdifExtractor extractor = new DefaultSchemaLdifExtractor( new File( workingDirectory
) );
         extractor.extractOrCopy();
@@ -101,7 +112,7 @@ public class HttpServerConfigReaderTest
         File configDir = new File( workDir, "httpServer" ); // could be any directory, cause
the config is now in a single file
         String configFile = LdifConfigExtractor.extractSingleFileConfig( configDir, "httpServer.ldif",
true );
 
-        SingleFileLdifPartition configPartition = new SingleFileLdifPartition( schemaManager
);
+        SingleFileLdifPartition configPartition = new SingleFileLdifPartition( schemaManager,
txnManagerFactory, executionManagerFactory );
         configPartition.setId( "config" );
         configPartition.setPartitionPath( new File( configFile ).toURI() );
         configPartition.setSuffixDn( new Dn( "ou=config" ) );

Modified: directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/KerberosServerConfigReaderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/KerberosServerConfigReaderTest.java?rev=1214101&r1=1214100&r2=1214101&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/KerberosServerConfigReaderTest.java
(original)
+++ directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/KerberosServerConfigReaderTest.java
Wed Dec 14 08:15:48 2011
@@ -30,6 +30,8 @@ import org.apache.commons.io.FileUtils;
 import org.apache.directory.server.config.beans.ConfigBean;
 import org.apache.directory.server.config.beans.KdcServerBean;
 import org.apache.directory.server.core.partition.ldif.SingleFileLdifPartition;
+import org.apache.directory.server.core.shared.partition.OperationExecutionManagerFactory;
+import org.apache.directory.server.core.shared.txn.TxnManagerFactory;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
 import org.apache.directory.shared.ldap.model.schema.registries.SchemaLoader;
@@ -59,6 +61,9 @@ public class KerberosServerConfigReaderT
 
     private static SchemaManager schemaManager;
 
+    /** txn and operation execution manager factories */
+    private static TxnManagerFactory txnManagerFactory;
+    private static OperationExecutionManagerFactory executionManagerFactory;
 
     @BeforeClass
     public static void readConfig() throws Exception
@@ -75,7 +80,11 @@ public class KerberosServerConfigReaderT
         {
             FileUtils.deleteDirectory( schemaRepository );
         }
-
+        
+        File logDir = new File( workingDirectory + File.separatorChar + "txnlog" + File.separatorChar
);
+        logDir.mkdirs();
+        txnManagerFactory = new TxnManagerFactory( logDir.getPath(), 1 << 13, 1 <<
14 );
+        executionManagerFactory = new OperationExecutionManagerFactory( txnManagerFactory
);
         SchemaLdifExtractor extractor = new DefaultSchemaLdifExtractor( new File( workingDirectory
) );
         extractor.extractOrCopy();
 
@@ -102,7 +111,7 @@ public class KerberosServerConfigReaderT
         File configDir = new File( workDir, "kerberosServer" ); // could be any directory,
cause the config is now in a single file
         String configFile = LdifConfigExtractor.extractSingleFileConfig( configDir, "kerberosServer.ldif",
true );
 
-        SingleFileLdifPartition configPartition = new SingleFileLdifPartition( schemaManager
);
+        SingleFileLdifPartition configPartition = new SingleFileLdifPartition( schemaManager,
txnManagerFactory, executionManagerFactory );
         configPartition.setId( "config" );
         configPartition.setPartitionPath( new File( configFile ).toURI() );
         configPartition.setSuffixDn( new Dn( "ou=config" ) );

Modified: directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/LdapServerConfigReaderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/LdapServerConfigReaderTest.java?rev=1214101&r1=1214100&r2=1214101&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/LdapServerConfigReaderTest.java
(original)
+++ directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/LdapServerConfigReaderTest.java
Wed Dec 14 08:15:48 2011
@@ -30,6 +30,8 @@ import org.apache.commons.io.FileUtils;
 import org.apache.directory.server.config.beans.ConfigBean;
 import org.apache.directory.server.config.beans.LdapServerBean;
 import org.apache.directory.server.core.partition.ldif.SingleFileLdifPartition;
+import org.apache.directory.server.core.shared.partition.OperationExecutionManagerFactory;
+import org.apache.directory.server.core.shared.txn.TxnManagerFactory;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
 import org.apache.directory.shared.ldap.model.schema.registries.SchemaLoader;
@@ -59,6 +61,9 @@ public class LdapServerConfigReaderTest
 
     private static SchemaManager schemaManager;
 
+    /** txn and operation execution manager factories */
+    private static TxnManagerFactory txnManagerFactory;
+    private static OperationExecutionManagerFactory executionManagerFactory;
 
     @BeforeClass
     public static void readConfig() throws Exception
@@ -76,6 +81,11 @@ public class LdapServerConfigReaderTest
             FileUtils.deleteDirectory( schemaRepository );
         }
 
+        File logDir = new File( workingDirectory + File.separatorChar + "txnlog" + File.separatorChar
);
+        logDir.mkdirs();
+        txnManagerFactory = new TxnManagerFactory( logDir.getPath(), 1 << 13, 1 <<
14 );
+        executionManagerFactory = new OperationExecutionManagerFactory( txnManagerFactory
);
+        
         SchemaLdifExtractor extractor = new DefaultSchemaLdifExtractor( new File( workingDirectory
) );
         extractor.extractOrCopy();
 
@@ -102,7 +112,7 @@ public class LdapServerConfigReaderTest
         File configDir = new File( workDir, "ldapServer" ); // could be any directory, cause
the config is now in a single file
         String configFile = LdifConfigExtractor.extractSingleFileConfig( configDir, "ldapServer.ldif",
true );
 
-        SingleFileLdifPartition configPartition = new SingleFileLdifPartition( schemaManager
);
+        SingleFileLdifPartition configPartition = new SingleFileLdifPartition( schemaManager,
txnManagerFactory, executionManagerFactory );
         configPartition.setId( "config" );
         configPartition.setPartitionPath( new File( configFile ).toURI() );
         configPartition.setSuffixDn( new Dn( "ou=config" ) );

Modified: directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/NtpServerConfigReaderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/NtpServerConfigReaderTest.java?rev=1214101&r1=1214100&r2=1214101&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/NtpServerConfigReaderTest.java
(original)
+++ directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/NtpServerConfigReaderTest.java
Wed Dec 14 08:15:48 2011
@@ -30,6 +30,8 @@ import org.apache.commons.io.FileUtils;
 import org.apache.directory.server.config.beans.ConfigBean;
 import org.apache.directory.server.config.beans.NtpServerBean;
 import org.apache.directory.server.core.partition.ldif.SingleFileLdifPartition;
+import org.apache.directory.server.core.shared.partition.OperationExecutionManagerFactory;
+import org.apache.directory.server.core.shared.txn.TxnManagerFactory;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
 import org.apache.directory.shared.ldap.model.schema.registries.SchemaLoader;
@@ -59,6 +61,9 @@ public class NtpServerConfigReaderTest
 
     private static File workDir = new File( System.getProperty( "java.io.tmpdir" ) + "/server-work"
);
 
+    /** txn and operation execution manager factories */
+    private static TxnManagerFactory txnManagerFactory;
+    private static OperationExecutionManagerFactory executionManagerFactory;
 
     @BeforeClass
     public static void readConfig() throws Exception
@@ -74,6 +79,11 @@ public class NtpServerConfigReaderTest
         {
             FileUtils.deleteDirectory( schemaRepository );
         }
+        
+        File logDir = new File( workingDirectory + File.separatorChar + "txnlog" + File.separatorChar
);
+        logDir.mkdirs();
+        txnManagerFactory = new TxnManagerFactory( logDir.getPath(), 1 << 13, 1 <<
14 );
+        executionManagerFactory = new OperationExecutionManagerFactory( txnManagerFactory
);
 
         SchemaLdifExtractor extractor = new DefaultSchemaLdifExtractor( new File( workingDirectory
) );
         extractor.extractOrCopy();
@@ -101,7 +111,7 @@ public class NtpServerConfigReaderTest
         File configDir = new File( workDir, "ntpServer" ); // could be any directory, cause
the config is now in a single file
         String configFile = LdifConfigExtractor.extractSingleFileConfig( configDir, "ntpServer.ldif",
true );
 
-        SingleFileLdifPartition configPartition = new SingleFileLdifPartition( schemaManager
);
+        SingleFileLdifPartition configPartition = new SingleFileLdifPartition( schemaManager,
txnManagerFactory, executionManagerFactory );
         configPartition.setId( "config" );
         configPartition.setPartitionPath( new File( configFile ).toURI() );
         configPartition.setSuffixDn( new Dn( "ou=config" ) );



Mime
View raw message