title: Load-Time-Weaving differences between aspectj-weaver and spring-weaver
body: <p>I am having some strange problems using spring and Load-Time-Weaving using AspectJ.
  In one of my Apsects, I wanted to react on invocations of the "doAuthentication" Method of the class org.springframework.flex.security3.SpringSecurityLoginCommand. Therefore I created a method:</p>
  
  <pre><code>@Around("execution(* org.springframework.flex.security3.SpringSecurityLoginCommand.doAuthentication(..))")
  public Object aroundDoAuthentication(ProceedingJoinPoint pjp) throws Throwable {
  ...
  </code></pre>
  
  <p>This aspect is woven correctly if I use the aspectj-weaver agent, but is ignored if I use the spring-weaver. Unfortunately I have to use the spring-weaver, if I want correct aspect-spring integration. The only way I found out to get my aspect woven is to weave it around every method of the target class and to programatically filter the aspect calls:</p>
  
  <pre><code>@Around("execution(* org.springframework.flex.security3.SpringSecurityLoginCommand.*(..))")
  public Object aroundDoAuthentication(ProceedingJoinPoint pjp) throws Throwable {
      final String methodName = pjp.getSignature().getName();
      if("doAuthentication".equals(methodName)) {
      ...
  </code></pre>
  
  <p>Using the above code, I managed to weave everythgin correctly, but I am not sattisfied with this as it seems to be a big hack to me.</p>
  
  <p>Could anyone please explain why using the Spring-Weaver I am not able to weave the same as with the aspectj-weaver?</p>
  
  <p>Chris</p>