Hi Suhas Joshi,
I found this interesting blog post Closing MboSets with explanation (first cleanup and then close):
"When working with MboSet references that are not provided implicitly by the Automation Script framework, it is very important to clean up and close references.
In addition, MboSets that are obtained using the System user live forever and are never automatically cleaned up because the session never terminates. For this reason and because of other security concerns, using the System user to get a MboSet should be avoided if possible.
Finally, to make sure cleanup()
and close()
are always called, wrap the MboSet accessing code in a try
finally
statement so that even if an unexpected error occurs, your MboSet references will be properly cleaned up and closed."
If you are using MboSet only for read-only purpose (not to saved) please read this performance tip: Use discardable MBOs when possible
------------------------------
Bartosz Marchewka
IBM Maximo Consultant
AFRY
------------------------------
Original Message:
Sent: Tue December 05, 2023 02:10 AM
From: Suhas Joshi
Subject: Mboset clear first or close?
Hi,
When we get an mboset from MXServer, should we clear the mboset first and then close OR close the mboset first and then clear?
Regards,
Suhas
------------------------------
Suhas Joshi
Infosys
Pune MH
------------------------------