What caused kony java reflection to start when kony fabric publish an app?

This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal.

Hi all,

Our current usage of kony fabric require us to upload a jar containing all business logic and its dependency ( library such as apache, jackson and so on ).

We would like to know what causing kony java reflection to run?

Do anyone have any suggestion how to shorten the process of kony java reflection?

What are the best practice in designing a custom code java library:

  • should we put everything in fat jar? Example would be a multiple code repository and dependency build together to produce a fat jar.
  • should we have multiple java jar when we have a multiple code repository? In theory when kony reflection occur, it will only read the changes on that particular jar and not all the jar within kony fabric custom code.

Looking forward for your recommendation and justification.

Some insight. Those reflection scan was actually came from Reflections(not to be confused with runtime Reflection API) library which middleware used.

In nutshell this library allows, at runtime scans of all classes/resources in a library and its dependencies as well. It captured specific informations such as Types, SubTypes, Annotations and more.

From previous thread dump taken, apparently this Reflections constructor was invoked by a java.util.TimerTask of which scheduled by java.util.Timer#schedule internally.

At best I guess this Timer schedule invoked when publish button clicked and depends on values set by middleware the Reflections#scans ran REPEATEDLY as scheduled.

Questions is/was what is the schedule configuration values and is it configurable? What triggers Runnable to stop as Timer and TimerTask does not represent asynchronous Future and need to be cancelled by calling cancel() method.

References:-

https://docs.oracle.com/javase/8/docs/api/java/util/Timer.html

https://github.com/ronmamo/reflections

😀

rofl 😹