A Commentary, Critical, Practical, and Explanatory on the Old and New Testaments, by Robert Jamieson, A.R. Fausset and David Brown [1882] at sacred-texts.com
David said, This is the home of the Lord God--By the miraculous sign of fire from heaven, and perhaps other intimations, David understood it to be the will of God that the national place of worship should be fixed there, and he forthwith proceeded to make preparations for the erection of the temple on that spot.
David commanded to gather together the strangers--partly the descendants of the old Canaanites (Ch2 8:7-10), from whom was exacted a tribute of bond service, and partly war captives (Ch2 2:7), reserved for the great work he contemplated.
HE INSTRUCTS SOLOMON. (Ch1 22:6-19)
Then he called for Solomon . . . and charged him--The earnestness and solemnity of this address creates an impression that it was given a little before the old king's decease. He unfolded his great and long cherished plan, enjoined the building of God's house as a sacred duty on him as his son and successor, and described the resources that were at command for carrying on the work. The vast amount of personal property he had accumulated in the precious metals [Ch1 22:14] must have been spoil taken from the people he had conquered, and the cities he had sacked.