Geir, I assume you were aiming at running under multi-threaded environments and so provided synchronization where needed, this usually comes with a penalty in performance (while obviously being needed of course), was synchronization optimized when you built the system? Will it be possible to serve multiple requests concurrently?
Thanks, Amir -----Original Message----- From: Geir Magnusson Jr [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 12, 2004 2:07 PM To: Velocity Developers List Subject: Re: is velocity thread safe? On May 11, 2004, at 5:11 AM, Amir Zucker wrote: > Hi all, > > I plan to start using Velocity and am concerned about it not being > thread safe. I had tried to look in the docs and found nothing on the > subject, so I guess (hope) this is the place to find the answer. > > To the point : if I use a single VelocityEngine in a multi-threaded > environment, do I need to synchronize and make sure template generation > and or usage is not done in parallel? More specifically, if two > templates are requested and created "at the same time" can this cause > problems? If the same template is used concurrently, can this cause > problems? It's threadsafe. The only place to watch out is when using a VelocityContext. it is *not* thread safe - just use one per rendering request. I'll be happy to elaborate if you care. geir -- Geir Magnusson Jr 203-247-1713(m) [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
