Sorry, just realized that this can be solved by setting the SessionFactory instance as a property, and retrieving it in the HibernateResourceLoader using the commonInit method. :-D
dreed wrote: > > Hi All: > > I have written a custom resource loader that uses Hibernate to retrieve > VMs. The ResourceLoader requires a Hibernate Session Factory to function. > In my specific case, I am using Spring, so I would like configure my > HibernateResourceLoader with an existing Hibernate SessionFactory and then > pass the instantiated and configured HibernateResourceLoader to be used by > the VelocityEngine. > > After looking through the source, it appears that RuntimeInstance attempts > to programatically instantiate each ResourceLoader during init, > specifically in the private initializeResourceManager() method, so that > instantiated ResourceLoaders can't be passed in (like with a > setResourceLoaders() method). Is there any way around this? > > Thanks in advance for any suggestions. > > Dave > -- View this message in context: http://www.nabble.com/Passing-Instantiated-Resource-Loaders-to-the-Runtime-Instance-tp15034266p15034464.html Sent from the Velocity - Dev mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
