I just wanted to say this passage is in reference to Hannah's prayer to the Lord. This particular passage must be taken in the context of what is before and after it. This section of Samuel must be interpreted as a judgment section passage and cannot be thoroughly understood without understanding the historical-grammatical approach to the situation.
Additional points of importance:
chapter 2 should be seen in the flow of chapter 1 for the most adequate understanding of the passage. The KJV pinpoints this precisely. In verse 1, the word "prayed" is used in both dynamic and literal equivalencies. Strong's Concordance lists "prayed" in this chapter as #6419. The way "prayed" is used in this context is different from all ways it is used in the NT. In fact, the consistency of using "prayed" in this sense brings into further questioning as to why chapter 1 does not continue through Hannah's prayer. In this context, "prayed" differentiates based upon the fact that it is a judgment prayer, which speaks to the OT God of judgment and wrath. This judgment takes place both officially and mentally. Also in verse 1, my horn is lifted high is another Strong's Concordance number that is listed only in the OT. This seems to be a well developed pattern throughout 1 Samuel 2: 1-10.