
119 S.W.3d 551 (2003)
PATRICK V. KOEPKE CONSTRUCTION, INC., Plaintiff/Appellant,
v.
WOODSAGE CONSTRUCTION COMPANY, et al., Defendants,
Palcor Capital Investors, Inc., Defendant/Respondent, and
Richard P. Paletta, Garnishee/Respondent.
No. ED 82077.
Missouri Court of Appeals, Eastern District, Division Two.
September 16, 2003.
Motion for Rehearing and/or Transfer Denied November 13, 2003.
*553 Alan Kimbrell, Chesterfield, MO, for appellant.
James R. Dowd, St. Louis, MO, for respondents.
Motion for Rehearing and/or Transfer to Supreme Court Denied November 13, 2003.
KATHIANNE KNAUP CRANE, Judge.
Plaintiff appeals from the judgment denying its motion for a creditor's bill to enforce a consent judgment on the grounds that it was barred by res judicata in that a judgment against plaintiff had been entered in another lawsuit between the same parties on the same issue in another division of the circuit court.[1] Plaintiff contends that the trial court erred in sua sponte entering judgment on that ground without giving him an opportunity to be heard because res judicata had not been raised in the motion to dismiss then pending before the court. We affirm.
In 1993 plaintiff, Patrick V. Koepke Construction, Inc., obtained a consent judgment in the amount of $100,924.60 against Palcor Capital Investors, Inc. ("Palcor") in Cause No. 592820 in the Circuit Court of St. Louis County. On May 10, 2000 plaintiff filed a Motion for Creditor's Bill in this case against Richard Paletta, as garnishee, requesting that Mr. Paletta, individually, be ordered to pay the amount of plaintiff's judgment against Palcor, on the grounds that Mr. Paletta in his capacity as sole officer, director and shareholder of Palcor Capital Investment Inc., transferred all of the funds from the sale of the property improved by Koepke Construction Inc., to himself individually, leaving nothing to satisfy the consent judgment. As a result of this transfer, Koepke claimed Paletta had used Palcor as his instrumentality and alter ego and concealed the transfer to defraud Palcor's creditors.
On the same day, plaintiff filed a new petition in the Circuit Court of St. Louis County, which was assigned Cause No. 00CC-1547, against Mr. Paletta and Palcor (hereinafter, collectively, "respondents") to recover from Mr. Paletta the same amount that had been awarded in the consent judgment. This petition alleged that Paletta, in his capacity as sole officer, director and shareholder of Palcor, transferred all of the funds from the sale of the property that Koepke improved, to himself individually. The petition further alleged, Paletta had thereby used Palcor as his instrumentality *554 and alter ego, and concealed the transfer to defraud Palcor's creditors.
After dismissing its original Motion for Creditor's Bill, plaintiff refiled the motion on June 7, 2002. Respondents filed a motion to dismiss and a motion for sanctions in this case. In their motion to dismiss, respondents alleged:
5. Plaintiff likewise had filed a duplicate, identical lawsuit before another court in this Circuit, captioned Patrick V. Koepke Construction v. Richard P. Paletta, et al., case number 00CC-1547, asserting claims of fraudulent conveyance and piercing the corporate veil.
10. As a matter of law, plaintiff's claim must be dismissed because (a) plaintiff fails to state a claim for which relief can be granted, and (b) there is another action pending between the same parties for the same cause in this state.
On June 20, 2002, plaintiff filed a motion to consolidate this case with Cause No. 00CC-1547 for the reason that "the dispositive legal issues are common to both cases, the majority of legal issues are common to both cases, and the interests of the defendants herein and the defendant in Cause No. 00CC-1547 are the same." The causes were not consolidated.
The judge in this case, Honorable Robert S. Cohen, heard the motions for sanctions and to dismiss and took them under submission on June 21, 2002. On July 29, 2002 the Honorable Barbara Wallace tried the case in Cause No. 00CC-1547, and she entered judgment in favor of Palcor and Mr. Paletta on July 30, 2002. In that judgment she found:
The Court finds Plaintiff has failed to present substantial, credible, evidence of any fraudulent conveyance or concealment by either of both Defendants herein and has failed to present substantial, credible evidence that [Palcor] was the instrumentality or alter ego of Paletta. The Court finds the deposition testimony of Paletta credible.
On October 3, 2002, Judge Cohen issued an order and judgment denying plaintiff's motion for a creditor's bill because it was barred by the doctrine of res judicata, on the basis of the judgment entered in Cause No. 00CC-1547. Specifically, this judgment recited:
The parties have agreed and stipulated that the issues and parties in this cause are identical to those in Cause 00CC-1547, adjudicated in Division 13 of this Circuit on July 30, 2002.
The Court has taken judicial notice of Cause 00CC-1547 and its contents, including the Judgment of July 30, 2002.
It is the finding and determination of this Court that Plaintiff's Motion For Creditor's Bill be and hereby is Denied on the basis that it is barred by the doctrine of res judicata.

