code: private DirContext initContext(String userDN, char password[])
  	throws NamingException
  	{
  		Hashtable<String,Object> env = new Hashtable<String,Object>();
  		
  		
  		setupBasicProperties(env);
  		setupSimpleSecurityProperties(env, userDN, password);
  
  		return new InitialDirContext(env);
  	}
docs: -----------------------------------------------