Announcement Announcement Module
Collapse
No announcement yet.
Problems with aspect acting line prototype? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problems with aspect acting line prototype?

    I'm configuring an @Aspect as in the 2.0 documentation:

    @Aspect
    public class DescriptorSecurity {
    private SecurityService securityService;

    @Around("execution(public org.trails.descriptor.IClassDescriptor org.trails.descriptor.DescriptorService+.getClassD escriptor(Class))")
    public Object classDescriptorSecurity(ProceedingJoinPoint pjp) throws Throwable { ... }

    @Around("execution(public java.util.List org.trails.descriptor.DescriptorService+.getAllDes criptors())")
    public Object getAllClassDescriptorSecurity(ProceedingJoinPoint pjp) throws Throwable { ... }

    public void setSecurityService(SecurityService securityService) {
    this.securityService = securityService;
    }

    }
    I can inject the SecurityService, but when the aspect intercepts the call, it is a different aspect object and SecurityService is null!

    What's going on? Do I have to do something special to get this to act like a singleton? I thought singleton was the default?

  • #2
    Please post your configuration.

    Comment


    • #3
      Okay, this turns out to be unrelated thankfully. The Trails project has a very complex build to get it working under an IDE. What used to work is to build it, then use the woven artifacts in the IDE to debug. But that stopped working when the artifacts were partially woven at runtime because the compile-time weaver did not differentiate.
      Last edited by topping; Sep 16th, 2006, 04:12 AM.

      Comment

      Working...
      X