[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] Synchronous execution of Runnable
|
Wouldn't you need to intercept the start method of the thread that uses
OCRTask instead?
--nick
On Jun 16, 2004, at 2:38 AM, Alfonso Olias Sanz wrote:
Hi there,
I want do make synchronous execution of a Runnable class,, so I did
this
###############################################
public aspect SynchronousOCRTaskExecutionAspect {
public pointcut syncOCRTaskOperation():execution (* OCRTask.run() );
void around(): syncOCRTaskOperation() {
//TODO Whatever instead run method
OCRTask.fooStaticMethod();
}
}
###############################################
As an execution join point is picked out where it is actually defined.
But I
have my doubt if the is the following. The run method calls
<OCRTask.fooStaticMethod();> . By using this aspect do I avoid the
execution
of that static method in a separate thread? because the around advice
catches the execution of the run method. Am I right?
Alfonso
-----------------------------------------------------------------------
--------------------------------------------
Este correo electrónico y, en su caso, cualquier fichero anexo al
mismo, contiene información de carácter confidencial exclusivamente
dirigida a su destinatario o destinatarios. Queda prohibida su
divulgación, copia o distribución a terceros sin la previa
autorización escrita de Indra. En el caso de haber recibido este
correo electrónico por error, se ruega notificar inmediatamente esta
circunstancia mediante reenvío a la dirección electrónica del
remitente.
The information in this e-mail and in any attachments is confidential
and solely for the attention and use of the named addressee(s). You
are hereby notified that any dissemination, distribution or copy of
this communication is prohibited without the prior written consent of
Indra. If you have received this communication in error, please,
notify the sender by reply e-mail
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users
Nicholas Lesiecki
Software Craftsman, specializing in J2EE,
Agile Methods, and aspect-oriented programming
Books:
* Mastering AspectJ: http://tinyurl.com/66vf
* Java Tools for Extreme Programming: http://tinyurl.com/66vt
Articles on AspectJ:
* http://tinyurl.com/66vu and http://tinyurl.com/66vv