commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rahul Akolkar <rahul.akol...@gmail.com>
Subject Re: [JEXL] 2.0 JSR-223 initial implementation added - what next?
Date Sat, 01 Aug 2009 18:12:37 GMT
On Sat, Aug 1, 2009 at 12:21 PM, Henrib<hbiestro@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-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message