Results 1 to 4 of 4

Thread: ordering security, transaction and other advices (AOP)

  1. #1
    Join Date
    Feb 2007
    Location
    Germany
    Posts
    9

    Default ordering security, transaction and other advices (AOP)

    Hi,

    sorry if this question has been asked before:

    I try to implement method based security with global-method-security:
    ...
    <global-method-security>
    <protect-pointcut expression="execution(* com.mycompany.*Service.*(..))" access="ROLE_USER"/>
    </global-method-security>
    ...

    The services are also tranactional via XML-defined AOP advisors.
    Last but not least there are some custom advices defined for some service methods.

    Now I want to order these advices such that first the transaction starts, then the security checks are performed and after that my custom advices.

    What's the best/recommended way to achieve this?
    (While I can specify ordering info on the transaction and custom advices, I don't see an order-attribute on global-method-security or protect-pointcut)

    Thanks for your help,
    Holger

  2. #2
    Join Date
    Jun 2009
    Posts
    4

    Question

    I too am searching for this answer. I came across this post. I need to be able to use order="20" or something similar like I use in the tx:annotation-driven tag.

    Did you figure this out? Anyone else have the answer?

  3. #3
    Join Date
    Feb 2007
    Location
    Germany
    Posts
    9

    Default

    Unfortunately, I had to revert to the traditional style of configuring the method security interceptor and advisor to be able to specify the ordering.

    It would be very useful to support ordering with global-method-security, wouldn't it?

  4. #4
    Join Date
    Jun 2009
    Posts
    4

    Default

    Quote Originally Posted by hbrands View Post
    Unfortunately, I had to revert to the traditional style of configuring the method security interceptor and advisor to be able to specify the ordering.

    It would be very useful to support ordering with global-method-security, wouldn't it?
    Yes, it would be very helpful if Spring simply took an order property and passed that to the MethodDefinitionSourceAdvisor.

    Would you mind posting your configuration for reference in this thread? Alternatively, can you point me to the reference for the "traditional style" that you mention.

Posting Permissions

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