That Night the Word of God Came to Nathan saying...
It is noted that David and Bathsheba named their second son Solomon. Solomon is actually Shelomoh in Hebrew and it is the word for peace in that language. Shelomoh has several variations of spelling and form and is frequently shortened to the familiar Hebrew greeting Shelom. Shortly after they named him Solomon, God sent word through Nathan the prophet that He loves this son and to name the child Jedidiah, which means, "loved by the Lord" or "beloved of the Lord."
2 Samuel 12:24 And David comforted Bath-sheba his wife, and went in unto her, and lay with her; and she bore a son, and called his name Solomon. And the Lord loved him; 25 and He sent by the hand of Nathan the prophet, and he called his name Jedidiah, for the Lord's sake. (JPS)
Matthew 5:43 Ye have heard that it has been said, Thou shalt love thy neighbour and hate thine enemy. 44 But *I* say unto you, Love your enemies, [bless those who curse you,] do good to those who hate you, and pray for those who [insult you and] persecute you, (Darby) (Emphasis added)
There is no evidence that the advice on names was actually followed, but Solomon might have gone by the name Jedidiah until he ascended to the throne. Nevertheless, by the time he became king, we see the name Solomon. In this case, the name Solomon would mean "prince of peace." This might be the reason that God suggested another name because this would obviously be another title for the Messiah. In fact, according to the Talmud, the name actually means God. Be that as it may, Israel did enjoy peace during most of Solomon's reign.
The Talmud says Shalom ("Peace"; Judges vi. 23) is the name of God, consequently one is not permitted to greet another with the word "shalom" in unholy places (Shab. 10b). The name Shelomoh (from shalom) refers to the God of Peace, and the Rabbis assert that the Song of Solomon is a dramatization of the love of God: "Shalom" to His people Israel = "Shulamite." "King of kings" in Dan. ii. 37 refers to God. "'Attik Yamin" (ib. vii. 9) refers to the Ancient One of the universe (see Yalk., Chron. 1076). The pronoun "Ani" (I) is a name of God (Suk. iv. 5). The first verse in Ezekiel ("we-Ani") refers to God (Tos. Suk. 45a). Hillel's epigram "If I [am] here everything is here" (Suk. 53a) is interpreted as referring to God. The divine names are called in the Talmud "Azkarot," or "Adkarata" in the Aramaic form. Divine names that occur in the handwriting of minim should be excised and buried in the genizah (Shab. 116a; Cant. R. ii. 4). God is named also Ha-Geburah ("The Majesty"; Shab.87a), but generally Ha-Makom. ("The Omnipresence"), accompanied with Baruk-hu ("Praised be He").
(Jewish Encyclopedia; Names of God; By: Executive Committee of the Editorial Board. J. F. McLaughlin and Judah David Eisenstein)
Recall that God told David that the sword would never depart from his house because of these events.
Jeremiah 4:10 Then said I: 'Ah, Lord GOD! surely Thou hast greatly deceived this people and Jerusalem, saying: Ye shall have peace; whereas the sword reacheth unto the soul.' (JPS) (Emphasis added)