Life-cycle of a const in a javascript step

vendredi 21 novembre 2014

I'm having something of a lazy Friday here, so I wanted to throw this out to the community before resorting to debugging through connect. :)



MDN defines the scope of a const in a function to be the lifetime of the script. That lifetime is a little unclear to me at the moment when it comes to how Mirth uses Rhino.



If I assign an object (typically used for static lookups) to a const inside a javascript step, does anybody know how long I can expect it to live?



We use shared tables by putting them in the global channel map, but tables needed only in one step are generally created there as consts to keep everything together. I'm trying to determine if the latter is, in fact, recreating the table every time the step executes or if it lives longer than that.



Thanks for any input you folks might have!





Life-cycle of a const in a javascript step

0 commentaires:

Enregistrer un commentaire