Problem using bt;advice

Help
2009-08-30
2013-05-09
  • Jettro Coenradie

    Hi,
    I am trying to configure multiple pointcuts and use method tracking. With the following configuration I get an exception when running the application.
    configuration:
        <bt:advice id="trackingAdvice"/>

        <aop:config>
            <aop:pointcut id="services" expression="execution(* org.yourscrum.service.*Service.*(..))"/>
            <aop:advisor advice-ref="trackingAdvice" pointcut-ref="services"/>
        </aop:config>

    error:
    org.springframework.beans.factory.BeanInitializationException: Property 'application' is required for bean 'trackingAdvice'

    Any ideas how to resolve this?

     
    • Jason Trump

      Jason Trump - 2009-08-30

      hi jettro,

      you need to add the 'application'  attribute to bt:advice; so

      <bt:advice id="trackingAdvice" application="myApplicationName"/>

      myApplicationName can be any string.  it's just some name you want to give this application for logging purposes.

      HTH
      jt

       
      • Jettro Coenradie

        The problem with the application attribute is that it is not supported by the xsd schema

         
        • Jason Trump

          Jason Trump - 2009-08-30

          i see your point :)

          the code supports it, but the schema does not.  try this workaround, which involves adding an explicit <bt:manager> tag:

            <bt:manager id="defaultTrackingManager" application="myAppName"/>
            <bt:advice id="trackingAdvice" tracking-manager="defaultTrackingManager"/>

          if you already have a bt:manager tag defined (based on your other forum posts, i think you might), just reference that one.

          i'll add a defect -- i think we need to add the application attribute to the schema for this use case.

           

Log in to post a comment.