I feel like they used to work but there were gotchas. For example the JVM
loads up some types before the LTW infrastructure can even get involved and
those can't be woven. I don't actually recall if we have testcases for this
but I wouldn't be surprised if they weren't there.  I guess you have tried
them and they don't work - I wonder if you were test weaving something that
would be loaded early?  It would be interesting to attempt it with a
-verbose:class and verify not attempting to weave things loaded before the
'LTW is active' type messages come out.  Will it work with modules in
recent Javas? That seems unlikely.

But it could be the kind of classloaders in use in regular Java now don't
allow weaver attachment, I honestly haven't kept up to speed on that - and
maybe that prevents them working at all. A run of LTW with the debug option
on for the weaver should show the types the weaver is being exposed to. If
those are java/javax then they should be weavable.

cheers,
Andy

On Fri, 27 Mar 2020 at 04:03, Alexander Kriegisch <alexan...@kriegisch.name>
wrote:

> Hallo Andy and other maintainers.
>
> The AspectJ documentation still mentions things like
>
>   -Xset:weaveJavaxPackages=true
>   -Xset:weaveJavaPackages=true
>
> or for LTW
>
>   <include within="javax.*"/>
>   <include within="java.*"/>
>   <include within="org.aspectj.*"/>
>
> (I think "java..*" would be correct syntax, BTW.)
>
> None of these work. Yes, there are valid cases in which users might want
> to use LTW on JRE classes. The only way I could ever weave into the JRE
> (execution joinpoints, not just call from my own woven code) was binary
> weaving and creating my own (subset of) JRE, prepending it to the boot
> classpath. But that's not nice and I never tried with modularised Java
> 9+, which might work or not.
>
> Before I create a Bugzilla ticket I would like to get a maintainer
> opinion. Is there any chance to make this work with AspectJ LTW? Is is
> maybe possible already and I just do it wrong?
>
> Regards
> --
> Alexander Kriegisch
> https://scrum-master.de
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@eclipse.org
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/aspectj-users
>
_______________________________________________
aspectj-users mailing list
aspectj-users@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to