As David looked death in the face, he challenged his son Solomon concerning how he should rule Israel. Justice, righteousness and faith were all high on David's list of recommended priorities. But, he soon digressed. David challenged Solomon to make sure that vengeance was at some point decreed on a couple of his adversaries: Joab and Shemei specifically. And, evidently Solomon bought into David's way of thinking. He started his reign with force and strength. Not only did he deal firmly and lethally with Joab and Shemei, he also thrust out Abiathar from the priesthood (for disloyalty) and had Adonijah executed too. Adonijah earned his own death sentence when he demonstrated his unworthiness to live (by asking to marry his late father's last "wife" - Abishag).
For me, the striking thing in this story is the role of Benaiah. He had been one of David's men, but he became Solomon's main military arm. Not that he had a long and heavy career ahead of him or anything. Unlike his father David, Solomon was destined for a peaceful reign. However, at the beginning of his tenure he did have some tough decisions to make. So, he had Benaiah personally execute Adonijah, Joab and Shemei. It may seem harsh, but it was just and righteous... and, his firmness apparently helped to solidify his authority in the eyes of the people. Sadly, young conservatives sometimes become old liberals. Such was the case with Solomon. And his death also marked the death of the united Kingdom of Israel.