Re: [aspectj-users] Hook Thread Creations

2016-07-23 Thread ants
Thanks a lot Alex. That's exactly the same way I'm too looking into. I'm just playing around to sort of get parent/child relationship between the threads. Using this, I could able to hook into before and after pointcuts, to assign Thread names to keep the Parent/Child relationship going on. Yes,

Re: [aspectj-users] Hook Thread Creations

2016-07-23 Thread Alexander Kriegisch
I did not answer right away because I was busy, sorry. I think that the answer is a little bit more complex because maybe you do not know exactly how your 3rd party application or library handles concurrency. Maybe it directly creates threads, maybe it uses thread pools. Then possibly you rather

Re: [aspectj-users] Hook Thread Creations

2016-07-22 Thread Andy Clement
aspect X { before(): call(Thread.new(..)) { // Thread constructor called System.out.println("Thread created!"); } before(): call(* Thread.start(..)) { // Thread.start called System.out.println("Thread started!"); } } Andy > On Jul 20, 2016, at 1:07 AM, ants

Re: [aspectj-users] Hook Thread Creations

2016-07-20 Thread Alexander Kriegisch
You can easily hook into places where your own code creates threads. If you need to hook into threads created by third party libs, you need to weave their binaries via post-compile or load-time weaving. Theoretically you can also weave into the JDK, creating your own tools.jar with woven

[aspectj-users] Hook Thread Creations

2016-07-19 Thread ants
Hi All, Is there a way to hook to thread creations and destroy from AspectJ pointcuts? ` Anto. -- View this message in context: http://aspectj.2085585.n4.nabble.com/Hook-Thread-Creations-tp4652108.html Sent from the AspectJ - users mailing list archive at Nabble.com.