Thanks Antonio, Nathan, I've created JIRA issue: https://issues.apache.org/jira/browse/VELOCITY-776
On Wed, 2010-09-01 at 07:14 -0700, Nathan Bubna wrote: > On Tue, Aug 31, 2010 at 10:02 PM, Kitching, Simon > <[email protected]> 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. If this property isn't meant to be threadsafe, then it would be good to at least document it here: http://velocity.apache.org/engine/devel/developer-guide.html#velocity_configuration_keys_and_values and maybe the javadoc for the Velocity and VelocityEngine classes should warn that some properties make the classes non-threadsafe. Though ideally, they would be threadsafe regardless of property settings.. For now, we've changed our code to use a separate VelocityEngine per thread, which resolves the issue for us (at some performance cost).. Oh, and by the way, the archive links to Nabble on this page don't work: * http://velocity.apache.org/contact.html They redirect somewhere rather amusing... Regards, Simon Good planets are hard to find - please think of the environment before you print this email. ____________________________________________________________________ CAUTION - This message may contain privileged and confidential information intended only for the use of the addressee named above. If you are not the intended recipient of this message you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error please notify Air New Zealand immediately. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of Air New Zealand. _____________________________________________________________________ For more information on the Air New Zealand Group, visit us online at http://www.airnewzealand.com _____________________________________________________________________
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
