For some of our flows, we'll have some output attributes (a checksum for instance) that we can't generate directly through DataWeave so we chose to calculate them using Java functions and we have too possibilities :
- Use a Java component and put the result on a variable using a transformer class
- Define a global function that calls a static method from a class and use it in a Transform Message component
I know that we can have some performance problems with static method as they can't be garbage collected. What are the pros and cons of these 2 choices ?
