}
@Override
public boolean authenticate( final Credential credential,
final SecurityContext securityContext ) {
final UsernamePasswordCredential usernamePasswd = checkInstanceOf( "credential", credential, UsernamePasswordCredential.class );
Connection connection = null;
try {
connection = getConnection();
final PreparedStatement statement = connection.prepareStatement( userQuery );
statement.setString( 1, usernamePasswd.getUserName() );
statement.setObject( 2, usernamePasswd.getPassword() );
final ResultSet queryResult = statement.executeQuery();
final boolean result;
if ( queryResult.next() ) {
result = true;
} else {