Results 1 to 4 of 4

Thread: Lighter Pointcuts?

Threaded View

  1. #1

    Default Lighter Pointcuts?

    I’ve defined in my applicationContext.xml many beans and I want to declare transactions just for some of them. I’ve defined a pointcut for each method that I want to be transactional:

    <aop:config>
    <aop:advisor pointcut="execution(public * com.company.project.services.Demo1Service.doSometh ing(..))" advice-ref="txRequired"/>
    <aop:advisor pointcut="execution(public * com.company.project.services.Demo1Service.execute( ..))" advice-ref="txRequired"/>
    <aop:advisor pointcut="execution(public * com.company.project.services.Demo2Service.doSometh ing(..))" advice-ref="txRequired"/>
    <aop:advisor pointcut="execution(public * com.company.project.services.Demo2Service.execute( ..))" advice-ref="txRequired"/>

    etc...

    </aop:config>

    <tx:advice id="txRequired" transaction-manager="transactionManager">
    <tx:attributes>
    <tx:method name="*"/>
    </tx:attributes>
    </tx:advice>


    Helped by a profiler, I have discovered that the consumption of the memory is too high (over 1MB for each pointcut). Due to this, the total amount of the memory is oversized.
    The use of a pointcut penalize so much? Is there another way to define lighter pointcuts?

    Thanks in advance
    Last edited by Isaac Rodriguez; May 17th, 2010 at 08:08 AM.

Tags for this Thread

Posting Permissions

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