code style improvements.
[utils] / test / enterprise / src / main / java / org / wamblee / support / jndi / StubInitialContextFactory.java
index 8a9409d065c438b1e70f24e3277d23a57be4177d..158bd6d8b8d8048ff8928e6c844681c0e6fac262 100644 (file)
  */ 
 package org.wamblee.support.jndi;
 
-import java.util.HashMap;
 import java.util.Hashtable;
-import java.util.Map;
 
 import javax.naming.Context;
-import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import javax.naming.spi.InitialContextFactory;
 
@@ -30,11 +27,17 @@ import javax.naming.spi.InitialContextFactory;
  * 
  * See {@link #bind(String, Object)} to resp. register the initial context.
  * 
- * To bind objects in the JNDI tree simply use the standard JNDI api: <code>
+ * To start mocking the JNDI tree, call {@link #register()}. 
+ * 
+ * To bind objects in the JNDI tree simply use the standard JNDI api: 
+ * <pre>
  *   InitialContext context = new InitialContext();
  *   MyClass myObj = ...; 
  *   context.bind("a/b", myObj); 
- * </code>
+ * </pre>
+ * 
+ * When finished with a test case, call {@link #unregister()} to unregister the 
+ * JNDI tree again. 
  */
 public class StubInitialContextFactory implements InitialContextFactory {