}
private LoginContext login(String username, char[] password) throws Exception
{
String confName = System.getProperty("conf.name", "other");
AppCallbackHandler handler = new AppCallbackHandler(username, password);
log.debug("Creating LoginContext("+confName+")");
LoginContext lc = new LoginContext(confName, handler);
lc.login();
log.debug("Created LoginContext, subject="+lc.getSubject());
return lc;