Attributes attributes = new LockableAttributesImpl(); LdapName target = buildTarget( name ); String rdn = name.get( name.size() - 1 ); String rdnAttribute = NamespaceTools.getRdnAttribute( rdn ); String rdnValue = NamespaceTools.getRdnValue( rdn );   attributes.put( rdnAttribute, rdnValue ); attributes.put( JavaLdapSupport.OBJECTCLASS_ATTR, JavaLdapSupport.JCONTAINER_ATTR ); attributes.put( JavaLdapSupport.OBJECTCLASS_ATTR, JavaLdapSupport.TOP_ATTR );   nexusProxy.add( target.toString(), target, attributes );  EveLdapContext ctx = new EveLdapContext( principal, nexusProxy, env, target ); Control [] controls = ( Control [] ) ( ( EveLdapContext ) this ).getRequestControls().clone(); ctx.setRequestControls( controls ); return ctx;
return createSubcontext( new LdapName( name ) );
    public Context createSubcontext( Name name ) throws NamingException    {        /*          * Start building the server side attributes to be added directly to         * the backend.         *          * The RDN from name can be a multivalued RDN based on more than one         * attribute using the '+' AVA concatenator in a name component.  Right         * now this code will bomb out because we presume single valued RDNs.         *          * TODO Add multivalued RDN handling code          */        Attributes attributes = new LockableAttributesImpl();        LdapName target = buildTarget( name );        String rdn = name.get( name.size() - 1 );        String rdnAttribute = NamespaceTools.getRdnAttribute( rdn );        String rdnValue = NamespaceTools.getRdnValue( rdn );        /*          * TODO Add code within the interceptor service managing operational         * attributes the ability to add the target user provided DN to the          * attributes before normalization.  The result should have ths same         * affect as the following line within the interceptor.         *          * attributes.put( BootstrapSchema.DN_ATTR, target.toString() );         */        attributes.put( rdnAttribute, rdnValue );        attributes.put( JavaLdapSupport.OBJECTCLASS_ATTR, JavaLdapSupport.JCONTAINER_ATTR );        attributes.put( JavaLdapSupport.OBJECTCLASS_ATTR, JavaLdapSupport.TOP_ATTR );                /*         * Add the new context to the server which as a side effect adds          * operational attributes to the attributes refering instance which         * can them be used to initialize a new EveLdapContext.  Remember         * we need to copy over the controls as well to propagate the complete          * environment besides whats in the hashtable for env.         */        nexusProxy.add( target.toString(), target, attributes );                EveLdapContext ctx = new EveLdapContext( principal, nexusProxy, env, target );        Control [] controls = ( Control [] ) ( ( EveLdapContext ) this ).getRequestControls().clone();        ctx.setRequestControls( controls );        return ctx;    }