WARNING: This server is unstable and will be retired in the next days. If you want to keep this forum available, please request immediately a migration on the Nabble Support forum. Forums that don't receive any migration request will be deleted forever.

 « Return to Thread: [jira] [Issue Comment Edited] (VELOCITY-776) "velocimacro.permissions.allow.inline.local.scope" makes VelocityEngine not threadsafe

[jira] [Issue Comment Edited] (VELOCITY-776) "velocimacro.permissions.allow.inline.local.scope" makes VelocityEngine not threadsafe

by Velocity - Dev mailing list-2 :: Rate this Message:

| View in Thread


    [ https://issues.apache.org/jira/browse/VELOCITY-776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13137150#comment-13137150 ]

Sergey Zolotaryov edited comment on VELOCITY-776 at 10/31/11 2:06 PM:
----------------------------------------------------------------------

We are experiencing the same issue with 1.7.0 on linux. This, however, has never happened on Windows.
               
      was (Author: anydoby):
    We are issuing the same issue with 1.7.0 on linux. This, however, has never happened on Windows.
                 

> "velocimacro.permissions.allow.inline.local.scope" makes VelocityEngine not threadsafe
> --------------------------------------------------------------------------------------
>
>                 Key: VELOCITY-776
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-776
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.6.4
>         Environment: Sun java jdk1.6.0_21, Ubuntu 10.04
>            Reporter: Simon Kitching
>         Attachments: RenderVelocityTemplate.java, RenderVelocityTemplateTest.java
>
>
> The attached unit test shows that when "velocimacro.permissions.allow.inline.local.scope" is set to true, and multiple threads use the same VelocityEngine instance then macros sometimes don't get expanded and the #macroname call remains in the output text.
> Notes:
> * running test method "testMultipleEvals" (single threaded case) always succeeds
> * running test method "testMultiThreadMultipleEvals" always fails
> * commenting out the allow.inline.local.scope line makes the multithread test pass (but of course has other side-effects)
> Interestingly, for the multithread case it seems that 1 thread always succeeds and N-1 threads fail.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...

 « Return to Thread: [jira] [Issue Comment Edited] (VELOCITY-776) "velocimacro.permissions.allow.inline.local.scope" makes VelocityEngine not threadsafe