code: private static void setupSimpleSecurityProperties(Hashtable<String,Object> env,
  			String userDn, char[] pwd)
  	{
  		// 'simple' = username + password
  		env.put(Context.SECURITY_AUTHENTICATION, "simple");
  
  		// add the full user dn
  		env.put(Context.SECURITY_PRINCIPAL, userDn);
  
  		// set password
  		env.put(Context.SECURITY_CREDENTIALS, new String(pwd));
  	}
docs: Sets the environment properties needed for a simple username + password
  authenticated jndi connection.
  
  @param env
  The LDAP security environment
  @param userDn
  The user distinguished name
  @param pwd
  The user password