Announcement Announcement Module
No announcement yet.
Attribute Driven pointcuts Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Attribute Driven pointcuts

    Hi.. can I know how I use this kind of pointcut? an example maybe?

    Maybe this is a silly question.. but this are the only description about attribute driven pointcut, and I dont understand: Attribute-driven pointcuts
    An important type of static pointcut is a metadata-driven pointcut. This uses the values of metadata attributes: typically, source-level metadata.
    and also I found this in the reference:

    Later versions of Spring may offer support for "semantic pointcuts" as offered by JAC: for example, "all methods that change instance variables in the target object."
    is it already available in the latest version? and do you have any examples on using it?

  • #2
    TransactionProxyFactoryBean uses an advisor that is driven by metadata pointcuts. (There's a layer of indirection there with TransactionAttributeSource, but it can be set up to use attributes.)

    To implement a metadata-driven pointcut, just extend something like StaticMethodMatcherPointcut and look at the attributes on the class or interface.

    There is no support for "semantic pointcuts" yet.