A person having a lien, by judgment, decree, mortgage or otherwise, on real estate, or any part thereof, whereof partition is sought in such an action in the superior court, shall not, in the first instance, be a necessary party to the proceedings, and, except as provided in section 2A:56-16 of this title, his lien shall not be altered, affected or impaired by partition of the real estate.
N.J.S. § 2A:56-15