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

I’m not sure you can control the creation of the aspect object instance. If it isn’t covered in the docs ( https://eclipse.org/aspectj/doc/released/devguide/ltw-configuration.html#concrete-aspect )  or the readme describing this extension ( https://eclipse.org/aspectj/doc/released/README-1612.html ) then I don’t think it is supported. You could raise an enhancement request or if you post your use case here there may be alternative ways to achieve it.

cheers,
Andy

On Jun 3, 2015, at 8:42 AM, sridhar thiyagarajan <sridharthiyagarajan@xxxxxxxxx> wrote:

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

_______________________________________________
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