You live in a grouchy 2-year-old hell because your son is strong-willed and you have been "blessed" with the job of training him so his strong will does not allow him to run the family. This is one of the times in his life where he wants to know how much control he has, and if he is like our daughter, he wants ALL the control. You need to teach him that you love him but he cannot be in control of your family. The parents make the decisions. Deep down, it is very reassuring for kids to know that their parents are in control.
Now is a good time to read some wonderful books on parenting a strong-willed child (not a bad thing, just the personality he was given). Dr. James Dobson was my favorite author. I would read the following 3 books in succession, over and over again: "The Strong-Willed Child," "Parenting Isn't for Cowards," and "Dare to Discipline" (which is now "The New Dare to Discipline," I believe. I'm sure they are at the library or you can get them used online at amazon.com.
Dr. Dobson was my cheerleader, as I had to learn how to train our daughter to be able to accept our roles as parents and not yet crush her spirit.
Do his tantrums and whining get him what he wants? They don't work if you don't "reward" him by doing what he wants when he does it. It will take time but you can teach him repetitively that the only thing you will answer to is calm requests. My daughter would throw a tantrum and I would walk away, telling her I will be in the kitchen when she is done. When she did it in a grocery store or at church, we would walk outside, give her a stern talking to and then we would go back. No rewards like candy for good behavior, just praise and hugs, and bragging to people in front of her of how good she is behaving, etc. (even strangers). He needs to learn to behave to get your approval.
If he needs constant attention, it is because you have taught him that you are his entertainment. Find things that he likes to do - creative things - that he can learn to work on for a few minutes at a time without you being right there. It is exhausting because his attention span is very short at this age, but if you diligently and consistently give him opportunities for creative play on his own, a few minutes (with much praise and admiration) will turn into a few more minutes, etc. Be sure to display his work and show it to everyone who comes over. It is important to play with him, but he also has to learn to play by himself.
Call his grandparents and brag in front of him about what he made or how nicely he played by himself. Make a big deal of it. My daughter needed lots of praise and needed to know we loved her and were very proud of her in those early years.
Hang in there and don't get discouraged. When that strong-will has been trained, it will be amazing in the upper teen years! We finally got to sit back and go, "Wow!"