I am planning to use AspectJ's loadtime weaving feature for proxying in a Spring based web application. The three things (AFAIK) that are needed to get this working are:
aspectj
" (as opposed to "proxy
")spring-aspects
and the aspectjweaver
to the classpathspring-instrument
agent to the VM startupMy question was on the best practice on how to achieve #3. My causes of concern are:
WEB-INF/lib
location of my webapp. I was thinking of having a static spring-instrument
jar sitting in my CATALINA_HOME/lib
that can be directly referred to.CATALINA_HOME/lib
. CATALINA_HOME
and it is not always possible to have everyone upgrade the spring-instrument
jar in lock-step fashion.Since this problem seems to be like a generic one, I wanted to know from others how they address this concern.
Thanks!
Depending on the container you don't need the spring-instrumentation.jar
. A single <context:load-time-weaver />
in your configuration is enough.
You will need a recent version of Tomcat (version 8), Jetty, WebSphere, Weblogic or JBoss.