On Sat, Aug 1, 2009 at 12:21 PM, Henrib<hbies...@gmail.com> wrote: > > > > sebb-2-2 wrote: >> >> Thread-safety: is the interpreter thread-safe? >> > > Both the JexlEngine & UnifiedJEXL are intended to be thread-safe & shared. > Besides usage of final fields in any applicable case, the (Expression, > UnifiedJEXL.Expression, MethodMap & al) shared caches are synchronized for > get/put and the expression node cache are volatile to ensure atomic > read/write ops. > The Interpreter is a "transient" that's never used outside of an eval and > will not be shared. > For peace of mind, the methods that manipulate flags for the > JexlEngine/UnifiedJEXL setLenient, setDebug & al could be made synchronized > or using volatile fields but it does not make much sense to call those after > real usage has began. > <snip/>
Correct, some patterns of usage make more sense than others. But to make any claims via the 223 API, we have to do rigorous code inspection and add some tests. Until someone does that, lets return null. > The only edge case is the JexlContext (at least the instance created by > JexlHelper) which is *not* threadsafe being based on a HashMap. > <snap/> Things like that :-) -Rahul --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org