Garnishee Paletta's Motion For Sanctions is Denied.

DISCUSSION
For his first point plaintiff asserts that the trial court denied it due process when it sua sponte entered a judgment denying its motion for a creditor's bill on res judicata grounds without giving it notice or the opportunity to be heard. In its argument under this point, plaintiff contends that no document in the record contains such a stipulation, that the trial court gave no notice of its intention to rule on the merits, and that the trial court did not give plaintiff the opportunity to argue whether Judge Wallace's judgment was final for res judicata purposes.
The first contention may be disposed of briefly. Although the record does not contain a document designated as a stipulation, or a transcript of the hearing, both *555 parties filed pleadings in the case before Judge Cohen that referenced Cause No. 00CC-1547 and stated that the issues and parties were the same. These pleadings, taken together, support Judge Cohen's finding that the parties had "agreed and stipulated" that the issues and the parties were identical.
Plaintiff cites no authority in support of his claim that the trial court could not sua sponte apply the doctrine of res judicata in the circumstances of this case. Res judicata means "a thing adjudicated" and is a common law doctrine that precludes relitigation of a claim formerly made. Chesterfield Village v. City of Chesterfield, 64 S.W.3d 315, 318 (Mo. banc 2002). For res judicata to apply, "four identities" must occur: 1) identity of the thing sued for; 2) identity of the cause of action; 3) identity of the persons and parties to the action; and 4) identity of the quality of the person for or against whom the claim is made. Felling v. Giles, 47 S.W.3d 390, 394 (Mo.App.2001).
Res judicata is an affirmative defense. Ordinarily, the party seeking to benefit by it must either plead in an answer, raise it by an amendment to the pleadings, or present it by motion to dismiss. Heins Implement v. Hwy. & Transp. Com'n, 859 S.W.2d 681, 685 (Mo. banc 1993). However, it is a defense that not only benefits the defending party, but also benefits the court's ability to efficiently administer justice.
In this regard, the United States Supreme Court has recognized
"if a court is on notice that it has previously decided the issue presented, the court may dismiss the action sua sponte, even though the defense has not been raised. This result is fully consistent with the policies underlying res judicata: it is not based solely on the defendant's interest in avoiding the burdens of twice defending a suit, but is also based on the avoidance of unnecessary judicial waste." United States v. Sioux Nation of Indians, 448 U.S. 371, 432, 100 S.Ct. 2716, 65 L.Ed.2d 844 (1980) (REHNQUIST, J., dissenting) (citations omitted).
Arizona v. California, 530 U.S. 392, 412, 120 S.Ct. 2304, 147 L.Ed.2d 374 (2000). The federal courts recognize the power of a federal court to sua sponte dismiss on the ground of res judicata, even if the benefiting party has waived it as an affirmative defense, because it serves to promote judicial economy and avoid judicial waste. In re Medomak Canning, 922 F.2d 895, 904 (1st Cir.1990); Boone v. Kurtz, 617 F.2d 435, 436 (5th Cir.1980). See also 18 CHARLES A. WRIGHT ET AL., FEDERAL PRACTICE AND PROCEDURE: JURISDICTION 2D Section 4405 (2002). Although federal courts are to use caution in applying res judicata sua sponte, there are two exceptions: when the defense arises out of the court's own earlier judgment, or when the "demands of comity, continuity in the law, and essential justice" confront the court and all relevant records are before it. Warnock v. Pecos County, Tex., 116 F.3d 776, 778 (5th Cir.1997). Although we are not bound by the pronouncements of the federal courts of appeals, we find the rationale for allowing the sua sponte application of res judicata in limited situations persuasive.
The circumstances in this case demonstrate that the trial court did not abuse its discretion in denying the motion for a creditor's bill by sua sponte applying res judicata and did not deprive plaintiff of due process. Further, plaintiff has shown no prejudice.
The court had notice of the pending Cause No. 00CC-1547 in another of its divisions and had access to and took judicial *556 notice of the files in that case. Because there was no judgment in that action until after the motion to dismiss in this case was heard, it would have been premature for respondents to assert res judicata as a defense or ground for dismissal when the motion to dismiss was filed or heard. Accordingly, the defense had not been waived. Further, the substantive issue presented by res judicata was in fact before the court on the motion to dismiss. Respondents moved to dismiss on the ground of the pendency "of the same action for the same cause" before Judge Wallace. This is a defense found in Rule 55.27(a)(10) and Section 509.290.1(8) RSMo (2000), which enactments codify the common law doctrine of abatement. Bellon Wrecking & Salvage Co. v. David Orf, 983 S.W.2d 541, 548 (Mo.App.1998); State ex inf. Riederer v. Collins, 799 S.W.2d 644, 650 (Mo.App.1990).
"Abatement, also known as the `pending action doctrine,' holds that where a claims involves the same subject matter and parties as a previously-filed action so that the same facts and issues are presented, resolution should occur through the prior action and the second suit should be dismissed." Estate of Holtmeyer v. Piontek, 913 S.W.2d 352, 357 (Mo.App. E.D.1996), citing State ex rel. J.E. Dunn, etc. v. Schoenlaub, 668 S.W.2d 72, 74-75 (Mo. banc 1984). The court in which the claim is first filed acquires exclusive jurisdiction over the matter. State ex rel. Kincannon v. Schoenlaub, 521 S.W.2d 391, 394 (Mo. banc 1975). Though abatement generally does not apply where the parties' alignment (as plaintiff or defendant) in the original suit is reversed in the subsequent action, it is appropriate if the second cause of action is essentially identical to the first action filed. State ex rel. J.E. Dunn, Jr. & Associates, Inc. v. Schoenlaub, 668 S.W.2d at 75.
Id. The motion to dismiss raised the existence of the same four identities as would a motion based on res judicata. The substantive issues of a res judicata claim were therefore before the court when it heard and considered the motion to dismiss.
Further, plaintiff has not shown it would have brought any other facts or documents to the court's attention to counteract the application of res judicata. Likewise, plaintiff has not shown it would have any viable argument opposing the application of res judicata on the merits. Plaintiff's only challenge to the merits of the application of res judicata is premised on the claim that this court might affirm Judge Wallace's judgment on a procedural issue, the statute of limitations, instead of on the merits, and that Judge Wallace's judgment was not final, either of which, plaintiff claims, would preclude application of res judicata. These arguments are moot because we did affirm Judge Wallace's decision on the merits in Patrick V. Koepke Construction, Inc. v. Paletta, 118 S.W.3d 611 (Mo.App.2003), and, for the reasons set out under our discussion of point two below, the judgment was and is final for the purposes of res judicata. Under these circumstances, plaintiff was not prejudiced by the trial court's sua sponte application of res judicata without giving the parties notice and another hearing after the court was notified of the judgment in Cause No. 00CC-1547.
The trial court did not abuse its discretion in denying the motion for a creditor's bill on the grounds of res judicata and plaintiff has shown no prejudice. Point one is denied.
For his second point plaintiff asserts that the trial court erred in entering a final judgment denying plaintiff's motion for a creditor's bill on the basis of res judicata because the judgment in Cause *557 No. 00CC-1547 was not a final judgment in that it was on appeal to this court. This point is moot because the premise on which it is based, that the judgment in Cause No. 00CC-1547 was on appeal, is no longer true in that we have affirmed that judgment.
Even if that appeal had not been decided, the point has no merit:
It is a principle well settled and of general application that where a question proper for judicial determination is directly put in issue, and finally determined in a legal proceeding by a court having competent authority and jurisdiction to hear and determine the question, such decision and determination of the question will be deemed final and conclusive upon the parties and their privies, in all further litigation between them, in which the same question arises, so long as the judgment remains unreversed or is not otherwise set aside.

Hall v. Wilder Mfg. Co., 316 Mo. 812, 293 S.W. 760, 766 (Mo.1927); Century Fire Sprinklers v. CNA/Transport., 87 S.W.3d 408, 424 (Mo.App.2002)(emphasis added). "When a final judgment is rendered by a trial court, it constitutes a final adjudication on the merits, even though it is appealed, and is therefore res judicata." Consumers Oil Co. v. Spiking, 717 S.W.2d 245, 251 (Mo.App.1986); Empire Trust Co. v. Hitchcock, 233 Mo.App. 581, 123 S.W.2d 565, 567 (Mo.App.1939). Point two is denied.
The judgment of the trial court is affirmed.
GLENN A. NORTON, P.J. and MARY K. HOFF, J., concur.
NOTES
[1]  Respondents did not engage counsel until shortly before the date oral argument was scheduled. While they were unrepresented, they did not timely file responsive briefs or timely seek an extension of time in which to do so. As a result, this case was submitted solely on plaintiff's brief.
