Hey devs, I found a repo with some weaving hooks examples (https://github.com/bdelacretaz/OSGi-weaving-hook-examples/blob/master/src/main/java/ch/x42/osgi/weavinghook/LogMethodCallsHook.java <https://github.com/bdelacretaz/OSGi-weaving-hook-examples/blob/master/src/main/java/ch/x42/osgi/weavinghook/LogMethodCallsHook.java>, even though it is pretty old) and found it interesting. What I would like to try out is to mimick the behaviour of Rookout ( https://www.rookout.com/ <https://www.rookout.com/> ). Rookout allows (read-only) debugging of a production instance by adding a java agent that is able to get object field values at runtime without attaching a real java remote debugging instance.
How I would like to mimick this is by creating an OSGi Weaving Hook, based on the LogMethodCallsHook class, that would allow you to create an OSGi weaving hook at runtime by creating for example an OSGi configuration factory that registers a weaving hook for a class with a method in a specific bundle. Do you see this feasible? Is it possible to register a weaving hook without having to reload the entire bundle again and going through the Activator method again? I already had a comment from the repo owner himself and he doesn’t think its feasable but he gave me the remark to ask here as well! (https://github.com/bdelacretaz/OSGi-weaving-hook-examples/issues/1 <https://github.com/bdelacretaz/OSGi-weaving-hook-examples/issues/1>) Thanks! Roy