MBO Performance Tip N.6 – Free resources as soon as possible

This entry is part of the Java MBO performance optimization golden rules series.

It is important to know the difference between close(), cleanup(), and clear() methods and use them to free up resources as soon as possible.

  • close(): Close the cursor, release the database resources (result set),  SQL statement, and connection key. Does not release MBO objects. You can still work with MBOs already retrieved from the MboSet. Close the set as soon as possible if reusing the set is not needed in following logic.
  • cleanup(): Reset the MboSet, and clear its current transaction. Clears any filters.
  • clear(): Removes all the objects from the collection as well as all related objects.

MBO Performance Tip N.6 – Free resources as soon as possible

2 thoughts on “MBO Performance Tip N.6 – Free resources as soon as possible

  1. We are using 7.5.0.8 and Escalations > communications Log — deleting the entries and saving (especially if you have many rows e.g. 3000) will cause the highest_open_cur to go up.

    We encounter ORA-01000 errors also when we run PMWoGen crontask every week.

  2. Hi Bruno,
    Is there any guideline suggest mboSet/s can be left unclosed if all of them fetched through relationship and mxtranasction involving them gets completed it will close all of those related sets ?

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top