Object that rotates around another but not on itself
One solution is to parent object B to object A, give a Limit Rotation constraint to object B, and limit the constraint on the Z axis: Object B will rotate around A but won't rotate on itself.

Another solution, suggested by Frederik Steinmetz, is to not parent B to A, to parent an empty to A, and give B a Copy Location constraint with the empty as Target.