Lawyergal, it's up to you to set boundaries. No matter how much some people love you (and maybe we have to question how much they really do), their lives come first. Your friend is not thinking about your bar exam; she's focused on her own problems. You can't assume that anyone but your mama understands where you are, so you have to tell them (be honest - they care about you). You are not going to lose a friend because you need to hibernate for the next 6 weeks. If you do, then so be it - that person does not have your best interests at heart and therefore is not much of a friend anyway. (Easy to say, hunh?

)
A friend of mine was going through the same thing when she was getting close to her Masters exam. She lives with her fiancee and he was having friends over all of the time. She is not in the habit of cramping his style, so she didn't say anything about not being able to study; she was just rude to his friends. Well, he got all upset about her "attitude," so she finally had to tell him that it would be best if, for the next 3-4 weeks, he would refrain from having company. Working up the nerve to tell him this caused her a huge amount of anxiety and stress that she really didn't need to have to deal with at that point, but, she did it and ignored HIS attitude for the next few weeks. She took the test, passed it, and things went back to normal.

I would say all is well that ends well, but, really, I think that relationship is headed for problems. Who am I to say, though? I have my own relationship foibles. Anyway, I'm rambling.
Back to setting boundaries: SET THEM NOW. You need time to study with a clear head. Put all emotional issues on the back burner. If your friend can't take honesty, put her on the back burner too until the test is over. You have enough anxiety, worry, fear, panic to deal with right now. She will have to keep her headaches to herself. Tell her these things - be honest and she will understand where you're coming from. If not, so be it for the next 6 weeks. Don't let anyone else's silliness get in your way. If you do, maybe you are so very terrified that you are creating an excuse for yourself if you fail? Maybe a self-fulfiling prophecy? Be careful, our minds to play tricks on us in times of intense stress.
Good luck with the exam. You can do it, no proooblem. My father passed the CA Bar with about 4 weeks of intensive study and my sister passed it too; both on the first try. You're smart and you will succeed.