Section 52. A foreign limited partnership doing business in the commonwealth shall appoint a resident agent as its true and lawful attorney upon whom all lawful process in any action or proceeding against the foreign limited partnership in the commonwealth may be served. Sections 15.07, 15.08 and 15.09 of chapter 156D relative to the appointment and qualifications of a resident agent shall be applicable to the appointment of a resident agent pursuant to this section.