Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Concrete Aspects and Precedence: can't determine precedence between two or more pieces of advice that apply to the same join

Hi,

Can someone please tell me how does one avoid the following error message being printed?

error at com/jinspired/jxinsight/probes/ext/aspectj/ProbeAspect.java::0 can't determine precedence between two or more pieces of advice that apply to the same join

We have some abstract aspects (probes, diagnostics, trace) which our customers extend via the definition of concrete aspects within an aop.xml file. At one test site a customer happened to pick out the same underlying join point for two different concrete aspects with different slightly different point cuts which extend from the same abstract aspect - ProbeAspect.

Our advice implementation had already had safe guards in place to deal with the dispatching at the same join point across concrete aspects extended from the same abstract aspect.

I am not exactly sure how a declares precedence will handle this as the error message references the abstract class and not the actually concrete class name.

For example:
<concrete-aspect name="ProbeAspect"
                     extends="com.jinspired.jxinsight.probes.ext.aspectj.ProbeAspect">
      <pointcut name="scope" _expression_="execution(* com.mycomp..*(..))"/>
    </concrete-aspect>
 
      <concrete-aspect name="DupProbeAspect"
                     extends="com.jinspired.jxinsight.probes.ext.aspectj.ProbeAspect">
      <pointcut name="scope" _expression_="execution(* com.mycop.myapp.*(..))"/>
    </concrete-aspect>

This could easily happen with point cuts referencing interfaces that are implemented by one class.

kind regards,

William


Back to the top