spring-framework / org.springframework.mock.jndi

Package org.springframework.mock.jndi

Types

ExpectedLookupTemplate

open class ExpectedLookupTemplate : JndiTemplate

Simple extension of the JndiTemplate class that always returns a given object.

Very useful for testing. Effectively a mock object.

SimpleNamingContext

open class SimpleNamingContext : Context

Simple implementation of a JNDI naming context. Only supports binding plain Objects to String names. Mainly for test environments, but also usable for standalone applications.

This class is not intended for direct usage by applications, although it can be used for example to override JndiTemplate's createInitialContext method in unit tests. Typically, SimpleNamingContextBuilder will be used to set up a JVM-level JNDI environment.