Place bacon and onions in a large, deep skillet. Cook over medium high heat until evenly brown. Drain and set aside.
In a large bowl combine beans, molasses, mustard, salt, tomatoes, brown sugar, dry mustard, ham, onions and crumbed bacon. Mix well and transfer to a 2 quart casserole dish.
Bake in preheated oven, covered, for 1 hour. Uncover and bake for 1 hour more.