Two times in this passage Peter says that it is a gracious thing when we suffer. James explains how suffering becomes grace.