On Tue, Sep 7, 2010 at 7:32 AM, Christopher Schultz <ch...@christopherschultz.net> wrote: > Antonio, > > On 9/2/2010 10:02 PM, Kitching, Simon wrote: >> On Wed, 2010-09-01 at 07:14 -0700, Nathan Bubna wrote: >>> On Tue, Aug 31, 2010 at 10:02 PM, Kitching, Simon >>> <simon.kitch...@airnz.co.nz> wrote: >>>> Hi All, >>>> >>>> I've got some code using Velocity which failed under load. Can you >>>> confirm that the Velocity class is meant to be thread-safe? If so, I'll >>>> file a bugreport. >>> >>> generally, yes, but velocimacro settings can break that. what are >>> your velocity properties? >> >> Just setting one property: >> Properties p = new Properties(); >> p.put("velocimacro.permissions.allow.inline.local.scope", "true"); >> Velocity.init(p); >> >> And interestingly, this *is* what is triggering the problem. > > I'm using a subclass of the VelocityLayoutServlet (tools-1.4) for my > purposes... will that be threadsafe when allow.inline.local.scope is set > to true? Which class/object ends up being non-threadsafe?
inline, local macros. only those macros have threadsafety issues. and even then, only when they are being repeatedly parsed under load (i.e. template caching off or repeated use of evaluate with the same log tag). so i mostly recommend that you not run inline macros through evaluate and turn template caching on when your app is under load. of course, i would also hope that you would be doing the latter anyway for performance. > Thanks, > -chris > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org For additional commands, e-mail: user-h...@velocity.apache.org