Results 1 to 3 of 3

Thread: Problems with aspect acting line prototype?

  1. #1
    Join Date
    Apr 2006
    Posts
    17

    Default 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. #2
    Join Date
    Aug 2004
    Location
    San Mateo, CA
    Posts
    1,265

    Default

    Please post your configuration.
    Rod Johnson - GM, SpringSource Division, VMware
    http://www.springsource.com
    Spring From the Source

  3. #3
    Join Date
    Apr 2006
    Posts
    17

    Default

    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 at 03:12 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •