Skip to main content

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

Many thanks for the response .. Andy. Could you please help me about the attribute to be added in the below concrete aspect definition that controls the object creation and the possible values for it.


  <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>


Thanks.
Sridhar Thiyagarajan


On Tue, Jun 2, 2015 at 11:21 PM, Andy Clement <andrew.clement@xxxxxxxxx> wrote:
Yep, if you don’t specify then it is singleton.

cheers,
Andy

On Jun 2, 2015, at 12:21 AM, sridhar thiyagarajan <sridharthiyagarajan@xxxxxxxxx> wrote:

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
_______________________________________________
aspectj-dev mailing list
aspectj-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/aspectj-dev


_______________________________________________
aspectj-dev mailing list
aspectj-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/aspectj-dev


Back to the top