nexus.add( ( String ) dn.get(), new LdapName( ( String ) dn.get() ), attributes );
AttributeTypeRegistry registry = globalRegistries.getAttributeTypeRegistry();  NameComponentNormalizer ncn = new ConcreteNameComponentNormalizer( registry );  DnParser parser = new DnParser( ncn );  Name ndn = parser.parse( ( String ) dn.get() );  nexus.add( ( String ) dn.get(), ndn, attributes );
    public Context getInitialContext( Hashtable env ) throws NamingException    {        env = ( Hashtable ) env.clone();        Context ctx = null;        if ( env.containsKey( EnvKeys.SHUTDOWN ) )        {            if ( this.provider == null )            {                return new DeadContext();            }            try            {                this.provider.shutdown();            }            catch ( Throwable t )            {                t.printStackTrace();            }            finally            {                ctx = new DeadContext();                provider = null;                initialEnv = null;            }            return ctx;        }        if ( env.containsKey( EnvKeys.SYNC ) )        {            provider.sync();            return provider.getLdapContext( env );        }        checkSecuritySettings( env );        if ( isAnonymous( env ) )        {            env.put( PRINCIPAL, "" );        }        // fire up the backend subsystem if we need to        if ( null == provider )        {            // we need to check this here instead of in AuthenticationService            // because otherwise we are going to start up the system incorrectly            if ( isAnonymous( env ) && env.containsKey( EnvKeys.DISABLE_ANONYMOUS ) )            {                throw new LdapNoPermissionException( "cannot bind as anonymous "                        + "on startup while disabling anonymous binds w/ property: "                        + EnvKeys.DISABLE_ANONYMOUS );            }            this.initialEnv = env;            initialize();            createMode = createBootstrapEntries();            /*             * Unfortunately to test non-root user startup of the core and make sure             * all the appropriate functionality is there we need to load more user             * entries at startup due to a chicken and egg like problem.  The value             * of this property is a list of attributes to be added.             */            if ( createMode && env.containsKey( EnvKeys.TEST_ENTRIES ) )            {                ArrayList list = ( ArrayList ) initialEnv.get( EnvKeys.TEST_ENTRIES );                if ( list != null )                {                    for ( int ii = 0; ii < list.size(); ii++ )                    {                        Attributes attributes = ( Attributes ) list.get( ii );                        attributes.put( "creatorsName", ADMIN );                        attributes.put( "createTimestamp", DateUtils.getGeneralizedTime() );                        Attribute dn = attributes.remove( "dn" );                        nexus.add( ( String ) dn.get(), new LdapName( ( String ) dn.get() ), attributes );                    }                }            }        }        ctx = ( ServerContext ) provider.getLdapContext( env );        return ctx;    }