src/share/classes/javax/naming/InitialContext.java

Print this page
rev 10175 : 8047721: @since should have JDK version
Reviewed-by:


 108  * involved might throw an exception if a problem is encountered. However,
 109  * it is provider implementation-dependent when it verifies and indicates
 110  * to the users of the initial context any environment property- or
 111  * connection- related problems. It can do so lazily--delaying until
 112  * an operation is performed on the context, or eagerly, at the time
 113  * the context is constructed.
 114  *<p>
 115  * An InitialContext instance is not synchronized against concurrent
 116  * access by multiple threads. Multiple threads each manipulating a
 117  * different InitialContext instance need not synchronize.
 118  * Threads that need to access a single InitialContext instance
 119  * concurrently should synchronize amongst themselves and provide the
 120  * necessary locking.
 121  *
 122  * @author Rosanna Lee
 123  * @author Scott Seligman
 124  *
 125  * @see Context
 126  * @see NamingManager#setInitialContextFactoryBuilder
 127  *      NamingManager.setInitialContextFactoryBuilder
 128  * @since JNDI 1.1 / Java 2 Platform, Standard Edition, v 1.3
 129  */
 130 
 131 public class InitialContext implements Context {
 132 
 133     /**
 134      * The environment associated with this InitialContext.
 135      * It is initialized to null and is updated by the constructor
 136      * that accepts an environment or by the <tt>init()</tt> method.
 137      * @see #addToEnvironment
 138      * @see #removeFromEnvironment
 139      * @see #getEnvironment
 140      */
 141     protected Hashtable<Object,Object> myProps = null;
 142 
 143     /**
 144      * Field holding the result of calling NamingManager.getInitialContext().
 145      * It is set by getDefaultInitCtx() the first time getDefaultInitCtx()
 146      * is called. Subsequent invocations of getDefaultInitCtx() return
 147      * the value of defaultInitCtx.
 148      * @see #getDefaultInitCtx




 108  * involved might throw an exception if a problem is encountered. However,
 109  * it is provider implementation-dependent when it verifies and indicates
 110  * to the users of the initial context any environment property- or
 111  * connection- related problems. It can do so lazily--delaying until
 112  * an operation is performed on the context, or eagerly, at the time
 113  * the context is constructed.
 114  *<p>
 115  * An InitialContext instance is not synchronized against concurrent
 116  * access by multiple threads. Multiple threads each manipulating a
 117  * different InitialContext instance need not synchronize.
 118  * Threads that need to access a single InitialContext instance
 119  * concurrently should synchronize amongst themselves and provide the
 120  * necessary locking.
 121  *
 122  * @author Rosanna Lee
 123  * @author Scott Seligman
 124  *
 125  * @see Context
 126  * @see NamingManager#setInitialContextFactoryBuilder
 127  *      NamingManager.setInitialContextFactoryBuilder
 128  * @since 1.3, JNDI 1.1
 129  */
 130 
 131 public class InitialContext implements Context {
 132 
 133     /**
 134      * The environment associated with this InitialContext.
 135      * It is initialized to null and is updated by the constructor
 136      * that accepts an environment or by the <tt>init()</tt> method.
 137      * @see #addToEnvironment
 138      * @see #removeFromEnvironment
 139      * @see #getEnvironment
 140      */
 141     protected Hashtable<Object,Object> myProps = null;
 142 
 143     /**
 144      * Field holding the result of calling NamingManager.getInitialContext().
 145      * It is set by getDefaultInitCtx() the first time getDefaultInitCtx()
 146      * is called. Subsequent invocations of getDefaultInitCtx() return
 147      * the value of defaultInitCtx.
 148      * @see #getDefaultInitCtx