Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] many aspects and who is first


Hi DarkIT.... you can write a third aspect that specifies the precedence:

aspect SystemRules {

  // this rule says that Authorization comes before anything else...
   declare precedence : Authorization, *;

   // other rules ...
   // alternative that orders Authorization and SomeLogic explicitly
   //  declare precedence : Authorization, SomeLogic;
}

in this way the system architect responsible for thinking about how the aspects in the system should interact can specify the required policy, and neither the Authorization nor the SomeLogic aspect needs to be aware of the other.

-- Adrian
Adrian_Colyer@xxxxxxxxxx



"DarkIT Mail.RU" <darkit@xxxxxxx>
Sent by: aspectj-users-admin@xxxxxxxxxxx

04/08/2003 13:41
Please respond to aspectj-users

       
        To:        aspectj-users@xxxxxxxxxxx
        cc:        
        Subject:        [aspectj-users] many aspects and who is first



Hello aspectj-users,

 If i've got a function - someFunction(..)
 And 2 aspect for its which run before this function: first is
 authorized aspect and second some logic. So if authorized module
 will be invoked not first, it's an error. So i have to do that logic
 aspect knows about authorized aspect and invokes its first.
 But that means aspects know about each other and they aren't
 independent.

 What will you say for this ? or maybe i don't understand something ?

--
Best regards,
DarkIT                          mailto:darkit@xxxxxxx

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top