Results 1 to 2 of 2

Thread: Intercepting init-methods

  1. #1

    Default Intercepting init-methods

    Hello,

    Is there a way to advice init-methods in Spring?

    For ex. I have a method initialize() which is a init-method configured in my applicationContext.xml.

    When I directly invoke initialize() without init-method, am able to advice the same, but as soon as I add init-method, it ignores the advice. How to achieve this kind of advising?

    Any thoughts would be really helpful.

    Thanks & Regards
    Surya

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

    Default

    The only way to achieve this is to use loadtime or compile time weaving... With the default aop mechanism (proxies) that isn't possible...
    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
  •