Saving the MboSet frees the database connection but does not close or cleanup, so I think the answer to your question is that .save() is not sufficient. You still need to call .close() after calling .save().
Original Message:
Sent: Wed January 22, 2025 06:58 AM
From: Vincent Wanders
Subject: What is the correct way to close a MboSet?
Hi Jason,
Thank you for your reply.
I did read the blog, but I did not find the answer of my question.
If the .save() closes the set the correct way as a .close() would do. (and the .close() is not needed then.)
However I learned something with your blog.
cleanup I never used. Didn't even know about this statement.
Vincent
------------------------------
Vincent Wanders
Original Message:
Sent: Tue January 21, 2025 10:59 AM
From: Jason VenHuizen
Subject: What is the correct way to close a MboSet?
I wrote a post on this a while back in case it is useful.
https://www.sharptree.io/blog/2021/2021-11-22-close-things/
Jason
------------------------------
Jason VenHuizen
Sharptree
https://sharptree.io
https://opqo.io
Original Message:
Sent: Tue January 21, 2025 07:48 AM
From: Vincent Wanders
Subject: What is the correct way to close a MboSet?
Hi,
I was also in a small discussion.
Is a mboSet.save() the equal of mboSet.close()?
In other words. Does a .save() also close the set?
Regards,
Vincent Wanders
------------------------------
Vincent Wanders
Original Message:
Sent: Tue December 12, 2023 09:24 AM
From: Bartosz Marchewka
Subject: What is the correct way to close a MboSet?
Hi Andreas,
In my opinion differences between methods close and cleanup were described in really good way in this article: Closing MboSets
I also found blog post done by Bruno Portaluri: MBO Performance Tip N.6 – Free resources as soon as possible
------------------------------
Bartosz Marchewka
IBM Maximo Consultant
AFRY
Original Message:
Sent: Tue December 12, 2023 06:41 AM
From: Andreas Brieke
Subject: What is the correct way to close a MboSet?
Hi,
i am wondering what is the correct way to close a MboSet that is opened via MXServer.
In the last time i always used something like this:
mboSet = MXServer.getMXServer().getMboSet("SOMETHING",userInfo)mboSet.close()mboSet.cleanup()
The IBM Autoscript Documentation only says cleanup (in the example) -> Scripting best practices
A colleague of mine said he uses clear/close:
mboSet = MXServer.getMXServer().getMboSet("SOMETHING",userInfo)mboSet.clear()mboSet.close()
Can anyone explain the differences between clear, close and cleanup? What is the best way/combination to close a mboSet and remove it from memory?
------------------------------
Andreas Brieke
IT Service Management Consultant
SVA System Vertrieb Alexander GmbH
------------------------------