Submitted by Niels Liisberg on Tue, 10/04/2016 - 09:47
Forums

Session persistent objects is now supported in icebreak. 

Session persistent json object, is objects maintained through out a session lifetime.

If the persistent object does not exists, then sesGetObject returns a default empty object ready for you to populate. In any case you will receive a pointer to an object which is maintained through out the session lifetime.

You don't need the usual cleanup by json_delete / json_close since the object will be disposed when the job terminates. You can however use the json_delte if the persistent object is not required any longer.

You can always use the sesGetObject to reload the initial state at transaction invocation time by calling the sesGetObject again, however in that particular case remember to clean up prior to that with json_Close().

Note 1:
The name is required to conform to IFS object name standart ( like programs or libraries.

Note 2:
json_setPtr is not allowed unless it points to a valid json stringified payload or contains json valid literals.

Note 3:
Keep the number of session persistent objects to a minimum, otherwise you will have a performance penalty. 

Session json objects

Best regards,

Niels Liisberg