IAgileSession close
Do we need to always close an IAgileSession during a Groovy Script?
For example, is this necessary to add the ‘session.close()’ method to the following script to help prevent memory leak issues?
import com.agile.agileDSL.ScriptObj.IBaseScriptObj
// add other import statements here
void invokeScript(IBaseScriptObj obj) {
IAgileSession session = obj.getAgileSession()
//do something
obj.logMonitor(“did something”)
session.close()
}
No. You do not need to close the session with these types of PXs. Agile is taking care of the session. Only if your PX creates a connection (SessionFactory) do you close the session when you are done.