Thanks Will. Now that you say that, I think I did hear that at one point. The developer guide does mention this approach for the logger, but I don't see it mentioned for other pluggable components. I'm assuming the pattern for the others are the same as the logger config pattern, i.e., instead of...
file.resource.loader.class = org.apache.velocity.runtime.resource.loader.FileResourceLoader you could pass a FileResourceLoader instance to the property "file.resource.loader", correct? It would be helpful to update the docs/guide if that's the case. Even the setProperty(String, Object) says that it's usually a String, though sometimes a CSV String. It seems obvious with hindsight, but the quote of it in the guide would be nice to say that instantiated instances are also possible in certain circumstances. -- Serge Knystautas Lokitech >> software . strategy . design >> http://www.lokitech.com p. 301.656.5501 e. [EMAIL PROTECTED] On Thu, Jun 12, 2008 at 8:21 PM, Will Glass-Husain <[EMAIL PROTECTED]> wrote: > You can pass in a live instance of a resource loader and a live instance of > a logger. What else do you need? > > WILL > > On Thu, Jun 12, 2008 at 12:56 PM, Serge Knystautas <[EMAIL PROTECTED]> > wrote: > >> Has anyone looked into or done anything with a variant of Velocity >> that uses IoC pattern to initiatize itself? I started down my latest >> Velocity customization path wanting to add some custom fields to a >> Template using a child class. I already have my custom >> resource.loader (2 of them actually), custom parser pool, custom >> logger... I can see that I could implement my own custom >> ResourceManager (and thus ResourceFactory) to be able to return a >> child Template, but I'm just feeling dirty at this point. Also all of >> my custom implementations are instantiated with new MyCustomFooImpl() >> rather than being able to hand Velocity an impl with whatever >> dependencies I need. >> >> Any thoughts? >> >> -- >> 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] >> >> > > > -- > Forio Business Simulations > > Will Glass-Husain > [EMAIL PROTECTED] > www.forio.com > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
