Results 1 to 2 of 2

Thread: Weaving Spring AOP aspect on jar class method execution

  1. #1
    Join Date
    Jun 2012
    Posts
    1

    Question Weaving Spring AOP aspect on jar class method execution

    Hi,

    I am using Spring AOP to weave my Aspect around method execution of a jar's class.
    Problem is pointcut execution is not intercepted.

    Writing AspectJ aspect is not an option as the Aspect is in Spring AOP, and has been provided by company's framework team.

    My question is :
    Is it possible with Spring AOP?
    If so, please guide how.

    I have wondered across threads, but haven't got a solution.

    Thanks in advance.

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,625

    Default

    Spring will only apply AOP to beans in the application context it will not apply AOP to beans which aren't under its control. So external classes from jar files will not be adviced. The only way to do so is to use AspectJ and use loadtime weaving.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Posting Permissions

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