Just a short explanation why I reopened BZ 58143:

All is well for TC 8.0-9.0, but for TC 7.0 Spring Load time Weaving is broken since 7.0.70. You might remember that we implemented an additional interface in the WebappClassLoader to make adding weavers more easy. That was backported to TC 7 around 7.0.64 and worked quite well.

Later there was an optimization in the loader cache that unified cache keys for resources and classes (in all TC branches). This optimization broke the weaving, because Spring first loads the classes as resources to check for annotations, then when the class is actual being used the weaving happens. After sharing the cache key between resources and classes, the first loading as a resource fills the cache but weaving is not yet set up by Spring, the second loading, then as a class, was directly fulfilled from the cache and no weaving happened.

Now for TC 8, 8.5 and 9.0 there was another WebappClassLoader change which moved the call to the weavers from the method findResourceInternal(), that is shared between resource and class loading, to findClassInternal() and weaving worked again.

So in the above BZ I suggest to do the same code move for TC 7. I attached a patch to the BZ that only contains the code move and not the few other changes that were part of the original commit in the newer branches.

For details (revision numbers, suggested patch, test webapp) please see the BZ. For me the test suite for TC 7 still runs fine after applying the patch.

I can of course apply the patch myself, but since I stripped parts of the original commit and the class loader is a very important part, I wanted to give some explanations and also give some time for remarks.

Thanks and regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to