ResultSet rs = pstmt.executeQuery();
if(rs.next()){
pstmt = con.prepareStatement(UPDATE_BLACK_LIST_IP);
pstmt.setString(1,clientIP.getRemoteIP());
pstmt.executeUpdate();
throw new UserBlackListedException("User Black Listed Error. The IP address "+clientIP.getRemoteIP()+" has been black listed");
}
pstmt = con.prepareStatement(CHECK_BLACK_LIST_USER);
pstmt.setInt(1,user.getID());
pstmt.setString(2,"BLOCKED");
pstmt.setString(3,"true");
rs = pstmt.executeQuery();
if(rs.next()){
throw new UserBlackListedException("User Black Listed Error. This user has been black listed from the sytem");
}
}
catch( SQLException sqle ) {
System.err.println("an error occured in DbForumMessage (0935):"+sqle.getMessage());
sqle.printStackTrace();