I was wondering if there is a convenient way to restrict method calls on objects I put into VelocityContext. I use Velocity templates to do dynamic renders high-traffic websites, and I instantiate VelocityEngine objects along with various POJOs that Spring assembles. These POJOs are sort of like macros and/or scripting support, have been configured with setter-injection, and are exposed to templates using a VelocityContext object.

My problem is that I intend to reuse these VelocityEngine and POJOs across multiple requests, so I do not want to allow template authors to call setter methods and effectively reconfigure the POJOs.

Is there an easy way to either have Velocity prevent certain method calls on context objects, or otherwise a way to make these POJOs immutable?

--
Serge Knystautas
Lokitech >> software . strategy . design >> http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to