Announcement Announcement Module
Collapse
No announcement yet.
referencing pointcuts defined in schema Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • referencing pointcuts defined in schema

    the AOP docs in the Spring reference say that you can reference XSD-based pointcuts via XML ids, yet if I define two pointcuts, and one references the other via the id, i get an IllegalArgumentException that it cannot find the referenced pointcut (being the mainpoincut).

    is this still possible? I must use JDK 1.4 for now, so annotations are not possible.

    <aopointcut id="mainpointcut"
    expression="target(interface) and
    execution(* handleRequest(..))"/>

    <aopointcut id="pointcutargs"
    expression="mainpointcut() and args(req)"/>



    Thanks!

  • #2
    It's working for me. Do you have both aop: pointcut definitions wrapped in a single aop: config declaration?

    Comment


    • #3
      yes. they are both in the same config.

      the declarations themselves don't error out, but when i apply 'pointcut-ref' on an aspect:

      <aop:aspect id="validator"
      ref="validatorBean">

      <aop:before method="validateRequest"
      pointcut-ref="pointcutargs" arg-names="req"/>
      </aop:aspect>

      then i receive the failure.

      the logs aren't telling me anything else.

      i tried removing the 'args' expression and arg-names as well. same result.

      i'm using RC2 and included jars. has anything changed?

      Comment


      • #4
        another thought. do the XSD ID's require any sort of namespace prefixing in order to be found (ala package names0?

        Comment


        • #5
          Originally posted by boutwell
          i'm using RC2 and included jars. has anything changed?
          I am using nightly build, which contain a lot of bugfixes since RC2. It may very well be worth attempting an upgrade.

          If that doesn't work, try posting your relevant config, including schema declarations, using the [code] markup so it is readable.

          Comment

          Working...
          X