Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-dev] Clarification of concrete aspect implementation whether it is SINGLETON

Hello,

I am using concrete aspects in my project. Could anyone please help me to understand whether the
implementation objects of concrete aspects defined in the below aop.xml are singleton.

Please confirm my understanding that there will be only one instance of concrete-aspect implementation created for each concrete aspect definition in the aop.xml generated by the aspectJ. JFYI that load time weaving is employed in my project.


<?xml version="1.0" encoding="UTF-8"?>
<aspectj>
<aspects>

  <concrete-aspect name="main.java.aop.field.
MyFieldAspect">
    <around pointcut="get(@main.java.aop.
field.Field * *)" invokeClass="main.java.aop.field.FieldAspect" invokeMethod="getField()"/>
  </concrete-aspect>

  <concrete-aspect name="main.java.aop.extend.
ConcreteTracingImpl">
    <around pointcut="execution(@main.
java.aop.method.Method * *(..))" invokeClass="main.java.aop.extend.AbstractTracing" invokeMethod="traceMethod()"/>
  </concrete-aspect>

</aspects>

<weaver options="-verbose -showWeaveInfo" />
</aspectj>


Thanks.

Sridhar Thiyagarajan

Back to the top