Section 8. When declaratory relief is sought, all persons shall be made parties who have or claim any interest which would be affected by the declaration, and no declaration shall prejudice the rights of persons not parties to the proceeding. In any proceeding which involves the validity of a municipal ordinance or by-law or of a franchise, license, easement or other privilege granted by the commonwealth or a municipality thereof, the municipality, or the agency granting the privilege, as the case may be, shall be made a party and shall be entitled to be heard. If a question of constitutionality is involved in any proceeding under this chapter, the attorney general shall also be notified of the proceeding and be entitled to be heard.
Nothing set forth in this section shall bar the bringing of a class action for declaratory relief pursuant to the new rules of civil procedure.
Following entry of a final decree or order favorable to the petitioner or petitioners in a class suit, any member of said class thereafter aggrieved by any violation of said order or decree shall be entitled to compel compliance therewith by instituting contempt proceedings in said class suit.
Structure Massachusetts General Laws
Part III - Courts, Judicial Officers and Proceedings in Civil Cases
Title II - Actions and Proceedings Therein
Chapter 231a - Procedure for Declaratory Judgments
Section 1 - Power to Make Declaratory Determination; Jury Questions
Section 2 - Controversies to Which Declaratory Judgment Procedure Is Applicable
Section 3 - Grounds for Refusing Declaratory Judgment
Section 4 - Review of Decisions
Section 6 - Declaratory Relief in Other Actions
Section 8 - Necessary Parties; Class Actions
Section 9 - Purpose and Construction of Declaratory Judgment Provisions