if (!(_currentRealm instanceof JDBCRealm)) {
String msg = sm.getString("jdbclm.badrealm");
throw new LoginException(msg);
}
final JDBCRealm jdbcRealm = (JDBCRealm)_currentRealm;
// A JDBC user must have a name not null and non-empty.
if ( (_username == null) || (_username.length() == 0) ) {
String msg = sm.getString("jdbclm.nulluser");
throw new LoginException(msg);
}
String[] grpList = jdbcRealm.authenticate(_username, getPasswordChar());
if (grpList == null) { // JAAS behavior
String msg = sm.getString("jdbclm.loginfail", _username);
throw new LoginException(msg);
}