Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] threadflow

There is no architected way to access that (right now) and no open enhancement request to add that feature (open one?). 

You could try reflection (to try it out). The source for aspectjrt.jar (where the runtime implementation exists) is available from the website or in AJDT.  Depending on whether the cflow pointcut binds any state it will either be represented as a CFlowStack or a CFlowCounter in thread local.  Although actually now I think about it - I'm not sure you can tie the counter/stack instances back to the match location that gave rise to them.... hmmm.

Andy.

2008/11/6 Ken Horn <ken.horn@xxxxxxxxxxx>
Hi,

I'd like to track cflow based state across threads -- the application
is SEDA style, and an extra complication is it uses thread pools, so
threads are not created directly (so InheritableThreadLocal doesn't
quite work). Is it possible to access the cflow based state -- eg
MyAspect.currentThreadCflow() a la .aspectOf(), so that I can clone it
and attach it to another thread (for some unit-of-work). I think the
answer is currently no (in the public API anyway), but is there some
other way? eg if cflow is implemented using a ThreadLocal, can I grab
the value directly?

I saw a number of questions from a few years ago nothing more
recently.  Thoughts?

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


Back to the top