@dorothy26,
You've been acting like a doormat for 2 years. This boyfriend was jealous and possessive. He wanted to contact your friend and harass him (and then had the nerve to tell you that you were wrong for refusing to allow that?)?
To use the technical term for your ex-boyfriend, the guy's an asshole.
To be dissed by an asshole is meaningless.
Dry your eyes and smell the coffee. You're considerably better off to be rid of him, and maybe consider counseling to figure out why you'd waste 2 years of your life catering to someone that hostile and demeaning to you.