Package org.apache.ldap.server.configuration

Examples of org.apache.ldap.server.configuration.ShutdownConfiguration


    public void doStop() throws Exception {
        log.debug("Stopping LDAP Directory service");
        //Insert stopping code here
        Properties env = new Properties();
        env.putAll(new ShutdownConfiguration().toJndiEnvironment());
        env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );
        setEnvironment(env);
       
        //Load the proper class for th Context Loader
        ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
View Full Code Here


    public void doStop() throws Exception {
        log.info("Stopping LDAP Directory service");
        //Insert stopping code here
        Properties env = new Properties();
        env.putAll(new ShutdownConfiguration().toJndiEnvironment());
        env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );
        setEnvironment(env);
       
        //Load the proper class for th Context Loader
        ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    public void tearDown() throws Exception {
        Properties env = new Properties();
        env.putAll(new ShutdownConfiguration().toJndiEnvironment());
        env.put(Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName());
        env.put(Context.PROVIDER_URL, "ou=system");
        env.put(Context.SECURITY_AUTHENTICATION, "simple");
        env.put(Context.SECURITY_PRINCIPAL, PRINCIPAL);
        env.put(Context.SECURITY_CREDENTIALS, CREDENTIALS);
View Full Code Here

        new InitialDirContext(env);
    }

    public void tearDown() throws Exception {
        Properties env = new Properties();
        env.putAll(new ShutdownConfiguration().toJndiEnvironment());
        env.put(Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName());
        env.put(Context.PROVIDER_URL, "ou=system");
        env.put(Context.SECURITY_AUTHENTICATION, "simple");
        env.put(Context.SECURITY_PRINCIPAL, PRINCIPAL);
        env.put(Context.SECURITY_CREDENTIALS, CREDENTIALS);
View Full Code Here

    public void doStop() throws Exception {
        log.debug("Stopping LDAP Directory service");
        //Insert stopping code here
        Properties env = new Properties();
        env.putAll(new ShutdownConfiguration().toJndiEnvironment());
        env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );
        setEnvironment(env);
       
        //Load the proper class for th Context Loader
        ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
View Full Code Here

    public void doStop() throws Exception {
        log.debug("Stopping LDAP Directory service");
        //Insert stopping code here
        Properties env = new Properties();
        env.putAll(new ShutdownConfiguration().toJndiEnvironment());
        env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );
        setEnvironment(env);
       
        //Load the proper class for th Context Loader
        ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
View Full Code Here

    public void doStop() throws Exception {
        log.debug("Stopping LDAP Directory service");
        //Insert stopping code here
        Properties env = new Properties();
        env.putAll(new ShutdownConfiguration().toJndiEnvironment());
        env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );
        setEnvironment(env);
       
        //Load the proper class for th Context Loader
        ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
View Full Code Here

        env.put( Context.PROVIDER_URL, "ou=system" );

        env.put( Context.INITIAL_CONTEXT_FACTORY, "org.apache.ldap.server.jndi.CoreContextFactory" );

        env.putAll( new ShutdownConfiguration().toJndiEnvironment() );

        env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );

        env.put( Context.SECURITY_CREDENTIALS, "secret" );
View Full Code Here

     *
     * @throws Exception if the test fails by generating a null context
     */
    public void testShutdownNonNullContext() throws Exception
    {
        setSysRoot( "uid=admin,ou=system", "secret", new ShutdownConfiguration() );
        assertNotNull( sysRoot );
    }
View Full Code Here

     *
     * @throws Exception
     */
    public void testShutdownRestart() throws Exception
    {
        setSysRoot( "uid=admin,ou=system", "secret", new ShutdownConfiguration() );
        assertNotNull( sysRoot );

        // restart the system now
        setSysRoot( "uid=admin,ou=system", "secret", configuration );
       
        // Shutdown again (tearDown is overriden)
        setSysRoot( "uid=admin,ou=system", "secret", new ShutdownConfiguration() );
    }
View Full Code Here

TOP

Related Classes of org.apache.ldap.server.configuration.ShutdownConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.