Example usage for org.springframework.boot.autoconfigure.jndi TestableInitialContextFactory clearAll

List of usage examples for org.springframework.boot.autoconfigure.jndi TestableInitialContextFactory clearAll

Introduction

In this page you can find the example usage for org.springframework.boot.autoconfigure.jndi TestableInitialContextFactory clearAll.

Prototype

public static void clearAll() 

Source Link

Usage

From source file:org.springframework.boot.autoconfigure.jdbc.JndiDataSourceAutoConfigurationTests.java

@After
public void close() {
    TestableInitialContextFactory.clearAll();
    if (this.initialContextFactory != null) {
        System.setProperty(Context.INITIAL_CONTEXT_FACTORY, this.initialContextFactory);
    } else {/*from   www .j ava 2  s  .  co m*/
        System.clearProperty(Context.INITIAL_CONTEXT_FACTORY);
    }
    if (this.context != null) {
        this.context.close();
    }
    Thread.currentThread().setContextClassLoader(this.threadContextClassLoader);
}