Announcement Announcement Module
Collapse
No announcement yet.
Can we get the performance benefit when using aspectj with spring (aop:aspectj-autop Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can we get the performance benefit when using aspectj with spring (aop:aspectj-autop

    Folks pardon me, if this sound stupid question.

    Can we get the performance benefit when using aspectj with spring ( aspectj-autoproxy declaration. ).

    Please see this config :
    ==================

    <aop:aspectj-autoproxy/>
    <aop:config>
    <aop:aspect ref="dareMessageAspect">
    <aopointcut id="serviceMethod" expression="execution(* com.dare.service.EnrichService.*(..))"/>
    <aop:after-returning pointcut-ref="serviceMethod" method="takeAction"/>
    </aop:aspect>
    </aop:config>

    From my understanding this is configured to be evaluated as aspectj code. Spring gurus, please confirm if this sould be interpreted as aspectj code by spring framework.

    Now another question is as "aspectj-autoproxy" tag indicates, this is implemented internally using spring AOP Proxy. I mean AspectJAwareAdvisorAutoProxyCreator class handles it.

    Hence I believe still it work as spring AOP (proxy baxed AOP) implementation.
    I mean performance would be as good as spring AOP.

    Guys help me out with way to use aspectj with spring AOP where in can levarage performance efficiency of aspectj. I want it to work on bytecode transformation technique.

    Please tell me how I can use ajc compiler.

    Thanks in advance.

    Shiv

  • #2
    The use of <aop:aspectj-autoproxy> (and similar options in Spring configuration) will still use Spring's proxy mechanism. In other words, no AspectJ weaving will occur. Therefore, performance characteristic of such solution will match that of Spring AOP.

    To read more about 'ajc' and how to use it, please visit http://eclipse.org/aspectj

    -Ramnivas

    Comment

    Working...
    X