Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AspectJ load-time weaving in production systems

Does anyone have an experience with pure AspectJ load time weaving in production systems (mostly interesting Tomcat related activities)? I'm slightly worrying regarding memory footprint and cpu overhead.

like image 253
FoxyBOA Avatar asked May 18 '09 03:05

FoxyBOA


2 Answers

I wouldn't imagine that it'd have a significantly different impact to other AOP-related libraries like cglib, which we use a lot in production systems for AOP proxy generation in Spring. The performance is fine, but there is an increased memory footprint in the permgen pool (due to a large number of synthetic classes being generated), which can be a problem if not managed carefully.

like image 132
skaffman Avatar answered Oct 17 '22 03:10

skaffman


I would encourage you to do compile time weaving for aspectj. You can do that in your build with ant or maven and in development in Eclipse with the AJDT plugin.

Load time weaving works in tomcat. I had a production system running for some months but switching to compile time weaving made configuration and maintenance a lot easier.

like image 28
Thomas Einwaller Avatar answered Oct 17 '22 03:10

Thomas Einwaller