Well, okay, I am reasonably satisfied. I think Velocity and my app are
a damned good fit, as I had hoped. I have a couple of questions before
I dive in head first:
1) To singleton or not to singleton:
Is this a question of thread safety? The documentation doesn't make it
appear so. I had initially gone with the singleton pattern, but a post
by Nathan Bubna was more negative toward this than the Velocity site
documentation. Even using VelocityEngine, my first move was to put it
inside a singleton wrapper, so ingrained was my fear of initialization
cost. Which is, of course, stupid. If I am going to put Velocity into
a singleton wrapper (which I am tentatively calling VelociWrapper :-)),
what is the point of using the engine? If either one is thread-safe
does it matter? I guess I'm asking where, along the path, am I going to
regret using the singleton if the issue is NOT thread-safety, which is
my assumption at this point?
2) What does this mean in my logs? It doesn't appear I need this -
yet. But what is it and when might I need it?
2008-12-29 06:07:57,846 [main] DEBUG Velocity - Could not load resource
'VM_global_library.vm' from ResourceLoader
org.apache.velocity.tools.view.servlet.WebappLoader:
org.apache.velocity.exception.ResourceNotFoundException: WebappLoader :
Resource 'VM_global_library.vm' not found.
at
org.apache.velocity.tools.view.servlet.WebappLoader.getResourceStream(WebappLoader.java:179)
at
org.apache.velocity.runtime.resource.loader.ResourceLoader.resourceExists(ResourceLoader.java:224)
at
org.apache.velocity.runtime.resource.ResourceManagerImpl.getLoaderNameForResource(ResourceManagerImpl.java:617)
at
org.apache.velocity.runtime.RuntimeInstance.getLoaderNameForResource(RuntimeInstance.java:1464)
at
org.apache.velocity.runtime.VelocimacroFactory.initVelocimacro(VelocimacroFactory.java:159)
at
org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:261)
at org.apache.velocity.app.VelocityEngine.init(VelocityEngine.java:107)
Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]