Results 1 to 5 of 5

Thread: referencing pointcuts defined in schema

  1. #1
    Join Date
    Aug 2004
    Posts
    12

    Default 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. #2
    Join Date
    Sep 2004
    Location
    Texas
    Posts
    155

    Default

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

  3. #3
    Join Date
    Aug 2004
    Posts
    12

    Default

    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?

  4. #4
    Join Date
    Aug 2004
    Posts
    12

    Default

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

  5. #5
    Join Date
    Sep 2004
    Location
    Texas
    Posts
    155

    Default

    Quote 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.
    Corby

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •