Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] flow of execution in different threads

Valerio,

Since I was creating a regression testing system I could enforce some
assumptions. I had to use the following method, because the
oh-so-nice-and-wonderful IBMJDK 1.3 (Websphere 4) pukes on static
introduction. I only allowed one overall thread of execution to function
at a time. In the system I tested this meant only one call to the
Websphere server at a time. Then I passed context information from one
thread to the next with a singleton (actually, anything that both threads
can reach will work). Not elegant, but it got the job done.

If you can use static introduction, you have a better alternative. You use
static introduction to attach context information to the argument objects
that get passed from one thread to another. This way you can pass any
information you want across thread borders. Your could for instance
generate a unique number per cflow, and pass that along with your
arguments using static introduction. This solution is very close to the
wormhole pattern that you can find in Laddad's AspectJ in Action.

Grtz,

Serge.

> hello
> is it possible to capture joinpoints inside different thread of executions
> ?
> say that a thread launch another one passing it  given parameter, so
> that it can compute something
> and when it's done, the first one can get the results. (either using the
> new stuff in the concurrent package, or using sideeffects).
>
> i'd like to capture a call to a method in a thread WHITIN the execution
> of the first one.
>
> i don't know either if this makes sense at all...
>
> bye,
> Valerio
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-users
>


Grtz,

Serge.

Serge Beaumont
Technical Software Architect
Sogeti Nederland BV
020-6606600 (+0391)
serge.beaumont@xxxxxxxxx
www.sogeti.nl



Disclaimer:
This message contains information that may be privileged or confidential and is the property of Sogeti Nederland B.V. or its Group members. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.



Back to the top