velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Bubna <nat...@esha.com>
Subject Re: Fw: exception using ViewRenderTool
Date Wed, 09 Jun 2004 23:17:55 GMT
Darren Davison said:
> On Wednesday 09 June 2004 22:08, Nathan Bubna wrote:
>
> > ah.  yeah, the RenderTool currently uses the Velocity singleton.  if that
> > hasn't been initialized, then $render.eval($foo) won't work.  try calling
> > Velocity.init() before using the RenderTool.
>
> ok, if I do it works.  Not sure where the differences are:
> velocityEngine.init() which Spring uses internally and Velocity.init() both
> seem simply to delegate to RuntimeInstance.init() - what occurs that makes
> the Velocity.init() necessary for the render tool?
...

http://jakarta.apache.org/velocity/developer-guide.html#To%20Singleton%20Or%20Not%20To%20Singleton

each VelocityEngine gets its own RuntimeInstance and the singleton gets its
own too.  they're not shared.

Nathan Bubna
nathan@esha.com


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message