In reply to ben@SystemVerilog.us:
When you call randomize() inside a class method, there is an implied _this._randomize(). Only the constraints that are part of this object get used, in your case, the B object. The constraints in A are not seen. You need to either extend class B, or declare myB as rand and call randomize from A.