Dan Finkelstein wrote:
>
> Yes, both velocity engines are in the same JVM. I was thinking that if the api
>supported something like the following, then multiple engines could be supported at
>one time:
>
> Velocity velocity1 = Velocity.newInstance();
> velocity1.init();
> velocity1.mergeTemplate();
> ....
> Velocity velocity2 = Velocity.newInstance();
> velocity2.init();
> velocity2.mergeTemplate();
>
> To be more specific as to my unique needs, in our servlet-based application, like
>many people, we use Velocity for the normal html page processing. But, in addition,
>we might invoke it for some "preprocessing" of a very different nature. These two
>uses of the velocity templates can each occur at any time, so I'd really like to have
>two already initialized setups of velocity, each ready to run at any time.
Sure. We have ran across this before, and have looked at it. It would
take a little work to do (not major, I suspect) because up to now, it
was designed internally with the singleton model in mind. I am
interested in doing this, and have been playing with how it might be
done in a transparent way....
Just for grins, whats different about the separate configurations that
make them incompatible such that you need two?
geir
--
Geir Magnusson Jr. [EMAIL PROTECTED]
System and Software Consulting
Developing for the web? See http://jakarta.apache.org/velocity/
"still climbing up to the shoulders..."