The significant problem is that singleton = one instance = one configuration. If you want your apps to pull from different resource locations, then you want one configuration for each location, which means you can't use the singleton.
And frankly, i don't see any reason that the singleton API should be the default. In fact, i'd lean the opposite direction and say the singleton should only be used when theres a good reason for using it. :) On 1/12/07, Ryan Clifton <[EMAIL PROTECTED]> wrote:
Are there some disadvantages to the Singleton API? It would seem to me that that should be the default unless there's a significant problem with it. Thanks for you answer, I found some docs about the Singleton API. Digging into it now. Nathan Bubna wrote: > Velocity will only do that if you use the singleton API. If you use > separate VelocityEngines for each app, then you shouldn't have a > problem. > > On 1/12/07, Ryan Clifton <[EMAIL PROTECTED]> wrote: >> Hello, >> >> I am trying to run multiple web-apps under a single JVM that are >> concurrently running their own velocity engines. When I start >> everything up, the web-apps appear to use the template directory from >> the first web-app that is loaded into the JVM. >> >> IE. if i have www.foo1.com and www.foo2.com and foo1 is loaded first, >> foo2 will only get templates from foo1. >> >> So it seems that Velocity statically loads the templates folder across >> the whole JVM. Is there any way around this other than running multple >> JVMs on different ports? >> >> thanks. >> >> Ryan >> >> --------------------------------------------------------------------- >> 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] > -- Ryan Clifton CTO, CoutureCandy.com 805-377-4585 --------------------------------------------------------------------- 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]
