Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Use of introduced attributes/methods in around advices

Hi all,
 
Is it possible to use introduced attributes in around advices? For instance, suppose I have an aspect for keeping track of 'dirtiness' of db entities. The boolean isDirty attribute is introduced in my entity classes and I have an around() advice for all setters, which would mark this flag as true. The problem is that I get a compiler error saying that isDirty cannot be resolved or is not a field. If I keep isDirty as an aspect attribute, and not introduce it in the entity classes, there will be only one isDirty for all entities (which is not the intended behavior). What am I suppose to do? Define a perInstance aspect?
 
Any help would be most appreciated.
 
[]s,
Ricardo.

Back to the top