You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Ole Ersoy (JIRA)" <ji...@apache.org> on 2007/07/26 23:00:06 UTC

[jira] Reopened: (DIRSERVER-1010) Should the order in which hot partitions are connected to matter?

     [ https://issues.apache.org/jira/browse/DIRSERVER-1010?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ole Ersoy reopened DIRSERVER-1010:
----------------------------------


OK - To see the behavior, just create an instance of the testing archetype.   In there will be the following test:

public class ADSEmbeddedHotPartitionTemplateTest 
extends ADSEmbeddedHotPartitionTemplate  
{
    public void tearDown() throws NamingException, Exception
    {
        super.tearDown();
    }
    
    public void setUp() throws Exception
    {
        super.setUp();
    }
    
    public void testSchemaConnect() throws NamingException
    {
    	LdapContext ldapContext =
    		null;
    	
	    ldapContext                       =
	    	connect("test");
	    
	    assertEquals(
	    		"ou=test", 
	    		ldapContext.getNameInNamespace()); 
    }
}

Change it to look like this:

public class ADSEmbeddedHotPartitionTemplateTest 
extends ADSEmbeddedHotPartitionTemplate  
{
    public void tearDown() throws NamingException, Exception
    {
        super.tearDown();
    }
    
    public void setUp() throws Exception
    {
        super.setUp();
    }
    
    public void testSchemaConnect() throws NamingException
    {
    	LdapContext ldapContext =
    		null;

        ldapContext                       =
            connect("schema");

	    ldapContext                       =
	    	connect("test");
	    
	    assertEquals(
	    		"ou=test", 
	    		ldapContext.getNameInNamespace()); 
    }
}

Now the exception will be thrown.  Note that the server-work directory should not exist prior to running the test.  


> Should the order in which hot partitions are connected to matter?
> -----------------------------------------------------------------
>
>                 Key: DIRSERVER-1010
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1010
>             Project: Directory ApacheDS
>          Issue Type: Bug
>            Reporter: Ole Ersoy
>
> If I connect in this order:
>         dasContext = 
>             adsEmbeddedConnection.
>             connect( 
>                 configuration.getDasPartitionName() );
>         schemaContext = 
>             adsEmbeddedConnection.
>             connect( 
>                 configuration.getSchemaPartitionName() );
> I don't get any exceptions.
> If I flip the two, I get this exception:
> org.apache.directory.shared.ldap.exception.LdapNameNotFoundException: ou=das
> 	at org.apache.directory.server.core.partition.DefaultPartitionNexus.getBackend(DefaultPartitionNexus.java:1064)
> 	at org.apache.directory.server.core.partition.DefaultPartitionNexus.hasEntry(DefaultPartitionNexus.java:988)
> 	at org.apache.directory.server.core.interceptor.InterceptorChain$1.hasEntry(InterceptorChain.java:147)
> 	at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.hasEntry(InterceptorChain.java:1246)
> 	at org.apache.directory.server.core.interceptor.BaseInterceptor.hasEntry(BaseInterceptor.java:130)
> 	at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.hasEntry(InterceptorChain.java:1246)
> 	at org.apache.directory.server.core.interceptor.BaseInterceptor.hasEntry(BaseInterceptor.java:130)
> .....
> I'll check in the working DAS in a few days and in the package:
> package org.apache.tuscany.das.ldap.emf.test;
> There is a test called LdapDASHelperTest that can be run to see this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.