This base implementation uses on demand binding to directory context for providing connections to mappers. Subclasses may override this behavior by providing their own implementations of {@link #connect()} and{@link #close(DirContext)}: The former provides DirContext instance for use by the mapper while the latter releases this instance when it is released by the mapper.
Methods {@link #create(String,Map)} and {@link #release(Mapper)} aresynchronized to provide minimal thread isolation. Please note howerver that {@link speculoos.core.Mapper} instances are not supposed to be thread safe soit is up to the client to ensure proper concurrency management.
Method {@link #add(String,JNDIMapper)} associates a symbolic name to aMapper instance. This instance will then be used as Prototype object when JNDISource will be asked for creating a Mapper through method {@link #create(String,Map)}: Base object is cloned
and initialized with a connection before being returned to the client. The method {@link #release(Mapper)} must be invoked at some later point in order forthis source to release associated resources.
Environment management is provided through the method {@link #addParameters(Map)} which allows incremental configuration of theenvironment this source operates in.
@author nono @version $Id: JNDISource.java 76 2005-10-26 14:12:23 +0200 (Wed, 26 Oct 2005)/C=FR/ST=Nord/L=Lille/O=Norsys SA/OU=UE/CN=Arnaud Bailly/emailAddress=abailly@norsys.fr $
|
|