"Eli would bless Elkanah and his wife, saying, 'May the Lord give you children by this woman to take the place of the one she prayed for and gave to the Lord.' Then they would go home. And the Lord was gracious to Hannah; she gave birth to three sons and two daughters. Meanwhile, the boy Samuel grew up in the presence of the Lord." NIV translation
Each year, Eli would say a blessing (prayer) for Elkanah and Hannah to have more children. They ended up having five children to replace Samuel and we are reminded that, throughout the Bible, the number five is associated with the display of grace.
"Now Eli, who was very old, heard about everything his sons were doing to all Israel and how they slept with the women who served at the entrance to the tent of meeting." NIV translation
Eli knew about the things that his sons were doing but it seems that sleeping with the women that served was the last straw. These "women who served" were a group of women that gathered near the bronze laver and prayed. Eli's sons turned them away from prayer to adultery.
"So he said to them, 'Why do you do such things? I hear from all the people about these wicked deeds of yours. No, my sons; the report I hear spreading among the Lord's people is not good." NIV translation
We see that it was becoming well known among the people of Israel that the priesthood was corrupt. In Eli's reaction, we notice the fact that it was the talk of the people that bothered him and not the fact that his sons had no regard for the things of God.
Too often we, as Christians, do the same type of thing where we care more about people's opinions than honoring God. This is also a corruption of the priesthood as we are called to be a kingdom of priests.
"'If one person sins against another, God may mediate for the offender; but if anyone sins against the Lord, who will intercede for them?' His sons, however, did not listen to their father's rebuke, for it was the Lord's will to put them to death. And the boy Samuel continued to grow in stature and in favor with the Lord and with people." NIV translation
Eli warned his sons but they refused to listen to him. God had already decided to make an example of them and to use them as a sharp contrast to Samuel. As they were despised as ungodly men, Samuel was recognized as being different. That is what we call being a witness and sharing the gospel with our lives.