commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nestor Urquiza <nest...@yahoo.com>
Subject [SCXML] Executor is thread safe?
Date Tue, 20 Mar 2007 17:06:44 GMT
Hi guys,

I took a look at version 6.0 and I see in release
notes is written:

"The SCXMLExecutor instances now provide some element
of thread-safety.
   Firing events on a state machine executor instance
or reseting it
   are synchronized operations. The underlying state
machine needs to
   model any race conditions correctly."

In my current code I am not synchronizing and because
of that I think sometimes some variables that are
supposed to be part of one context for a specific
executor get wrong values from other
executor/contexts.

Could anyone explain a little bit better (maybe with a
snippet of code) both situations for version 5 and 6
showing in the first case how the synchronization must
be done externally and for the second one how thead
safe Executor is guarranteed?

It is kind of dificult to me to provide a JUnit test
case for such situations but I am seeing mixed context
variables within my application during high traffic
hours.

Thanks ,

-Nestor

exec.setRootContext(rootCtx);


 
____________________________________________________________________________________
Looking for earth-friendly autos? 
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
http://autos.yahoo.com/green_center/

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message