简体   繁体   中英

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.

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM