[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [aspectj-users] How to lauch aspectjweaver at runtime?
- From: Simone Gianni <simoneg@xxxxxxxxxx>
- Date: Wed, 16 Jun 2010 00:36:58 +0200
- Delivered-to: email@example.com
you have two options:
- control the class loading of your servlets and use one of the weaving classloaders provided by AspectJ.
- weave all the JARs and the classes in your WAR at build time, and deploy a WAR with aspects already weaved in, using ajc (command line, ant task, or maven plugin), and the inpath option.
I prefer the second option :
- taking control of classloading in a JEE environment is never a "good thing"
- the weaver has a memory footprint, it is not important during build, but can be during runtime
- the weaver introduces a startup delay (cause classes are weaved while loaded), from something monolithic like a WAR it's better to spend that time during the build than at each deploy of the webapp