Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] Stateful JoinPoints

Hi,

Thanks for the reply.  Some comments:

Does AspectJ actually guarantee anything about the identity of the static part
object?  (I don't know.)  For example, is an implementation free to generate a
new static part object each time a corresponding dynamic join point is reached?
If so, then you couldn't effectively attach application state to the static
part object.

I am not sure about guarantee's here, but it certainly is my understanding that, for efficiency reasons, AspectJ will only create the StaticPart once per program. [comments anyone?]

My opinion, in sum: yours is an interesting idea, but I'm not sure that it is
better than a dynamic test on other data objects in the corresponding pointcut.
I guess it could save you the trouble of hashing to find your own data, but
doing your own hash isn't so hard.

Not hard, just computationally expensive and it would be good for me to avoid this.

Moreover, implementing a map from join point objects to application-specific
data is (inherently) an application-specific task, and so AspectJ "shouldn't"
implement such a map: whatever it did, it would be good for some applications
and not so good for others.

Well, the idea would be only to permit such state if the client in question explicitly requested it - e.g. by overriding the JoinPoint.StaticPart class.

Cheers,

David Pearce

Eric.





Back to the top