Context and Exegesis from uniting church
Political context
"As it can be seen from the brief paragraphs describing the scenarios in Egypt and Mesopotamia there was little time or energy for intrusion into Palestine which allowed David to extend his empire without interference from the Empires either side. This does not deny the military acumen and charisma that David needed to weld the tribes together and fight as a cohesive unit."Narritive flow
The flow of the above narrative is well thought out and is liturgically interesting if one compares it with the Eucharist in which elements of both are present. The presence of God (cloud, bread & wine), the reminder in the great prayer of thanksgiving of God's actions in history, prayer of confession & petition, blessing of elements and people...Theology and message
Solomon's prayer begins with a three fold act of praise: there is no God like you, keeping covenant and steadfast love, the covenant that you kept with David (vv.22-24)....
The prayer changes to that of petition in which Solomon asks for God to be present in the temple in order that he will be able to hear the plea of his people Israel (vv.27-30)....
However, Solomon in reiterating the promise changes from a prayer of praise to petition and seeks God to keep his promise to David, but adds the condition "if" your children walk before (v.25). This becomes the explicit theology which gives the explanation why they ended up in exile, that is, they failed to keep the statutes and walk in God's ways.
Verses 27-30 begin with the rhetorical question, But will God indeed dwell on the earth? The answer is a profound theological truth that nothing in heaven and on earth can contain God. Therefore, we cannot possibly expect God to be contained in this temple. However, that doesn't prevent God heeding their prayer from heaven and God said that his name would be present. It is a wonderful précis of immanent & transcendent theology. God is present both, in heaven and will hear their prayers as directed towards the temple (not necessarily in the temple), and is immanent because his name is present in the temple. This incredible reassurance that no matter where you are God will and can heed your prayer. If the exiles can pray toward the temple and know that God is not contained in the temple, but is present everywhere what hope it could give them.
The lectionary chosen from the seven specific petitions is that one focussing on the foreigner. This word, which means someone who comes from a foreign land is quite a deliberate move away from the word used of a person who is a sojourner in Israel. The petition asking God to hear the prayers of such a person is quite extraordinary and we probably have little concept of the radical nature of this request. These foreigners will have heard about God and have accepted the lordship of Yahweh. They come now to Jerusalem and pray and Solomon petitions God to hear their prayer. If God will do this all people will know of God and honour him. Around 400 BCE there was conflict between foreigners who were part of the worshiping community and those who wanted to get rid of them ( See my book, Inclusive voices in Post- Exilic). The theology present in these verses is before its time.